linux-numa.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] hugetlb: V3 constrain allocation/free based on task mempolicy
@ 2009-07-29 17:54 Lee Schermerhorn
  2009-07-29 17:54 ` [PATCH 1/4] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Lee Schermerhorn @ 2009-07-29 17:54 UTC (permalink / raw)
  To: linux-mm, linux-numa
  Cc: akpm, Mel Gorman, Nishanth Aravamudan, andi, David Rientjes,
	Adam Litke, Andy Whitcroft, eric.whitney

PATCH 0/4 hugetlb: constrain allocation/free based on task mempolicy

I'm sending these out again, slightly revised, for comparison
with a 3rd alternative for controlling where persistent huge
pages are allocated which I'll send out as a separate series.

Against:  2.6.31-rc3-mmotm-090716-1432
atop previously submitted "alloc_bootmem_huge_pages() fix"
[http://marc.info/?l=linux-mm&m=124775468226290&w=4]

This is V3 of a series of patches to constrain the allocation and
freeing of persistent huge pages using the task NUMA mempolicy of
the task modifying "nr_hugepages".  This series is based on Mel
Gorman's suggestion to use task mempolicy.  One of the benefits
of this method is that it does not *require* modification to
hugeadm(8) to use this feature.

V3 factors the "rework" of the hstate_next_node_to_{alloc|free}
functions out of the patch to derive huge pages nodes_allowed
from mempolicy, and moves it before the patch to add nodemasks
to the alloc/free functions.  See patch patch 1/4.

A couple of limitations [still] in this version:

1) I haven't implemented a boot time parameter to constrain the
   boot time allocation of huge pages.  This can be added if
   anyone feels strongly that it is required.

2) I have not implemented a per node nr_overcommit_hugepages as
   David Rientjes and I discussed earlier.  Again, this can be
   added and specific nodes can be addressed using the mempolicy
   as this series does for allocation and free.  However, after
   some experience with the libhugetlbfs test suite, specifically
   attempting to run the test suite constrained by mempolicy and
   a cpuset, I'm thinking that per node overcommit limits might
   not be such a good idea.  This would require an application
   [or the library] to sum the per node limits over the allowed
   nodes and possibly compare to global limits to determine the
   available resources.  Per cpuset limits might work better.
   This are requires more investigation, but this patch series
   doesn't seem to make things worse than they already are in
   this regard.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/4] hugetlb: V1 Per Node Hugepages attributes
@ 2009-07-29 18:11 Lee Schermerhorn
  2009-07-29 18:11 ` [PATCH 1/4] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn
  0 siblings, 1 reply; 13+ messages in thread
From: Lee Schermerhorn @ 2009-07-29 18:11 UTC (permalink / raw)
  To: linux-mm, linux-numa
  Cc: akpm, Mel Gorman, Greg KH, Nishanth Aravamudan, andi,
	David Rientjes, Adam Litke, Andy Whitcroft, eric.whitney

PATCH/RFC 0/4  V1 Add Per Node Hugepages Attributes

Against:  2.6.31-rc3-mmotm-090716-1432
atop the previously posted alloc_bootmem_hugepages fix.
[http://marc.info/?l=linux-mm&m=124775468226290&w=4]

This is V1 of a third alternative for controlling allocation of
persistent huge pages on a NUMA system.  [Prior alternatives were
separate "hugepages_nodes_allowed" mask and mempolicy-based mask.]
This series implements a per node, per huge pages size, read/write
attribute--nr_hugepages--to query and modify the persistent huge
pages on a specific node.  The series also implements read only
attributes to query free_huge_pages and surplus_free_pages.

This implementation continues to pass the libhugetlbfs functional test
suite.

Some issues/limitations with this series:

1) The series includes a rework/cleanup patch from the "mempolicy-
   based" huge pages series.  I think this rework is worth doing
   which ever method we chose for controlling per node huge pages.

2) The series extends the struct kobject with a private bit field
   to aid the correlation of kobjects with the global or per node
   hstate attributes.  This is not absolutely required, but did 
   simplify the back mapping of kobjects to subsystem objects.

3) The reserved and overcommit counts remain global.  This seems to
   be the most straightforward usage, even in the context of per node
   persistent huge page attributes.  Global reserve and overcommit
   values allow mempolicy to be applied to the huge page allocation
   to satisfy a page fault.  [Some work appears to be needed in
   the per cpuset overcommit limit and reserve accounting, but
   outside of the scope of this series.]

4) This series does not implement a boot command line parameter to
   control per node allocations.  This could be added if needed.

5) Using this method--per node attributes--to control persistent
   huge page allocation will require enhancments to hugeadm, 
   including a new command line syntax for specifying specific
   nodes if we wish to avoid direct accessing of the attributes.

6) I have yet to update the hugetlbfs doc for this alternative.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-07-31 18:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 17:54 [PATCH 0/4] hugetlb: V3 constrain allocation/free based on task mempolicy Lee Schermerhorn
2009-07-29 17:54 ` [PATCH 1/4] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn
2009-07-30 10:40   ` Mel Gorman
2009-07-29 17:55 ` [PATCH 2/4] hugetlb: add nodemask arg to huge page alloc, free and surplus adjust fcns Lee Schermerhorn
2009-07-30 10:49   ` Mel Gorman
2009-07-29 17:55 ` [PATCH 3/4] hugetlb: derive huge pages nodes allowed from task mempolicy Lee Schermerhorn
2009-07-30 11:15   ` Mel Gorman
2009-07-31 18:49     ` Lee Schermerhorn
2009-07-29 17:55 ` [PATCH 4/4] hugetlb: update hugetlb documentation for mempolicy based management Lee Schermerhorn
2009-07-30 11:18 ` [PATCH 0/4] hugetlb: V3 constrain allocation/free based on task mempolicy Mel Gorman
2009-07-30 14:07   ` Lee Schermerhorn
2009-07-30 14:15     ` Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2009-07-29 18:11 [PATCH 0/4] hugetlb: V1 Per Node Hugepages attributes Lee Schermerhorn
2009-07-29 18:11 ` [PATCH 1/4] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).