FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: fstests@vger.kernel.org, io-uring@vger.kernel.org
Subject: Re: [PATCH 2/4] fsstress: reduce the number of events when io_setup
Date: Mon, 3 Aug 2020 01:32:10 +0800
Message-ID: <20200802173210.GN2937@dhcp-12-102.nay.redhat.com> (raw)
In-Reply-To: <x49ft9am7is.fsf@segfault.boston.devel.redhat.com>

On Wed, Jul 29, 2020 at 03:43:39PM -0400, Jeff Moyer wrote:
> Zorro Lang <zlang@redhat.com> writes:
> 
> > The original number(128) of aio events for io_setup is a little big.
> > When try to run lots of fsstress processes(e.g. -p 1000) always hit
> > io_setup EAGAIN error, due to the nr_events exceeds the limit of
> > available events. So reduce it from 128 to 64, to make more fsstress
> > processes can do AIO test.
> 
> It looks to me as though there's only ever one request in flight.  I'd
> just set it to 1.
> 
> Also, you've included another change not mentioned in your changelog.
> Please make sure the changelog matches what's done in the patch.

Thanks Jeff, I'll rewrite this patch:) Do you have any review points about
those two IO_URING related patches (1/4 and 4/4), or it looks good to you?

Thanks,
Zorro

> 
> -Jeff
> 
> >
> > Signed-off-by: Zorro Lang <zlang@redhat.com>
> > ---
> >  ltp/fsstress.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > index 388ace50..a11206d4 100644
> > --- a/ltp/fsstress.c
> > +++ b/ltp/fsstress.c
> > @@ -28,6 +28,7 @@
> >  #endif
> >  #ifdef AIO
> >  #include <libaio.h>
> > +#define AIO_ENTRIES	64
> >  io_context_t	io_ctx;
> >  #endif
> >  #ifdef URING
> > @@ -699,8 +700,8 @@ int main(int argc, char **argv)
> >  			}
> >  			procid = i;
> >  #ifdef AIO
> > -			if (io_setup(128, &io_ctx) != 0) {
> > -				fprintf(stderr, "io_setup failed");
> > +			if (io_setup(AIO_ENTRIES, &io_ctx) != 0) {
> > +				fprintf(stderr, "io_setup failed\n");
> >  				exit(1);
> >  			}
> >  #endif
> > @@ -714,7 +715,7 @@ int main(int argc, char **argv)
> >  				doproc();
> >  #ifdef AIO
> >  			if(io_destroy(io_ctx) != 0) {
> > -				fprintf(stderr, "io_destroy failed");
> > +				fprintf(stderr, "io_destroy failed\n");
> >  				return 1;
> >  			}
> >  #endif
> 


  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 18:23 [PATCH 0/4] fsstress,fsx: add io_uring test and do some fix Zorro Lang
2020-07-28 18:23 ` [PATCH 1/4] fsstress: add IO_URING read and write operations Zorro Lang
2020-07-28 18:23 ` [PATCH 2/4] fsstress: reduce the number of events when io_setup Zorro Lang
2020-07-29 19:43   ` Jeff Moyer
2020-08-02 17:32     ` Zorro Lang [this message]
2020-07-28 18:23 ` [PATCH 3/4] fsstress: fix memory leak in do_aio_rw Zorro Lang
2020-07-28 18:23 ` [PATCH 4/4] fsx: add IO_URING test Zorro Lang
2020-08-02 18:21   ` 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=20200802173210.GN2937@dhcp-12-102.nay.redhat.com \
    --to=zlang@redhat.com \
    --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

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git