<tt><font size=2>David Stevens/Beaverton/IBM wrote on 03/22/2012 07:26:06
PM:<br>
<br>
> From: David Stevens/Beaverton/IBM</font></tt>
<br><tt><font size=2>> To: Eric Blake <eblake@redhat.com></font></tt>
<br><tt><font size=2>> Cc: libvir-list@redhat.com, Stefan Berger/Watson/IBM@IBMUS</font></tt>
<br><tt><font size=2>> Date: 03/22/2012 07:26 PM</font></tt>
<br><tt><font size=2>> Subject: Re: [libvirt] [libvirt PATCHv6 1/1]
add DHCP snooping</font></tt>
<br><tt><font size=2>> <br>
> Eric Blake <eblake@redhat.com> wrote on 03/22/2012 03:54:31
PM:<br>
> <br>
> > <br>
> > pthread_cancel() tends to imply that you are properly managing
signal<br>
> > blocking across threads; we haven't used it anywhere else in
libvirt,<br>
> > and I'm extremely wary of pulling it in now, as there's probably
a lot<br>
> > of subtle bugs that it would expose.  Are you sure you can't
do this in<br>
> > some other manner without dragging in pthread_cancel()?<br>
</font></tt>
<br><tt><font size=2>> Well, I was trying to avoid it in the earlier
versions, but we ran</font></tt>
<br><tt><font size=2>> into races where a new snooper thread could start
up on the same interface</font></tt>
<br><tt><font size=2>> before the old one woke up and noticed it was
supposed to die; the old</font></tt>
<br><tt><font size=2>> thread would then interfere with the new thread
in unpleasant ways.</font></tt>
<br>
<br><tt><font size=2>Right. I had created several patches on top of your
previous code. From what I remember pretty much all scenarios were working:
SIGHUP, multiple IP addresses, suspend/resume... Some of the code that
became necessary due to the interaction of the threads really wasn't 'nice'
(tricky)...</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br>