Andi wrote:
> No - i mean a quick check if the cpuset allows all nodes
> for memory allocation.
Good - I think I've already done what you're suggesting, then.
You comment would pertain to the cpuset_zone_allowed() call in
mm/page_alloc.c __alloc_pages(), not to the routine we are
discussing here - cpuset_update_task_memory_state().
There are two key cpuset hooks in the page allocation code path:
1) cpuset_update_task_memory_state() - which transfers
changes in the tasks cpuset (where we need locking
to read) into the task->mems_allowed nodemask (where
the task can look w/o locks).
2) cpuset_zone_allowed() - which checks each zone examined
in the page_alloc() loops to see if it is on an allowed
node.
The first of these was the primary victim of my patches today,
reducing the cost using RCU, and just now removing the NULL
cpuset check that was only needed during init.
The first of these is called once each page allocation, from
a couple of spots in mm/mempolicy.c. The second of these is
called from within (now beneath) __alloc_pages(), once each
zone that is considered for providing the requested pages.
==
The second of these was already short circuited, using inline
code as you recommend, in a patch a couple of days ago (I forgot
to cc you directly on the patch, so sent you a separate message
pointing to those patches).
For that one, see the number_of_cpusets global kernel counter, in the
*-mm patch:
cpuset_number_of_cpusets_optimization
It enables short circuiting with inline code this other key routine
on the memory allocation path: cpuset_zone_allowed().
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]