linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Michael Larabel <Michael@michaellarabel.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Amir Goldstein <amir73il@gmail.com>, Ted Ts'o <tytso@google.com>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	Jan Kara <jack@suse.cz>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Kernel Benchmarking
Date: Mon, 14 Sep 2020 22:21:42 +0200	[thread overview]
Message-ID: <c560a38d-8313-51fb-b1ec-e904bd8836bc@tessares.net> (raw)
In-Reply-To: <CAHk-=wip0bCNnFK2Sxdn-YCTdKBF2JjF0kcM5mXbRuKKp3zojw@mail.gmail.com>

Hello everyone,

On 14/09/2020 19:47, Linus Torvalds wrote:
> Michael et al,
>   Ok, I redid my failed "hybrid mode" patch from scratch (original
> patch never sent out, I never got it to a working point).
> 
> Having learnt from my mistake, this time instead of trying to mix the
> old and the new code, instead I just extended the new code, and wrote
> a _lot_ of comments about it.
> 
> I also made it configurable, using a "page_lock_unfairness" knob,
> which this patch defaults to 1000 (which is basically infinite).
> That's just a value that says how many times we'll try the old unfair
> case, so "1000" means "we'll re-queue up to a thousand times before we
> say enough is enough" and zero is the fair mode that shows the
> performance problems.

Thank you for the new patch and all the work around from everybody!

Sorry to jump in this thread but I wanted to share my issue, also linked 
to the same commit:

     2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic")

I have a simple test environment[1] using Docker and virtme[2] almost 
with the default kernel config and validating some tests for the MPTCP 
Upstream project[3]. Some of these tests are using a modified version of 
packetdrill[4].

Recently, some of these packetdrill tests have been failing after 2 
minutes (timeout) instead of being executed in a few seconds (~6 
seconds). No packets are even exchanged during these two minutes.

I did a git bisect and it also pointed me to 2a9127fcf229.

I can run the same test 10 times without any issue with the parent 
commit (v5.8 tag) but with 2a9127fcf229, I have a timeout most of the time.

Of course, when I try to add some debug info on the userspace or 
kernelspace side, I can no longer reproduce the timeout issue. But 
without debug, it is easy for me to validate if the issue is there or 
not. My issue doesn't seem to be linked to a small file that needs to be 
read multiple of times on a FS. Only a few bytes should be transferred 
with packetdrill but when there is a timeout, it is even before that 
because I don't see any transferred packets in case of issue. I don't 
think a lot of IO is used by Packetdrill before transferring a few 
packets to a "tun" interface but I didn't analyse further.

With your new patch and the default value, I no longer have the issue.

> I've only (lightly) tested those two extremes, I think the interesting
> range is likely in the 1-5 range.
> 
> So you can do
> 
>      echo 0 > /proc/sys/vm/page_lock_unfairness
>      .. run test ..
> 
> and you should get the same numbers as without this patch (within
> noise, of course).

On my side, I have the issue with 0. So it seems good because expected!

> Or do
> 
>      echo 5 > /proc/sys/vm/page_lock_unfairness
>      .. run test ..
> 
> and get numbers for "we accept some unfairness, but if we have to
> requeue more than five times, we force the fair mode".

Already with 1, it is fine on my side: no more timeout! Same with 5. I 
am not checking the performances but only the fact I can run packetdrill 
without timeout. With 1 and 5, tests finish in a normal time, that's 
really good. I didn't have any timeout in 10 runs, each of them started 
from a fresh VM. Patch tested with success!

I would be glad to help by validating new modifications or providing new 
info. My setup is also easy to put in place: a Docker image is built 
with all required tools to start the same VM just like the one I have. 
All scripts are on a public repository[1].

Please tell me if I can help!

Cheers,
Matt

