diff options
author | Mel Gorman <[email protected]> | 2021-04-29 23:01:45 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-04-30 11:20:43 -0700 |
commit | 387ba26fb1cb9be9e35dc14a6d97188e916eda05 (patch) | |
tree | 179d9525438b16f795ba865b02a7052151219990 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | cb66bede617581309883432e9a633e8cade2a36e (diff) |
mm/page_alloc: add a bulk page allocator
This patch adds a new page allocator interface via alloc_pages_bulk, and
__alloc_pages_bulk_nodemask. A caller requests a number of pages to be
allocated and added to a list.
The API is not guaranteed to return the requested number of pages and
may fail if the preferred allocation zone has limited free memory, the
cpuset changes during the allocation or page debugging decides to fail
an allocation. It's up to the caller to request more pages in batch if
necessary.
Note that this implementation is not very efficient and could be
improved but it would require refactoring. The intent is to make it
available early to determine what semantics are required by different
callers. Once the full semantics are nailed down, it can be refactored.
[[email protected]: fix alloc_pages_bulk() return type, per Matthew]
Link: https://lkml.kernel.org/r/[email protected]
[[email protected]: fix uninit var warning]
Link: https://lkml.kernel.org/r/[email protected]
[[email protected]: fix comment, per Vlastimil]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mel Gorman <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Alexander Lobakin <[email protected]>
Tested-by: Colin Ian King <[email protected]>
Cc: Alexander Duyck <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Chuck Lever <[email protected]>
Cc: David Miller <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Jesper Dangaard Brouer <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions