mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
mm, page_alloc: use masks and shifts when converting GFP flags to migrate types
This patch redefines which GFP bits are used for specifying mobility and the order of the migrate types. Once redefined it's possible to convert GFP flags to a migrate type with a simple mask and shift. The only downside is that readers of OOM kill messages and allocation failures may have been used to the existing values but scripts/gfp-translate will help. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
46e700abc4
commit
016c13daa5
2 changed files with 8 additions and 6 deletions
|
@ -37,8 +37,8 @@
|
|||
|
||||
enum {
|
||||
MIGRATE_UNMOVABLE,
|
||||
MIGRATE_RECLAIMABLE,
|
||||
MIGRATE_MOVABLE,
|
||||
MIGRATE_RECLAIMABLE,
|
||||
MIGRATE_PCPTYPES, /* the number of types on the pcp lists */
|
||||
MIGRATE_RESERVE = MIGRATE_PCPTYPES,
|
||||
#ifdef CONFIG_CMA
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue