[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [External] Re: [RFC PATCH v2 10/12] mm/zsmalloc: update usage of address zone modifiers
- To: Matthew Wilcox <willy@xxxxxxxxxxxxx>
- From: Huaisheng HS1 Ye <yehs1@xxxxxxxxxx>
- Date: Tue, 22 May 2018 11:51:52 +0000
- Accept-language: zh-CN, en-US
- Cc: "kstewart@xxxxxxxxxxxxxxxxxxx" <kstewart@xxxxxxxxxxxxxxxxxxx>, "mhocko@xxxxxxxx" <mhocko@xxxxxxxx>, Nitin Gupta <ngupta@xxxxxxxxxx>, Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>, Ocean HY1 He <hehy1@xxxxxxxxxx>, "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>, Minchan Kim <minchan@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "alexander.levin@xxxxxxxxxxx" <alexander.levin@xxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "linux-btrfs@xxxxxxxxxxxxxxx" <linux-btrfs@xxxxxxxxxxxxxxx>, NingTing Cheng <chengnt@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "colyli@xxxxxxx" <colyli@xxxxxxx>, "mgorman@xxxxxxxxxxxxxxxxxxx" <mgorman@xxxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, "vbabka@xxxxxxx" <vbabka@xxxxxxx>, Huaisheng Ye <yehs2007@xxxxxxxxx>
- Delivery-date: Tue, 22 May 2018 11:52:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
- Thread-index: AQHT8b9DoOXdhzUIpUaN8xeL4SalZqQ7okCA
- Thread-topic: [External] Re: [RFC PATCH v2 10/12] mm/zsmalloc: update usage of address zone modifiers
From: owner-linux-mm@xxxxxxxxx On Behalf Of Matthew Wilcox
>
> On Mon, May 21, 2018 at 11:20:31PM +0800, Huaisheng Ye wrote:
> > @@ -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);
> > }
>
> This should be & ~GFP_ZONEMASK
>
> Actually, we should probably have a function to clear those bits rather
> than have every driver manipulating the gfp mask like this. Maybe
>
> #define gfp_normal(gfp) ((gfp) & ~GFP_ZONEMASK)
Good idea!
>
> return (unsigned long)kmem_cache_alloc(pool->handle_cachep,
> - gfp & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
> + gfp_normal(gfp));
Sincerely,
Huaisheng Ye
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|