On Mon, 2018-03-05 at 18:46 -0600, Benjamin Marzinski wrote: > > This is prety close to what I had in mind. The only things missing, > that > I noticed when I was looking at multipathd's signal handling, is > dealing > with SIGUSR2 in io_err_stat.c, which it sounds like you have already > spotted, and changing the calls to setitimer and usleep outside of > the > vecs lock to use nanosleep, so they don't interact with SIGALRM. > > I'll send a patch based on yours, to fix these.
I'm curious to see what you come up with. I've something on my workbench which seems to work well but needs some cleanup. The idea is to have a dedicated "alarm dispatcher" thread that deals with kernel timers exclusively, and forwards expiry events to the threads that have asked for it. The dispatcher maintains a list of active alarms and sets a kernel timer to the expiry time of the first alarm in the list. Cheers, Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list firstname.lastname@example.org https://www.redhat.com/mailman/listinfo/dm-devel