[1] 
https://github.com/multipath-tcp/mptcp_net-next/blob/scripts/ci/virtme.sh and 
https://github.com/multipath-tcp/mptcp_net-next/blob/scripts/ci/Dockerfile.virtme.sh
[2] https://git.kernel.org/pub/scm/utils/kernel/virtme/virtme.git
[3] https://github.com/multipath-tcp/mptcp_net-next/wiki
[4] https://github.com/multipath-tcp/packetdrill
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

  reply	other threads:[~2020-09-14 20:24 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHk-=wiZnE409WkTOG6fbF_eV1LgrHBvMtyKkpTqM9zT5hpf9A@mail.gmail.com>
     [not found] ` <aa90f272-1186-f9e1-8fdb-eefd332fdae8@MichaelLarabel.com>
     [not found]   ` <CAHk-=wh_31_XBNHbdF7EUJceLpEpwRxVF+_1TONzyBUym6Pw4w@mail.gmail.com>
     [not found]     ` <e24ef34d-7b1d-dd99-082d-28ca285a79ff@MichaelLarabel.com>
     [not found]       ` <CAHk-=wgEE4GuNjcRaaAvaS97tW+239-+tjcPjTq2FGhEuM8HYg@mail.gmail.com>
     [not found]         ` <6e1d8740-2594-c58b-ff02-a04df453d53c@MichaelLarabel.com>
     [not found]           ` <CAHk-=wgJ3-cEkU-5zXFPvRCHKkCCuKxVauYWGphjePEhJJgtgQ@mail.gmail.com>
     [not found]             ` <d2023f4c-ef14-b877-b5bb-e4f8af332abc@MichaelLarabel.com>
     [not found]               ` <CAHk-=wiz=J=8mJ=zRG93nuJ9GtQAm5bSRAbWJbWZuN4Br38+EQ@mail.gmail.com>
     [not found]                 ` <CAHk-=wimM2kckaYj7spUJwehZkSYxK9RQqu3G392BE=73dyKtg@mail.gmail.com>
     [not found]                   ` <8bb582d2-2841-94eb-8862-91d1225d5ebc@MichaelLarabel.com>
     [not found]                     ` <CAHk-=wjqE_a6bpZyDQ4DCrvj_Dv2RwQoY7wN91kj8y-tZFRvEA@mail.gmail.com>
     [not found]                       ` <0cbc959e-1b8d-8d7e-1dc6-672cf5b3899a@MichaelLarabel.com>
     [not found]                         ` <CAHk-=whP-7Uw9WgWgjRgF1mCg+NnkOPpWjVw+a9M3F9C52DrVg@mail.gmail.com>
     [not found]                           ` <CAHk-=wjfw3U5eTGWLaisPHg1+jXsCX=xLZgqPx4KJeHhEqRnEQ@mail.gmail.com>
     [not found]                             ` <a2369108-7103-278c-9f10-6309a0a9dc3b@MichaelLarabel.com>
2020-09-12  7:28                               ` Kernel Benchmarking Amir Goldstein
2020-09-12 10:32                                 ` Michael Larabel
2020-09-12 14:37                                   ` Matthew Wilcox
2020-09-12 14:44                                     ` Michael Larabel
2020-09-15  3:32                                       ` Matthew Wilcox
2020-09-15 10:39                                         ` Jan Kara
2020-09-15 13:52                                           ` Matthew Wilcox
     [not found]                                     ` <658ae026-32d9-0a25-5a59-9c510d6898d5@MichaelLarabel.com>
2020-09-14 17:47                                       ` Linus Torvalds
2020-09-14 20:21                                         ` Matthieu Baerts [this message]
2020-09-14 20:53                                           ` Linus Torvalds
2020-09-15  0:42                                             ` Linus Torvalds
2020-09-15 15:34                                             ` Matthieu Baerts
2020-09-15 18:27                                               ` Linus Torvalds
2020-09-15 18:47                                                 ` Linus Torvalds
2020-09-15 19:26                                                   ` Matthieu Baerts
2020-09-15 19:32                                                     ` Linus Torvalds
2020-09-15 19:56                                                       ` Matthieu Baerts
2020-09-15 23:35                                                         ` Linus Torvalds
2020-09-16 10:34                                                           ` Jan Kara
2020-09-16 18:47                                                             ` Linus Torvalds
     [not found]                                                 ` <9a92bf16-02c5-ba38-33c7-f350588ac874@tessares.net>
2020-09-15 19:24                                                   ` Linus Torvalds
2020-09-15 19:38                                                     ` Matthieu Baerts
2020-09-15 18:31                                               ` Linus Torvalds
2020-09-15 14:21                                         ` Michael Larabel
2020-09-15 17:52                                           ` Linus Torvalds
2020-09-17 17:51                                         ` Linus Torvalds
2020-09-17 18:23                                           ` Matthew Wilcox
2020-09-17 18:30                                             ` Linus Torvalds
2020-09-17 18:50                                               ` Matthew Wilcox
2020-09-17 19:00                                                 ` Linus Torvalds
2020-09-17 19:27                                                   ` Matthew Wilcox
2020-09-17 19:47                                                     ` Linus Torvalds
2020-09-18  0:39                                                       ` Sedat Dilek
2020-09-18  0:40                                                         ` Sedat Dilek
2020-09-18 20:25                                                           ` Sedat Dilek
2020-09-20 17:06                                                             ` Linus Torvalds
2020-09-20 17:14                                                               ` Sedat Dilek
2020-09-20 17:40                                                                 ` Linus Torvalds
2020-09-20 18:00                                                                   ` Sedat Dilek
2020-09-20 23:23                                                       ` Dave Chinner
2020-09-20 23:31                                                         ` Linus Torvalds
2020-09-20 23:40                                                           ` Linus Torvalds
2020-09-21  1:20                                                           ` Dave Chinner
2020-09-12 15:53                                 ` Matthew Wilcox
2020-09-12 17:59                                 ` Linus Torvalds
2020-09-12 20:32                                   ` Rogério Brito
2020-09-14  9:33                                     ` Jan Kara
2020-09-12 20:58                                   ` Josh Triplett
2020-09-12 20:59                                   ` James Bottomley
2020-09-12 21:15                                     ` Linus Torvalds
2020-09-12 22:32                                   ` Matthew Wilcox
2020-09-13  0:40                                   ` Dave Chinner
2020-09-13  2:39                                     ` Linus Torvalds
2020-09-13  3:40                                       ` Matthew Wilcox
2020-09-13 23:45                                       ` Dave Chinner
2020-09-14  3:31                                         ` Matthew Wilcox
2020-09-15 14:28                                           ` Chris Mason
2020-09-15  9:27                                         ` Jan Kara
2020-09-13  3:18                                     ` Matthew Wilcox

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=c560a38d-8313-51fb-b1ec-e904bd8836bc@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=Michael@michaellarabel.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@google.com \
    --cc=willy@infradead.org \
    /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 NNTP newsgroup(s).