Use poll() when receiving uevents
authorHannes Reinecke <hare@suse.de>
Thu, 24 Jul 2014 06:51:23 +0000 (08:51 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 16:01:41 +0000 (18:01 +0200)
commit3e5e8b76b13f23c8bc52fd01228057ebf8a69e9e
treeb4d78ad236ee06ba7a2541a86a78092e4014258c
parenta7d338628f2d3d6bfb8839d5f62373c34780f435
Use poll() when receiving uevents

Currently uevent_listen() will be adding each event individually
to the internal queue. This leads to a lock contention on high
load, as uevent_listen() has to grab the shared lock before
doing so.
This patch batches the uevent reception so that uevents will
only ever be added to the internal queue if there are no more
events pending.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/list.h
libmultipath/uevent.c