mm, gfp: escalatedly define GFP_HIGHUSER and GFP_HIGHUSER_MOVABLE
Subsystems (3)
PATCH 1/1 mm, gfp: escalatedly define GFP_HIGHUSER and GFP_HIGHUSER_MOVABLE
GFP_USER, GFP_HIGHUSER and GFP_HIGHUSER_MOVABLE are escalatedly confined defined, also implied by their names:
GFP_USER = GFP_USER GFP_USER + __GFP_HIGHMEM = GFP_HIGHUSER GFP_USER + __GFP_HIGHMEM + __GFP_MOVABLE = GFP_HIGHUSER_MOVABLE
So just make GFP_HIGHUSER and GFP_HIGHUSER_MOVABLE escalatedly defined to reflect this fact. It also makes the definition clear and texturally warn on any furture break-up of this escalated relastionship.
--- include/linux/gfp.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
include/linux/gfp.h +2 -5
@@ -110,11 +110,8 @@ struct vm_area_struct;#define GFP_TEMPORARY (__GFP_WAIT | __GFP_IO | __GFP_FS | \ __GFP_RECLAIMABLE)#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) -#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \ - __GFP_HIGHMEM) -#define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ - __GFP_HARDWALL | __GFP_HIGHMEM | \ - __GFP_MOVABLE) +#define GFP_HIGHUSER (GFP_USER | __GFP_HIGHMEM) +#define GFP_HIGHUSER_MOVABLE (GFP_HIGHUSER | __GFP_MOVABLE)#define GFP_IOFS (__GFP_IO | __GFP_FS)#define GFP_TRANSHUGE (GFP_HIGHUSER_MOVABLE | __GFP_COMP | \ __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \
Signature · 7 lines
2.0.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Jianyu Zhan
GFP_USER,GFP_HIGHUSERandGFP_HIGHUSER_MOVABLEare escalatedly confined defined, also implied by their names:GFP_USER = GFP_USER GFP_USER + __GFP_HIGHMEM = GFP_HIGHUSER GFP_USER + __GFP_HIGHMEM + __GFP_MOVABLE = GFP_HIGHUSER_MOVABLE
Quoted 5 lines
So just make
GFP_HIGHUSERandGFP_HIGHUSER_MOVABLEescalatedly defined to reflect this fact. It also makes the definition clear and texturally warn on any furture break-up of this escalated relastionship.Signed-off-by Jianyu Zhan <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Jianyu Zhan
GFP_USER,GFP_HIGHUSERandGFP_HIGHUSER_MOVABLEare escalatedly confined defined, also implied by their names:GFP_USER = GFP_USER GFP_USER + __GFP_HIGHMEM = GFP_HIGHUSER GFP_USER + __GFP_HIGHMEM + __GFP_MOVABLE = GFP_HIGHUSER_MOVABLE
Looks reasonable.
But I would prefer to have GPF_HIGHUSER movable by default and GFP_HIGHUSER_UNMOVABLE to opt out.
Signature · 7 lines
Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Jianyu Zhan
GFP_USER,GFP_HIGHUSERandGFP_HIGHUSER_MOVABLEare escalatedly confined defined, also implied by their names:GFP_USER = GFP_USER GFP_USER + __GFP_HIGHMEM = GFP_HIGHUSER GFP_USER + __GFP_HIGHMEM + __GFP_MOVABLE = GFP_HIGHUSER_MOVABLE
Quoted 5 lines
So just make
GFP_HIGHUSERandGFP_HIGHUSER_MOVABLEescalatedly defined to reflect this fact. It also makes the definition clear and texturally warn on any furture break-up of this escalated relastionship.Signed-off-by Jianyu Zhan <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · Kirill A. Shutemov
But I would prefer to have
GPF_HIGHUSERmovable by default andGFP_HIGHUSER_UNMOVABLEto opt out.
Sounds like a separate patch.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · David Rientjes
Quoted 3 lines · Kirill A. Shutemov
But I would prefer to have
GPF_HIGHUSERmovable by default andGFP_HIGHUSER_UNMOVABLEto opt out.Sounds like a separate patch.
There are few questions before preparing patch:
1. Compatibility: some code which is not yet in tree can rely on non-movable behaviour of GFP_HIGHUSER. How would we handle this? Should we invent new name for the movable GFP_HIGHUSER?
2. Should GFP_USER be movable too? And the same compatibility question here.
3. Do we need a separate define for non-movable GPF_HIGHUSER or caller should use something like GPF_HIGHUSER & ~__GFP_MOVABLE?
4. Is there a gain, taking into account questions above?
Signature · 7 lines
Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>