[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whr2Aio3R49TVWqW3es6heyxXDuxGHcv8Bcc=_kw4vDeQ@mail.gmail.com>
Date: Mon, 5 Nov 2018 10:35:31 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: yang.shi@...ux.alibaba.com
Cc: rong.a.chen@...el.com, vbabka@...e.cz,
kirill.shutemov@...ux.intel.com, mhocko@...nel.org,
Matthew Wilcox <willy@...radead.org>,
ldufour@...ux.vnet.ibm.com,
Andrew Morton <akpm@...ux-foundation.org>,
Colin King <colin.king@...onical.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
lkp@...org
Subject: Re: [LKP] [mm] 9bc8039e71: will-it-scale.per_thread_ops -64.1% regression
On Mon, Nov 5, 2018 at 10:28 AM Yang Shi <yang.shi@...ux.alibaba.com> wrote:
>
> Actually, the commit is mainly for optimizing the long stall time caused
> by holding mmap_sem by write when unmapping or shrinking large mapping.
> It downgrades write mmap_sem to read when zapping pages. So, it looks
> the downgrade incurs more context switches. This is kind of expected.
>
> However, the test looks just shrink the mapping with one normal 4K page
> size. It sounds the overhead of context switches outpace the gain in
> this case at the first glance.
I'm not seeing why there should be a context switch in the first place.
Even if you have lots of concurrent brk() users, they should all block
exactly the same way as before (a write lock blocks against a write
lock, but it *also* blocks against a downgraded read lock).
So no, I don't want just some limit to hide this problem for that
particular test. There's something else going on.
Linus
Powered by blists - more mailing lists