Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3387544imm; Fri, 25 May 2018 05:01:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUQ6Pe3zRf9F3IFfCaAwmcqf5QZDzhSJ1o4fnnDa3Y9TPmj8a18iZEvUAHhbyWaK0Jz+NU X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr2288882plt.378.1527249679964; Fri, 25 May 2018 05:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527249679; cv=none; d=google.com; s=arc-20160816; b=XxtioX0ebq4w/yCzws0NHObR9svgICuP9OmQzFulvUqxi+0ep5zWOKC4rP7ZPHKFFP cfN/z02F0tBD97xMdlJw5IrzEJjkjDKUCFyIBcm1ib9ze4XFv37p2KrbUkDd4IACiMmS 6/BxjAcrRjG5Yh2Ua+LAiiWwqrXUIMz0Cg43Ya0uVDPKu18wYLSe9xuaH9m6WNOceefq PKI/tPrG5V655Ut1A1c9LTVcOYbWU6RNeENvkKf75GPTD4UJPX92pLFfgdLoA/MRr//8 DGa4MTWZwedKG2sjXPpnDBAruoni3gebG4sHR1AbprD1NQZ2hO88IP3V93kS6pmVxU4c 3Wlw== 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=CGjK03lQxUUocmfRQTQhyZj7SS+7cEoBTmAMJOOEImA=; b=hYbMrHKQLpzYOBqzwr14iiJ+/2/XkbSyarda+pPyV8BZL8LsJ+Cay7UpT19OtTxv4c 8tDnSOUPfTslGpYcqg7VgszkoLTFPEJt3vsySCH10i54fs40SiHXrnGWwoDprhMdqB/E TAj4swfDJ1mWkzpfUKCrnQHdZpgoT68Voey/IBSCjSlbKoHwbby6oMLL8OejGde5dqYX u/bxYmPoZuPpsRrjsCA5l1l6XPd68GaQzUmN1DRLpeYr+jTy1/qRFsrVoMc/8UazYO3m 9asIL6s6OdUpCATlf0O9hSgpRbCXXMyhkBcO44x4o0ObjdrszKpYvgCTJNQes8ODeoXO WgYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=te2j8kn7; 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 q1-v6si18812229pga.417.2018.05.25.05.01.02; Fri, 25 May 2018 05:01:19 -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=te2j8kn7; 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 S966464AbeEYMAx (ORCPT + 99 others); Fri, 25 May 2018 08:00:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38282 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966243AbeEYMAv (ORCPT ); Fri, 25 May 2018 08:00:51 -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=CGjK03lQxUUocmfRQTQhyZj7SS+7cEoBTmAMJOOEImA=; b=te2j8kn7zlWdkq2OTF+Mj8XD5 8vwAJNR62q8kDwOq1yjEpYh2UAKol4STpx14ZcBc6aHt0OdJ6n223PJ0Qf2y0M8cb1MAPZeIjfGzC hgZCR3AS5Om8QPuUZjXJXtkQij6JSpB+RStgFZa0Wc97UtGEGCLbdApguyj5DfCW1Nws9NwMTqzOV owKEmEGFgbebigBXcqKT9ewIqstSh6AS8ByfztVhn2H2xttvg0RmW1h/UbrCZj8q7Vh/CimnNPJpx g8DQGshlIjPymozsTWApy39WyPaEbXg6wPV+XMMDKIWKifsqq2yXcBJOp6/Eh0uhztywupqS94GgN VrtqQNcIg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMBOn-0005Fi-2H; Fri, 25 May 2018 12:00:45 +0000 Date: Fri, 25 May 2018 05:00:44 -0700 From: Matthew Wilcox To: Michal Hocko Cc: Huaisheng Ye , akpm@linux-foundation.org, linux-mm@kvack.org, vbabka@suse.cz, mgorman@techsingularity.net, kstewart@linuxfoundation.org, alexander.levin@verizon.com, gregkh@linuxfoundation.org, colyli@suse.de, chengnt@lenovo.com, hehy1@lenovo.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-btrfs@vger.kernel.org, Huaisheng Ye Subject: Re: [RFC PATCH v2 00/12] get rid of GFP_ZONE_TABLE/BAD Message-ID: <20180525120044.GA4649@bombadil.infradead.org> References: <1526916033-4877-1-git-send-email-yehs2007@gmail.com> <20180522183728.GB20441@dhcp22.suse.cz> <20180524051919.GA9819@bombadil.infradead.org> <20180524122323.GH20441@dhcp22.suse.cz> <20180524151818.GA21245@bombadil.infradead.org> <20180524152943.GA11881@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524152943.GA11881@dhcp22.suse.cz> 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 Thu, May 24, 2018 at 05:29:43PM +0200, Michal Hocko wrote: > > ie if we had more, > > could we solve our pain by making them more generic? > > Well, if you have more you will consume more bits in the struct pages, > right? Not necessarily ... the zone number is stored in the struct page currently, so either two or three bits are used right now. In my proposal, one can infer the zone of a page from its PFN, except for ZONE_MOVABLE. So we could trim down to just one bit per struct page for 32-bit machines while using 3 bits on 64-bit machines, where there is plenty of space. > > it more-or-less sucks that the devices with 28-bit DMA limits are forced > > to allocate from the low 16MB when they're perfectly capable of using the > > low 256MB. > > Do we actually care all that much about those? If yes then we should > probably follow the ZONE_DMA (x86) path and use a CMA region for them. > I mean most devices should be good with very limited addressability or > below 4G, no? Sure. One other thing I meant to mention was the media devices (TV capture cards and so on) which want a vmalloc_32() allocation. On 32-bit machines right now, we allocate from LOWMEM, when we really should be allocating from the 1GB-4GB region. 32-bit machines generally don't have a ZONE_DMA32 today.