iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Huaisheng Ye <yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	mhocko-IBi9RG/b67k@public.gmane.org,
	Nitin Gupta <ngupta-KNmc09w0p+Ednm+yROfE0A@public.gmane.org>,
	Sergey Senozhatsky
	<sergey.senozhatsky.work-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Huaisheng Ye <yehs1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org>,
	hehy1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	Minchan Kim <minchan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alexander.levin-H+0wwilmMs1BDgjK7y7TUQ@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-btrfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	chengnt-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	colyli-l3A5Bk7waGM@public.gmane.org,
	mgorman-3eNAlZScCAx27rWaFMvyedHuzzzSOjJt@public.gmane.org,
	vbabka-AlSwsSmVLrQ@public.gmane.org
Subject: Re: [RFC PATCH v2 10/12] mm/zsmalloc: update usage of address zone modifiers
Date: Tue, 22 May 2018 04:22:30 -0700	[thread overview]
Message-ID: <20180522112230.GA5412@bombadil.infradead.org> (raw)
In-Reply-To: <1526916033-4877-11-git-send-email-yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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)

	return (unsigned long)kmem_cache_alloc(pool->handle_cachep,
-			gfp & ~(__GFP_HIGHMEM|__GFP_MOVABLE));
+			gfp_normal(gfp));

  parent reply	other threads:[~2018-05-22 11:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 15:20 [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD Huaisheng Ye
2018-05-21 15:20 ` [RFC PATCH v2 01/12] include/linux/gfp.h: " Huaisheng Ye
2018-05-21 15:20 ` [RFC PATCH v2 02/12] arch/x86/kernel/amd_gart_64: update usage of address zone modifiers Huaisheng Ye
     [not found]   ` <1526916033-4877-3-git-send-email-yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-05-22  9:38     ` Christoph Hellwig
     [not found]       ` <20180522093806.GA25671-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2018-05-22 10:17         ` [External] " Huaisheng HS1 Ye
2018-05-21 15:20 ` [RFC PATCH v2 03/12] arch/x86/kernel/pci-calgary_64: " Huaisheng Ye
2018-05-21 15:20 ` [RFC PATCH v2 04/12] drivers/iommu/amd_iommu: " Huaisheng Ye
2018-05-21 15:20 ` [RFC PATCH v2 05/12] include/linux/dma-mapping: " Huaisheng Ye
     [not found]   ` <1526916033-4877-6-git-send-email-yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-05-21 15:30     ` Christoph Hellwig
2018-05-21 15:20 ` [RFC PATCH v2 10/12] mm/zsmalloc: " Huaisheng Ye
     [not found]   ` <1526916033-4877-11-git-send-email-yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-05-22 11:22     ` Matthew Wilcox [this message]
     [not found]       ` <20180522112230.GA5412-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2018-05-22 11:51         ` [External] " Huaisheng HS1 Ye
2018-05-21 15:20 ` [RFC PATCH v2 11/12] include/linux/highmem: update usage of movableflags Huaisheng Ye
2018-05-21 15:20 ` [RFC PATCH v2 12/12] arch/x86/include/asm/page.h: " Huaisheng Ye
     [not found] ` <1526916033-4877-1-git-send-email-yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-05-22  9:40   ` [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD Christoph Hellwig
2018-05-22 18:37 ` Michal Hocko
     [not found]   ` <20180522183728.GB20441-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2018-05-23 16:07     ` [External] " Huaisheng HS1 Ye
2018-05-24 12:18       ` Michal Hocko
     [not found]         ` <20180524121853.GG20441-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2018-05-25  9:43           ` Huaisheng HS1 Ye
     [not found]             ` <HK2PR03MB1684ED6EC6859A88A196DC0C92690-LG58XzHXFHAzM6+avpAIg682SN/2zMuYvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-05-28 13:37               ` Michal Hocko
     [not found]                 ` <20180528133733.GF27180-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2018-05-30  9:02                   ` Huaisheng HS1 Ye
     [not found]                     ` <HK2PR03MB1684C44F2408F3927B1A21BC926C0-LG58XzHXFHAzM6+avpAIg682SN/2zMuYvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-05-30  9:11                       ` Christoph Hellwig
2018-05-30  9:12                       ` Michal Hocko
2018-05-24  5:19     ` Matthew Wilcox
     [not found]       ` <20180524051919.GA9819-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2018-05-24 12:23         ` Michal Hocko
2018-05-24 15:18           ` Matthew Wilcox
2018-05-24 15:29             ` Michal Hocko
2018-05-25 12:00               ` Matthew Wilcox
2018-05-28 13:33                 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180522112230.GA5412@bombadil.infradead.org \
    --to=willy-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=alexander.levin-H+0wwilmMs1BDgjK7y7TUQ@public.gmane.org \
    --cc=chengnt-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org \
    --cc=colyli-l3A5Bk7waGM@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hehy1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-btrfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=mgorman-3eNAlZScCAx27rWaFMvyedHuzzzSOjJt@public.gmane.org \
    --cc=mhocko-IBi9RG/b67k@public.gmane.org \
    --cc=minchan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=ngupta-KNmc09w0p+Ednm+yROfE0A@public.gmane.org \
    --cc=sergey.senozhatsky.work-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=vbabka-AlSwsSmVLrQ@public.gmane.org \
    --cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org \
    --cc=yehs1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org \
    --cc=yehs2007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).