[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9191.1571992499@warthog.procyon.org.uk>
Date: Fri, 25 Oct 2019 09:34:59 +0100
From: David Howells <dhowells@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: dhowells@...hat.com, Rasmus Villemoes <linux@...musvillemoes.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>, raven@...maw.net,
Christian Brauner <christian@...uner.io>,
keyrings@...r.kernel.org, linux-usb@...r.kernel.org,
linux-block <linux-block@...r.kernel.org>,
LSM List <linux-security-module@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux API <linux-api@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 11/10] pipe: Add fsync() support [ver #2]
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > The keyrings testsuite needs the ability to wait for all the outstanding
> > notifications in the queue to have been processed so that it can then go
> > through them to find out whether the notifications it expected have been
> > emitted.
>
> Can't you just do
>
> ioctl(fd, FIONREAD, &count);
>
> in a loop instead? "No paperwork. Just sprinkle some msleep() crack on
> him, and let's get out of here"
Using FIONREAD like this means that I would have to quiesce the tests in order
to sync up. For the moment that's fine, but at some point I would like to be
able to stress test the system by running tests in parallel against the same
keyring. Each test needs to check with the monitor whether its keys have
generated the appropriate notifications against a backdrop of events being
continuously generated by other tests.
I can hold this patch for now. Let me see if I can come up with a better way
to do it. Maybe it can be done by dead reckoning, holding up until either
we've counted out a complete ring-full of notifications or read() has come up
empty.
David
Powered by blists - more mailing lists