From: Eryu Guan <guan@eryu.me>
To: zlang@redhat.com
Cc: "Darrick J. Wong" <djwong@kernel.org>, fstests@vger.kernel.org
Subject: Re: [PATCH] generic/233,270: unlimit the max locked memory size for io_uring
Date: Sun, 31 Jan 2021 23:24:52 +0800 [thread overview]
Message-ID: <20210131152452.GF2350@desktop> (raw)
In-Reply-To: <20210128030209.GO14354@localhost.localdomain>
On Thu, Jan 28, 2021 at 11:02:09AM +0800, Zorro Lang wrote:
> On Wed, Jan 27, 2021 at 03:43:40PM -0800, Darrick J. Wong wrote:
> > On Wed, Jan 27, 2021 at 03:21:43PM +0800, Zorro Lang wrote:
> > > The ltp/fsstress always fails on io_uring_queue_init() by returnning
> > > ENOMEM. Due to io_uring accounts memory it needs under the rlimit
> > > memlocked option, which can be quite low on some setups, especially
> > > on 64K pagesize machine. root isn't under this restriction, but
> > > regular users are. So only g/233 and g/270 which use $qa_user to run
> > > fsstress are failed.
> > >
> > > To avoid this failure, set max locked memory to unlimited before doing
> > > fsstress, then restore it after test done.
> > >
> > > Signed-off-by: Zorro Lang <zlang@redhat.com>
> > > ---
> > > tests/generic/233 | 8 ++++++++
> > > tests/generic/270 | 8 ++++++++
> > > 2 files changed, 16 insertions(+)
> > >
> > > diff --git a/tests/generic/233 b/tests/generic/233
> > > index 7eda5774..342690c2 100755
> > > --- a/tests/generic/233
> > > +++ b/tests/generic/233
> > > @@ -43,6 +43,13 @@ _fsstress()
> > > -f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
> > > -n $count -d $out -p 7`
> > >
> > > + # io_uring accounts memory it needs under the rlimit memlocked option,
> > > + # which can be quite low on some setups (especially 64K pagesize). root
> > > + # isn't under this restriction, but regular users are. To avoid the
> > > + # io_uring_queue_init fail on ENOMEM, set max locked memory to unlimited
> > > + # temporarily.
> > > + lmem=`ulimit -l`
> > > + ulimit -l unlimited
> >
> > Should this apply to all the other tests that run fsstress?
> >
> > $ grep -l FSSTRESS_PROG tests/ | wc -l
> > 94
>
> The root user isn't under this restriction, only g/233 and g/270 run fsstress
> with non-root user ($qa_user).
> Hmm... is that possible to run xfstests with a non-root user? Or you'd like to
No, fstests is required to be run by root user, there's a check in
'check' script :)
> write a common helper _fsstress() (if run fsx with non-root user, I doubt it's
> needed too)...
Perhaps we should raise the limit in fsstress and fsx while setting up
io_uring_queue_init()? So we don't have to add this ulimit settings to
every test that runs fsstress/fsx with regular user.
Thanks,
Eryu
next prev parent reply other threads:[~2021-01-31 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 7:21 [PATCH] generic/233,270: unlimit the max locked memory size for io_uring Zorro Lang
2021-01-27 23:43 ` Darrick J. Wong
2021-01-28 3:02 ` Zorro Lang
2021-01-31 15:24 ` Eryu Guan [this message]
[not found] ` <20210131163412.GZ14354@localhost.localdomain>
2021-02-07 16:23 ` Eryu Guan
2021-02-07 16:31 ` Eryu Guan
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=20210131152452.GF2350@desktop \
--to=guan@eryu.me \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.