From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/preadv203: Add basic RWF_NOWAIT test
Date: Mon, 20 May 2019 13:24:51 +0200 [thread overview]
Message-ID: <20190520112451.GB25813@rei.lan> (raw)
In-Reply-To: <CAOQ4uxgNGK=QcGcmDpjt0jhWC9=E3egSpv5G0-7tXx7bKQD7gw@mail.gmail.com>
Hi!
> > Ping, anybody has any comments or can be this be this merged?
> >
>
> I have no objection to this test, but I have a question. Your claim is:
> "We are attempting to trigger the EAGAIN path for the RWF_NOWAIT flag."
>
> Seems like you have gone to a great length of effort to achieve this.
> Wouldn't it be sufficient to do a single preadv2 after fsync+drop_caches in
> order to observe EAGAIN?
As far as I can tell the I/O to the device has to be saturated in order
to get EAGAIN at least for a subset of filesystems. If I just drop the
cache once then attempt to read with the NOWAIT flag it strangely works
only for ext2 for me.
So I guess that the manual page is a bit misleading and the NOWAIT flag
actually returns EAGAIN only if the calling thread would end up in a
queue or waiting for a lock, but I haven't looked into the kernel code
to make sure.
> There are several other ways to get EAGAIN, like DIO read/write when
> page cache *is* populated.
That is a good hint, I will have a look at that case as well.
> Question is, how much is the test trying to cover.
Well ideally we should excercise as much kernel code paths as
possible... :-)
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-05-20 11:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 14:16 [LTP] [PATCH v2] syscalls/preadv203: Add basic RWF_NOWAIT test Cyril Hrubis
2019-05-20 10:08 ` Cyril Hrubis
2019-05-20 10:30 ` Amir Goldstein
2019-05-20 11:24 ` Cyril Hrubis [this message]
2019-05-29 12:52 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190520112451.GB25813@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox