[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjAPEs3HRGswJ-AE1R048j2MBsBtMfg3GOsaFykHoeKsg@mail.gmail.com>
Date: Wed, 1 Sep 2021 10:29:01 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Shijie Huang <shijie@...eremail.onmicrosoft.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>,
"Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Frank Wang <zwang@...erecomputing.com>
Subject: Re: Is it possible to implement the per-node page cache for programs/libraries?
On Wed, Sep 1, 2021 at 10:24 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> But what you could do, if you wanted to, would be to catch the
> situation where you have lots of expensive NUMA accesses either using
> our VM infrastructure or performance counters, and when the mapping is
> a MAP_PRIVATE you just do a COW fault on them.
>
> Sounds entirely doable, and has absolutely nothing to do with the page
> cache. It would literally just be an "over-eager COW fault triggered
> by NUMA access counters".
Note how it would work perfectly fine for anonymous mappings too. Just
to reinforce the point that this has nothing to do with any page cache
issues.
Of course, if you want to actually then *share* pages within a node
(rather than replicate them for each process), that gets more
exciting.
But I suspect that this is mainly only useful for long-running big
processes (not least due to that node binding thing), so I question
the need for that kind of excitement.
Linus
Powered by blists - more mailing lists