Re: [PATCH] String conversions for memory policy
From: Christoph Lameter
Date: Sat Jul 30 2005 - 13:00:35 EST
On Fri, 29 Jul 2005, Paul Jackson wrote:
> Oh - I should have mentioned this before - if you are displaying and
> parsing node lists (nodemask_t) then there are wrappers for these
> bitmap routines in linux/nodemask.h:
> * int nodemask_scnprintf(buf, len, mask) Format nodemask for printing
> * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask
> * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing
> * int nodelist_parse(buf, map) Parse ascii string as nodelist
> See nodemask.h for other such useful routines.
Hmmm. Would be great if we had a nodelist in the policy structure but it
is a zonelist instead and my conversion functions deal with zonelists and
not nodelists. Strangely mpol_new converts a node bit mask into a
list of zones.
As a consequence the zonelist always begins with zones of the lowest node.
Page allocation will therefore always fill up the lower nodes before going
to the higher nodes. Is this what we intended? I would have expected that
BIND would restrict to a set of nodes and then allocate locally on the
node the process is running on if possible. That is at least what I
gather from reading the documentation.
Maybe I do not fully understand what is going on here but this kind of
implementation for bind must be hurting performance of applications by
not allocating pages locally. It also puts extremely high
memory pressure on lower numbered nodes.
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/