Date: Fri, 8 Jan 2016 05:17:30 -0500 (EST) From: Jeff Darcy <jdarcy@redhat.com> To: Raghavendra G <raghavendra@gluster.com> Cc: Xavier Hernandez <xhernandez@datalab.es>, freebsd-fs <freebsd-fs@freebsd.org>, Gluster Devel <gluster-devel@gluster.org>, Hubbard Jordan <jkh@ixsystems.com> Subject: Re: [Gluster-devel] FreeBSD port of GlusterFS racks up a lot of CPU usage Message-ID: <1924941590.6473225.1452248249994.JavaMail.zimbra@redhat.com> In-Reply-To: <CADRNtgRM17Eg3Z=LWifVNo=ai72dMiEVRKS3RwNfQ-dK7Pspew@mail.gmail.com> References: <571237035.145690509.1451437960464.JavaMail.zimbra@uoguelph.ca> <20151230103152.GS13942@ndevos-x240.usersys.redhat.com> <2D8C2729-D556-479B-B4E2-66E1BB222F41@ixsystems.com> <1083933309.146084334.1451517977647.JavaMail.zimbra@uoguelph.ca> <CADRNtgStOg8UZfxNt-SzvvPf7d1J7CC_gi49ww3BbixU0Ey-rg@mail.gmail.com> <568F6D07.6070500@datalab.es> <CADRNtgRM17Eg3Z=LWifVNo=ai72dMiEVRKS3RwNfQ-dK7Pspew@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1924941590.6473225.1452248249994.JavaMail.zimbra>