Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2934035imm; Thu, 24 May 2018 19:21:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrAQElciFrbay+8lArZoB+P6YiVkwdLXibpkKxMXv6t37imlkVm51l0hJMj/zL3xMlLUZ5Y X-Received: by 2002:a62:190f:: with SMTP id 15-v6mr562767pfz.42.1527214908013; Thu, 24 May 2018 19:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527214907; cv=none; d=google.com; s=arc-20160816; b=x/5HJwXexCWXBPq4hmzZTsJcl/zIlQJjKwWqUo8gjG3+YksM0yTbOaSONJoEUoacBc d2vqQm2jG6m287jSNp7LutjPYFd/MA4BGd7Lof697CxUix2pyL8bedqJDR6zHvUqsA1n U9ZYFUo9AB3FRnJhV3kfSyLDzFex7FhgalDRdGtwuG+SnFYQGA0gqVP3xF6/fUl0RorR ceQijDdgQ6oKkFm11b1wzL2lTb1SwxURjpGW0ev3ItSCTlAegyrEFL1qJlpb4lRDTD0v fOpbvpCgK1XZUcVSNFRjcZ6wTPeWwEgWiahGeRgJqAazML5ehKsNUI3YiIVijkaC4xAl qKRQ== 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=RNErMR3UWUEa3HnQAuB2rjHf8naL3RvSoZ0po1f1Ca0=; b=HUfWx96qUQDbZhYPx8MoHCRLJGDecRhFd98dwjYk8LyJ70iPajSlm5triMU6DUvXLE tE49LM9raGzKpqLcunG4cDB8wEiwc3BumYasjv0H5zXdTCD60GLqHS38dYYswwQgt/To iWOFbEtr7yJFqy5KcxNHYLpm+OgczWHbHqjsddnRWeVCPIiFJ+VBOWavsy7UX7p0MzhQ 4m6+bEV/BhshXClymHjI5DMtCcK67NqKi/yvL87voLpwlHVtRcGr6V/es73DS2mHOcD+ cUcJB0CgzsZZaK8JwZ+85AqZkQWssTyd+k3Bu7JWwFpgECRm/pZbeNDj79mw937+E/1G lcsg== 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 23-v6si22706012pfn.28.2018.05.24.19.21.33; Thu, 24 May 2018 19:21:47 -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 S966791AbeEXP3u (ORCPT + 99 others); Thu, 24 May 2018 11:29:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:44954 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966171AbeEXP3q (ORCPT ); Thu, 24 May 2018 11:29:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5C353AAC3; Thu, 24 May 2018 15:29:44 +0000 (UTC) Date: Thu, 24 May 2018 17:29:43 +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: <20180524152943.GA11881@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524151818.GA21245@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 Thu 24-05-18 08:18:18, Matthew Wilcox wrote: > On Thu, May 24, 2018 at 02:23:23PM +0200, Michal Hocko wrote: > > > If we had eight ZONEs, we could offer: > > > > No, please no more zones. What we have is quite a maint. burden on its > > own. Ideally we should only have lowmem, highmem and special/device > > zones for directly kernel accessible memory, the one that the kernel > > cannot or must not use and completely special memory managed out of > > the page allocator. All the remaining constrains should better be > > implemented on top. > > I believe you when you say that they're a maintenance pain. Is that > maintenance pain because they're so specialised? Well, it used to be LRU balancing which is gone with the node reclaim but that brings new challenges. Now as you say their meaning is not really clear to users and that leads to bugs left and right. > 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? [...] > > But those already do have aproper API, IIUC. So do we really need to > > make our GFP_*/Zone API more complicated than it already is? > > I don't want to change the driver API (setting the DMA mask, etc), > but we don't actually have a good API to the page allocator for the > implementation of dma_alloc_foo() to request pages. More or less, > architectures do: > > if (mask < 4GB) > alloc_page(GFP_DMA) > else if (mask < 64EB) > alloc_page(GFP_DMA32) > else > alloc_page(GFP_HIGHMEM) > > 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? -- Michal Hocko SUSE Labs