Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2483599imm; Mon, 28 May 2018 08:58:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrrY7JGjBFkAoI+dcI9t488gp3KSAt97Sb/JYObbun/Zk2xtHPlLJNlYv/lM4awa+0MEGqO X-Received: by 2002:a62:303:: with SMTP id 3-v6mr13956061pfd.255.1527523091783; Mon, 28 May 2018 08:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527523091; cv=none; d=google.com; s=arc-20160816; b=wXoScDA4SooBcTwces3O2ZU2YOcZDnC8jYK0FWNWtvKLy6F13XyQ5CN+NS9ppEllhM bQ5DAOA38twNxE6RS/r7BV4nAINJO5eazItTl3GLVPfPZ/MP/PA7Q+LPQQYSXcgwnXAU VlERVXnIFMRDHbioslNBiJ754epg6gg+/l8ObjepNwtHeAtrn7MOlhwYtDTAppmsX55R vFFcO4iWO4uTebxTw8qpGxTAo7sJBCLMjIDttDCqlC0X/myBBkDKT8BkAwW41ZOQny7D z1qF1EuN7apAFQLV1bsqxIxGdEmSb4foAg7uOoaeoMO4VprPk8m0rJQRDkgfMRO8+Z01 V/ug== 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:arc-authentication-results; bh=+RA2nzZbk6ZCEu9Y0MuY7iNJQdCJk4UClVjbAzI5nGs=; b=u2CHqmd9QRPNtvROijHvX8h9DEQaPR9Lb6OXbNEmyvcdlUHlx5uY3IKvpzYyft/sP0 Z0H3Dp9t6FbfMByQI2aXkr2CxR032oFyzBgtgKasYnA9P1QXj+2Fbp1qhHV+z5xUlYNt oDDJwEUjPB4k+mEI7YXkufFaFyBhScGYjdveapal0G3fKg8lDzoMreBv4bptA1rHeEnL Sj24aq/f7O1KHZBdoYY5wvE6Nw6V9u6XboeIa7vM+YfBmokFqS441Cevh7jqWD4wNi07 bk/XosxgydAJTzuk+CfnFyBgVQwYnXU9j4f8T77xjECH5jF9T4dJF7w32KDTz1FoYwWf USzg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c83-v6si8197887pfl.319.2018.05.28.08.57.56; Mon, 28 May 2018 08:58:11 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939775AbeE1P4A (ORCPT + 99 others); Mon, 28 May 2018 11:56:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:43737 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425289AbeE1Py2 (ORCPT ); Mon, 28 May 2018 11:54:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3A36BAF52; Mon, 28 May 2018 15:54:26 +0000 (UTC) Date: Mon, 28 May 2018 15:33:22 +0200 From: Michal Hocko To: Matthew Wilcox 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: <20180528133322.GE27180@dhcp22.suse.cz> 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> <20180525120044.GA4649@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180525120044.GA4649@bombadil.infradead.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 25-05-18 05:00:44, Matthew Wilcox wrote: > 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. Just be warned that page_zone is called from many hot paths. I am not sure adding something more complex there is going to fly. > > > 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. Well, _I_ think that vmalloc on 32b is just lost case... -- Michal Hocko SUSE Labs