chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix for #989 and hopefully #877 too


From: Jörg F. Wittenberger
Subject: Re: [Chicken-hackers] [PATCH] Fix for #989 and hopefully #877 too
Date: Wed, 06 Nov 2013 10:15:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Hi,

despite the fact that salmonella currently seems to be happy with the situation, let me add my €0,02.

Sometimes the solution is not more code but less.

Chicken's interrupt handling was broken for quite a long time. There is by now still a problem lurking and waiting to be triggered: there are only so many pending interrupts possible.

Let me assure you: I'm NOT making this up. This has been a problem even before it was introduced into chicken. RScheme happens to be very similar to chicken in that respect. And I've been burned by those droped signals before chicken received the limitation too. Please refer to the archives of this mailing list.

In fact I've been taught the solution to this problem when I attended the university. What chicken is solving when scheduling signals is pretty much the same problem operating system kernels solve when handling interrupts. We've been taught at that time that the best (in terms of simplicity and safety) way to handle this in a multi threaded environment would be to dispatch the signal/interrupt to a user level thread on short path. Optionally schedule this thread next for execution. Never handle the interrupt in the kernel itself. If you don't have multiple thread running (but have the machinery already, otherwise the point is moot) create an extra thread just for this case.

When the issue was introduced into chicken, I forked my own environment and just tried following the text books. Safe for some dead code I never had to deal with these problems again. (Let me repeat: the limited queue of pending interrupts was a problem in practice for me. All I have to do is pull the network plug when running certain code to make it visible.)

I'd love to help bringing these fixes into the mainline chicken. (After all it's a horrible burden to always maintain the diff). @Peter: I'm still waiting for your reply on that topic.

Best Regards

/Jörg

Am 05.11.2013 22:41, schrieb Mario Domenech Goulart:
On Tue, 5 Nov 2013 16:52:16 +0100 Peter Bex <address@hidden> wrote:

The tests work, the sleep test from #989 works and the synch egg's tests
no longer hang, so I think this patch should probably go in ASAP.
...
Thanks, Peter.  I could successfully run salmonella on the whole set of
linux eggs.  I pushed your patch.

Best wishes.
Mario




reply via email to

[Prev in Thread] Current Thread [Next in Thread]