Re: [PATCH 0/2] mm: memory policy for page cache allocation

From: Andi Kleen
Date: Thu Sep 23 2004 - 04:12:13 EST


> (1) We dropped the MPOL_ROUNDROBIN patch. Instead, we
> use MPOL_INTERLEAVE to spread pages across nodes.
> However, rather than use the file offset etc to
> calculate the node to allocate the page on, I used
> the same mechanism you used in alloc_pages_current()
> to calculate the node number (interleave_node()).
> That eliminates the need to generate an offset etc
> in the routines that call page_cache_alloc() and to
> me appears to be a simpler change that still fits
> within your design.


Hmm, that may lead to uneven balancing because the counter is
per thread. But if it works for you it's ok I guess.

I still think changing the callers and use the offset for
static interleaving would be better. Maybe that could be
done as a followon patch.
>
> (2) I implemented the sys_set_mempolicy() changes as
> suggested -- higher order bits in the mode (first)
> argument specify whether or not this request is for
> the page allocation policy (your existing policy)
> or for the page cache allocation policy. Similarly,
> a bit there indicates whether or not we want to set
> the process level policy or the system level policy.
>
> These bits are to be set in the flags argument of
> sys_mbind().

Ok. If that gets in I would suggest you also document it
in the manpages and send me a patch.

Comments to the patches in other mail.

-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/