Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2187542imm; Sat, 12 May 2018 07:23:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrgcoXO8KH0eQHZumATVZex4rAeonEUyat5jKXgM8Pt1ZJ0ZPplYifVXYHM5Q591S7HQQWj X-Received: by 2002:a17:902:b286:: with SMTP id u6-v6mr2711332plr.68.1526135003934; Sat, 12 May 2018 07:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526135003; cv=none; d=google.com; s=arc-20160816; b=Jqz54gJ/io65Dp/Nh9F9NbaaQDcp7/N6rb7SYMUpKQF6XAfXBrrSzMG+Vv6yaxX75z g7Vy2/kCPUSq/CimgKgSaAqrmH7LOxmy31DVy8vEbD6nzQEfcG2RLJHKTwbz8cUO1oRW SLr53Q5EAVkOIyhHgj1DufJw5ceZynHATeAl5pFTM1EwGUU7qpfuf097m1KAIDlERxDa UfI9oXVYbIkgJ5E8xx2UB5NB1pTw7418f5rXdxOh+y7bU7YGZtJtE1Gscn+VU69kEwbg wTy/OJ4dkPBnV8/kc6DRLKIo30IzakmraOv1xtwTkkwQxkcMp/tUNbVfhY9djbWEihVo nlxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=UYN8nj+DvsSt5mGCGIMHkVGOSep08k1Eo8AOt7rB2Z4=; b=tCK9BbU+1U9atSjJO256xUMpcGH+oQBFmAbHoATPWhNtUTkhKUPHbg/lHuzy7XZk+1 0aoGXJF+EjNOVq+GoeUEHkvR3WB+8ggUfL7OZIvogNCx2zNbCLuAqKPaxSqarHyhAWi9 wkCcyioz5qKQEYJd4ysABx6FHSjLAgCp9Y+B6OvcCwP4gv5QJjG3x8B/0/ySXJnV98Cy wEJoc2A4pe+k7FQz/aF2OX1QOdoMzhF3qFKBy2uc//i3MMWmDSuzWKxtBWL4DgHfNXGX yp9zltTgqvnUPXohLu6nfE4zDZidQAyl90PzdNrs4ztPIqEYd60hGymFsjA8+opFBsmh /tmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeQTXysH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4-v6si4424839pgs.544.2018.05.12.07.23.08; Sat, 12 May 2018 07:23:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeQTXysH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbeELOW5 (ORCPT + 99 others); Sat, 12 May 2018 10:22:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35496 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbeELOW4 (ORCPT ); Sat, 12 May 2018 10:22:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UYN8nj+DvsSt5mGCGIMHkVGOSep08k1Eo8AOt7rB2Z4=; b=UeQTXysH0P+kZlS15RNys9Lxj RxAYUp/ab8aOZev/HzkAKyppci9s5/B4IV1NhOdksZ5o5MV3ujxSz6OEr0j/xqnHzmpHvXW09GcQk 4CV0pcAMqgtkta63eD2Db9NduEzg4+DCOHwCBPDNphgvireEAX+HPAkEi2LipJzPfS0GnYG+kuH0N 66Jkqi5lhKmIBOQTggeIWmR0GUGV/MJh11C/+gARJreQW71+gNoebuliSzxvK7lN+OSP2f+IXTE1X bdsIQfA1/j8ya2JQVc3TAenkX9o/H5oLAQLNPxc/YAU5jldLwjDq8yYiUCaC7JCVU10xvzZpO93ly ZDtUai4dA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fHVQ9-0001NE-Ol; Sat, 12 May 2018 14:22:49 +0000 Date: Sat, 12 May 2018 07:22:49 -0700 From: Matthew Wilcox To: Huaisheng HS1 Ye Cc: "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "mhocko@suse.com" , "vbabka@suse.cz" , "mgorman@techsingularity.net" , "alexander.levin@verizon.com" , "colyli@suse.de" , NingTing Cheng , "linux-kernel@vger.kernel.org" Subject: Re: [External] Re: [PATCH v1] include/linux/gfp.h: getting rid of GFP_ZONE_TABLE/BAD Message-ID: <20180512142249.GA24215@bombadil.infradead.org> References: <1525968625-40825-1-git-send-email-yehs1@lenovo.com> <20180510163023.GB30442@bombadil.infradead.org> <20180511132613.GA30263@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 12, 2018 at 11:35:00AM +0000, Huaisheng HS1 Ye wrote: > > The point of this exercise is to actually encode the zone number in > > the bottom bits of the GFP flags instead of something which has to be > > interpreted into a zone number. When somebody sets __GFP_MOVABLE, they > > should also be setting ZONE_MOVABLE: > > > > -#define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* ZONE_MOVABLE allowed */ > > +#define __GFP_MOVABLE ((__force gfp_t)(___GFP_MOVABLE | (ZONE_MOVABLE ^ ZONE_NORMAL))) > > > I am afraid we couldn't do that, because __GFP_MOVABLE would be used potentially with other __GFPs like __GFP_DMA and __GFP_DMA32. That's not a combination that makes much sense. I know it's permitted today (and it has the effect of being a no-op), but when you think about it, it doesn't actually make any sense.