Re: [Patch] tabled: replace event_loopbreak with pipe

Jeff Garzik <[email protected]>
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On 02/03/2010 10:02 PM, Pete Zaitcev wrote:
> As it turned out, event_loopbreak() does not awaken the thread that
> exectutes event_dispatch(), but our code expected that it would.
> One easily noticeable effect was that there was a noticeable delay
> between the state transition to DB master and listening on sockets.
> I knew the mysterious delay existed for a while, but never got around
> to investigate. For ncld API, I moved the processing of CLD packets
> to its own thread and suddenly everything else froze. Apparently the
> existing code only works because of extra packets of CLD protocol.
>
> For a fix, dispose of event_loopbreak and use a loopback pipe.
> Also gone is state_tdb_new. That thing was just disgusting.
>
> Notice that we still have one event_loopbreak remaining, because it
> works correctly thanks to UNIX signal awakening the polling thread.
>
> Signed-Off-By: Pete Zaitcev<[email protected]>

applied, with a few cosmetic changes (speling correction, use of 'switch')
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.