[Gluster-devel] FreeBSD port of GlusterFS racks up a lot of CPU usage

Jeff Darcy jdarcy at redhat.com
Fri Jan 8 10:17:30 UTC 2016


> > I don't know anything about gluster's poll implementation so I may
> > be totally wrong, but would it be possible to use an eventfd (or a
> > pipe if eventfd is not supported) to signal the need to add more
> > file descriptors to the poll call ?
> >
> >
> > The poll call should listen on this new fd. When we need to change
> > the fd list, we should simply write to the eventfd or pipe from
> > another thread.  This will cause the poll call to return and we will
> > be able to change the fd list without having a short timeout nor
> > having to decide on any trade-off.
> 
>
> Thats a nice idea. Based on my understanding of why timeouts are being
> used, this approach can work.

The own-thread code which preceded the current poll implementation did
something similar, using a pipe fd to be woken up for new *outgoing*
messages.  That code still exists, and might provide some insight into
how to do this for the current poll code.


More information about the Gluster-devel mailing list