Re: NUMA policy interface

Andi Kleen
2005-08-04T21:41:32Z

On Thu, Aug 04, 2005 at 02:21:09PM -0700, Christoph Lameter wrote:
> Yes he mentioned that patch earlier in this thread.
>
> > > 5. No means to figure out where the memory was allocated although
> > > mempoliy.c implements scans over ptes that would allow that
> > > determination.
> >
> > You lost me here.
>
> There is this scan over the page table that verifies if all nodes are
> allocated according to the policy. That scan could easily be used to
> provide a map to the application (and to /proc/<pid>/smap) of where the

The application can already get it. But it's an ugly feature
that I only used for debugging and I was actually considering
to remove it.

Doing it for external users is a completely different thing though.
I still think those have business in messing with other people's
virtual addresses. In addition I expect it will cause problems
longer term
(did you ever look why mmap on /proc/*/mem is not allowed - it used
to be long ago, but it was impossible to make it work race free and
before that was always a gapping security hole)

> > > The long term impact of this missing functionality is already showing
> > > in the numbers of workarounds that I have seen at a various sites,
> >
> > Examples?
>
> Two of the high profile ones are NASA and APA. One person from the APA
> posted in one of our earlier discussions.

Ok. I think for those the swapoff per process is the right because
simplest and easiest solution. No complex patch sets needed,
just some changes to an existing code path.

If they cannot afford enough disk space it might be possible
to do the page migration in swap cache like Hugh proposed.

-Andi