public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] aio_suspend_4-1: Fix failures on s390x
Date: Thu, 2 Feb 2017 10:40:40 -0500 (EST)	[thread overview]
Message-ID: <93175945.2218188.1486050040647.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170202132226.32352-1-chrubis@suse.cz>





----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: ltp@lists.linux.it
> Cc: "Jan Stancek" <jstancek@redhat.com>
> Sent: Thursday, 2 February, 2017 2:22:26 PM
> Subject: [PATCH] aio_suspend_4-1: Fix failures on s390x
> 
> The testcase often fails on s390x due to fast I/O. The AIO request we
> wanted to timeout on finishes too fast most of the time.
> 
> While this is not a complete fix it's good enough so that the test works
> fine if executed 1000 times, previously the success ratio was between
> 20% and 80%.
> 
> This patch changes:
> 
> * The file is written instead of read
>   - this simplifies the code and also ensures that we are not just
>     reading data from kernel caches
> 
> * The file is opened with O_SYNC
>   - which increases chance that the buffers are not written too fast
> 
> * The timeout is decreased
> 
> * The buffer sizes are increased, especially for the AIO operation we
>   want to timeout on
> 
> + Simplifications in error paths
> 
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
> 
> Jan: Have you seen this test failing on s390x as well?

Yes, and I think also ppc. My notes say this is race-y testcase.

>      Can you please test the patch on RHEL on s390x?

I ran it for ~15 minutes on s390x in loop, no failures.

SNIP

Since this is write operation, skipping to "exit:" and free when we hit error,
while requests are still in-flight should be OK.

>  
>  	/* Wait for list processing completion */
>  	while (!received_all)
> -		sleep(1);
> +		usleep(50000);

Should we limit this loop by some counter? If something goes wrong,
this can loop forever.

Other than nit above, it looks good to me, ACK.

Regards,
Jan

  reply	other threads:[~2017-02-02 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 13:22 [LTP] [PATCH] aio_suspend_4-1: Fix failures on s390x Cyril Hrubis
2017-02-02 15:40 ` Jan Stancek [this message]
2017-02-07 14:35   ` 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=93175945.2218188.1486050040647.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --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