Re: [RFC PATCH] fs/exec: Add the support for ELF program's NUMA replication

From: Huang Shijie
Date: Wed Sep 08 2021 - 21:48:41 EST

On Mon, Sep 06, 2021 at 11:35:01AM +0200, David Hildenbrand wrote:
> On 06.09.21 18:16, Huang Shijie wrote:
> > This patch adds AT_NUMA_REPLICATION for execveat().
> >
> > If this flag is set, the kernel will trigger COW(copy on write)
> > on the mmapped ELF binary. So the program will have a copied-page
> > on its NUMA node, even if the original page in page cache is
> > on other NUMA nodes.
> Am I missing something important or is this just absolutely not what we
> want?

Please see the thread:

Linus did not think it is a good choice to implement the "per-numa node page cache"

> This means that for each and every invocation of the binary, we'll COW the
> complete binary -- an awful lot of wasted main memory and swap.
Only the one who cares about the performance in NUMA will use this interface.
Most of the people never use it..

Huang Shijie