linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <shijie@os.amperecomputing.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>,
	Shijie Huang <shijie@amperemail.onmicrosoft.com>,
	"Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Frank Wang <zwang@amperecomputing.com>
Subject: Re: Is it possible to implement the per-node page cache for programs/libraries?
Date: Mon, 6 Sep 2021 09:56:17 +0000	[thread overview]
Message-ID: <YTXlwbjtAKBd5O4q@hsj> (raw)
In-Reply-To: <CAHk-=whCf1PAs7D0oGwVLfuJYxCcKeb3ApTF8E+PHGNJE7UW+w@mail.gmail.com>

Hi Linus,
On Fri, Sep 03, 2021 at 12:08:03PM -0700, Linus Torvalds wrote:
> On Fri, Sep 3, 2021 at 12:02 PM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > Was there a reason you chose to do it that way instead of having per-node
> > i_mapping pointers?
> 
> You can't have per-node i_mapping pointers without huge coherence issues.
> 
> If you don't care about coherence, that's fine - but that has to be a
> user-space decision (ie "I will just replicate this file").
> 
> You can't just have the kernel decide "I'll map this set of pages on
> this node, and that other ser of pages on that other node", in case
> there's MAP_SHARED things going on.
> 
> Anyway, I think very fundamentally this is one of those things where
> 99.9% of all people don't care, and DO NOT WANT the complexity.
> 
> And the 0.1% that _does_ care really could and should do this in user
> space, because they know they care.
> 
> Asking the kernel to do complex things in critical core functions for
> something that is very very rare and irrelevant to most people, and
> that can and should just be done in user space for the people who care
> is the wrong approach.
> 
> Because the question here really should be "is this truly important,
> and does this need kernel help because user space simply cannot do it
> itself".
> 
> And the answer is a fairly simple "no".
Okay.

Thanks for confirming this.

Thanks
Huang Shijie

  reply	other threads:[~2021-09-06  1:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  3:07 Is it possible to implement the per-node page cache for programs/libraries? Shijie Huang
2021-09-01  2:09 ` Barry Song
2021-09-01  3:25 ` Matthew Wilcox
2021-09-01 13:30   ` Huang Shijie
2021-09-01 14:25     ` Huang Shijie
2021-09-01 11:32       ` Matthew Wilcox
2021-09-01 23:58       ` Matthew Wilcox
2021-09-02  0:15         ` Barry Song
2021-09-02  1:13           ` Linus Torvalds
2021-09-02 10:16         ` Huang Shijie
2021-09-02  3:25   ` Nicholas Piggin
2021-09-02 10:17     ` Matthew Wilcox
2021-09-03  7:10       ` Nicholas Piggin
2021-09-03 19:01         ` Matthew Wilcox
2021-09-03 19:08           ` Linus Torvalds
2021-09-06  9:56             ` Huang Shijie [this message]
2021-09-03 23:42           ` Nicholas Piggin
2021-09-01  4:55 ` Al Viro
2021-09-01 13:10   ` Huang Shijie
2021-09-01 17:24   ` Linus Torvalds
2021-09-01 17:29     ` Linus Torvalds
2021-09-01 22:56       ` Barry Song
2021-09-02 10:12         ` Huang Shijie
2021-09-02 10:08       ` Huang Shijie

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=YTXlwbjtAKBd5O4q@hsj \
    --to=shijie@os.amperecomputing.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=shijie@amperemail.onmicrosoft.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    --cc=zwang@amperecomputing.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
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).