From: Zorro Lang <zlang@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
fstests@vger.kernel.org, io-uring@vger.kernel.org
Subject: Re: [PATCH 3/3] common/rc: force enable io_uring in _require_io_uring
Date: Thu, 7 Mar 2024 03:56:38 +0800 [thread overview]
Message-ID: <20240306195638.tdw7upqc7om7x65b@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> (raw)
In-Reply-To: <x495xxzuzaa.fsf@segfault.usersys.redhat.com>
On Wed, Mar 06, 2024 at 10:59:25AM -0500, Jeff Moyer wrote:
> "Darrick J. Wong" <djwong@kernel.org> writes:
>
> > On Wed, Mar 06, 2024 at 05:19:35PM +0800, Zorro Lang wrote:
> >> If kernel supports io_uring, userspace still can/might disable that
> >> supporting by set /proc/sys/kernel/io_uring_disabled=2. Let's set
> >> it to 0, to always enable io_uring (ignore error if there's not
> >> that file).
> >>
> >> Signed-off-by: Zorro Lang <zlang@kernel.org>
> >> ---
> >> common/rc | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/common/rc b/common/rc
> >> index 50dde313..966c92e3 100644
> >> --- a/common/rc
> >> +++ b/common/rc
> >> @@ -2317,6 +2317,9 @@ _require_aiodio()
> >> # this test requires that the kernel supports IO_URING
> >> _require_io_uring()
> >> {
> >> + # Force enable io_uring if kernel supports it
> >> + sysctl -w kernel.io_uring_disabled=0 &> /dev/null
> >
> > _require_XXX functions are supposed to be predicates that _notrun the
> > test if XXX isn't configured or available. Shouldn't this be:
> >
> > local io_uring_knob="$(sysctl --values kernel.io_uring_disabled)"
> > test "$io_uring_knob" -ne 0 && _notrun "io_uring disabled by admin"
>
> That sounds like a good option to me.
>
> > Alternately -- if it _is_ ok to turn this knob, then there should be a
> > cleanup method to put it back after the test.
>
> I think it would be better not to change the setting, especially if the
> admin had disabled it.
As a testing environment/system, even if fstests doesn't touch the io_uring_disabled
sysctl, the testers should care about that before doing his test. So the fstests
users might need to change the io_uring_disabled=0 manually, or do it in their CI
test scripts. Maybe we should leave this job to the users.
Thanks,
Zorro
>
> Cheers,
> Jeff
>
> >
> > --D
> >
> >> +
> >> $here/src/feature -R
> >> case $? in
> >> 0)
> >> --
> >> 2.43.0
> >>
> >>
>
>
next prev parent reply other threads:[~2024-03-06 19:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 9:19 [PATCH 0/3] fstests: fix io_uring testing Zorro Lang
2024-03-06 9:19 ` [PATCH 1/3] fsstress: check io_uring_queue_init errno properly Zorro Lang
2024-03-06 15:53 ` Darrick J. Wong
2024-03-06 19:34 ` Zorro Lang
2024-03-06 15:56 ` Jeff Moyer
2024-03-06 9:19 ` [PATCH 2/3] fsstress: bypass io_uring testing if io_uring_queue_init returns EPERM Zorro Lang
2024-03-06 15:55 ` Darrick J. Wong
2024-03-06 19:36 ` Zorro Lang
2024-03-06 15:57 ` Jeff Moyer
2024-03-06 19:38 ` Zorro Lang
2024-03-06 9:19 ` [PATCH 3/3] common/rc: force enable io_uring in _require_io_uring Zorro Lang
2024-03-06 15:43 ` Darrick J. Wong
2024-03-06 15:59 ` Jeff Moyer
2024-03-06 19:56 ` Zorro Lang [this message]
2024-03-06 19:51 ` Zorro Lang
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=20240306195638.tdw7upqc7om7x65b@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com \
--to=zlang@redhat.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=jmoyer@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).