[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1526916033-4877-11-git-send-email-yehs2007@gmail.com>
Date: Mon, 21 May 2018 23:20:31 +0800
From: Huaisheng Ye <yehs2007@...il.com>
To: akpm@...ux-foundation.org, linux-mm@...ck.org
Cc: mhocko@...e.com, willy@...radead.org, vbabka@...e.cz,
mgorman@...hsingularity.net, kstewart@...uxfoundation.org,
alexander.levin@...izon.com, gregkh@...uxfoundation.org,
colyli@...e.de, chengnt@...ovo.com, hehy1@...ovo.com,
linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
xen-devel@...ts.xenproject.org, linux-btrfs@...r.kernel.org,
Huaisheng Ye <yehs1@...ovo.com>,
Minchan Kim <minchan@...nel.org>,
Nitin Gupta <ngupta@...are.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: [RFC PATCH v2 10/12] mm/zsmalloc: update usage of address zone modifiers
From: Huaisheng Ye <yehs1@...ovo.com>
Use __GFP_ZONE_MOVABLE to replace (__GFP_HIGHMEM | __GFP_MOVABLE).
___GFP_DMA, ___GFP_HIGHMEM and ___GFP_DMA32 have been deleted from GFP
bitmasks, the bottom three bits of GFP mask is reserved for storing
encoded zone number.
__GFP_ZONE_MOVABLE contains encoded ZONE_MOVABLE and __GFP_MOVABLE flag.
With GFP_ZONE_TABLE, __GFP_HIGHMEM ORing __GFP_MOVABLE means gfp_zone
should return ZONE_MOVABLE. In order to keep that compatible with
GFP_ZONE_TABLE, replace (__GFP_HIGHMEM | __GFP_MOVABLE) with
__GFP_ZONE_MOVABLE.
Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Nitin Gupta <ngupta@...are.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
---
mm/zsmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index c301350..06b2902 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -343,7 +343,7 @@ static void destroy_cache(struct zs_pool *pool)
static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)
{
return (unsigned long)kmem_cache_alloc(pool->handle_cachep,
- gfp & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
+ gfp & ~__GFP_ZONE_MOVABLE);
}
static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
@@ -354,7 +354,7 @@ static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
static struct zspage *cache_alloc_zspage(struct zs_pool *pool, gfp_t flags)
{
return kmem_cache_alloc(pool->zspage_cachep,
- flags & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
+ flags & ~__GFP_ZONE_MOVABLE);
}
static void cache_free_zspage(struct zs_pool *pool, struct zspage *zspage)
--
1.8.3.1
Powered by blists - more mailing lists