Re: [libvirt PATCHv6 1/1] add DHCP snooping

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

 



Eric Blake <eblake@xxxxxxxxxx> wrote on 03/22/2012 03:54:31 PM:

> 
> pthread_cancel() tends to imply that you are properly managing signal
> blocking across threads; we haven't used it anywhere else in libvirt,
> and I'm extremely wary of pulling it in now, as there's probably a lot
> of subtle bugs that it would expose.  Are you sure you can't do this in
> some other manner without dragging in pthread_cancel()?

Well, I was trying to avoid it in the earlier versions, but we ran
into races where a new snooper thread could start up on the same interface
before the old one woke up and noticed it was supposed to die; the old
thread would then interfere with the new thread in unpleasant ways.

I certainly had no problems with it during my testing. In this case,
an asynchronous signal to kill an otherwise blocked-on-a-read thread
is exactly what we need.

That said, I think it's possible to avoid it, but using it greatly
simplified the restart and reload cases. If you think it's too much
risk, I can take a shot at reworking that to avoid it again.

                                                        +-DLS

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]