lkml.org 
[lkml]   [2021]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is it possible to implement the per-node page cache for programs/libraries?
On Wed, Sep 01, 2021 at 02:25:34PM +0000, Huang Shijie wrote:
> On Wed, Sep 01, 2021 at 01:30:45PM +0000, Huang Shijie wrote:
> > On Wed, Sep 01, 2021 at 04:25:01AM +0100, Matthew Wilcox wrote:
> > > On Wed, Sep 01, 2021 at 11:07:41AM +0800, Shijie Huang wrote:
> > > > In the NUMA, we only have one page cache for each file. For the
> > > > program/shared libraries, the
> > > > remote-access delays longer then the local-access.
> > > >
> > > > So, is it possible to implement the per-node page cache for
> > > > programs/libraries?
> > >
> > > At this point, we have no way to support text replication within a
> > > process. So what you're suggesting (if implemented) would work for
> >
> > I created a glibc patch which can do the text replication within a process.
> The "text replication" means the shared libraries, not program itself.

Thinking about it some more, if you're ok with it only being shared
libraries, you can do this:

for i in `seq 0 3`; do \
cp --reflink=always /lib/x86_64-linux-gnu/libc.so.6 \
/lib/x86_64-linux-gnu/libc.so.6.numa$i; \
done

Reflinked files don't share page cache, so you can do this all in
userspace with no kernel changes.

\
 
 \ /
  Last update: 2021-09-02 02:01    [W:1.057 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site