Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9362551imu; Wed, 5 Dec 2018 03:39:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/U0etD4TFXNTYrWljw7+EVIJn8gnWXYU6SNaYp7/qP0it4N2jwuA3rtZTFxBe5nJn0NPLps X-Received: by 2002:a17:902:bd46:: with SMTP id b6mr23659492plx.231.1544009983444; Wed, 05 Dec 2018 03:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544009983; cv=none; d=google.com; s=arc-20160816; b=FiP7W0zzeXRPO3abxeFuk1y1Jtgir+vScnyaaoAHqAY/spr2vbHYpg/+kyrdxL+Lcs kXfUWl9awxUJPUfXeRTw2J5Jy5CMZ8ffOyYmdgNokN3OhB6iaU1Ypt2BdFFyllDKqRYi wYXrjgVfRcoDxMOeKplaUe9h5E3n5c6IFBUvsc7qXLIPqOVsEfixHmMFU1QDZMcmeVDG T++K8Lsp5IVv3510p2kCFQT1nt+ffRT5NAfLPTU530xXPYgoXuExPd1knF9PpuuUiErl AZgqELIArQe83bfkG+GdDvtI0ysfO02qGryDRM6b3HOhzC6QMwgTYQtpSciSjn3qhqYh XzwA== 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; bh=O9ftQEJ/evUkh5Nf3Qmh+0W0WMlL8TuaB+yT3CMDOmM=; b=xRfnQEWS08sPpVWky4T00SfnKV78ikvNfBir7k6nptMjeUOsQY4XuI1yAOFmseC6s1 T9jsRJAwly2zpwPt/CouBkAI0UmTgUG8F10PlW5TYkBezCP5+E6cghGNhUCl5WAWK+SA TKZfpbDpupNTpxTRt9XaEhH6V5+/FzTPpfoQeklPGbySSW+lvle4zKWN3rwS4f1rYZ7z OMXc78xTAAkfS6g9o+lj38PqF8tqUlU+ZEPuEmz+pI7iYQjEDFTP71OmLUoGI5IUQjFA VHsQD4fLIIZjESnSYNEwgSO0Jvp70O4r6/9TkczB2DTh9oB2pvPxNuelTT9jvfoP7J2M WhmQ== 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 t74si18380685pgc.150.2018.12.05.03.39.28; Wed, 05 Dec 2018 03:39:43 -0800 (PST) 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 S1727619AbeLELh0 (ORCPT + 99 others); Wed, 5 Dec 2018 06:37:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:33296 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726918AbeLELh0 (ORCPT ); Wed, 5 Dec 2018 06:37:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 35203B07E; Wed, 5 Dec 2018 11:37:24 +0000 (UTC) Date: Wed, 5 Dec 2018 12:37:22 +0100 From: Michal Hocko To: Nicolas Boichat Cc: Will Deacon , Robin Murphy , Joerg Roedel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Mel Gorman , Levin Alexander , Huaisheng Ye , Mike Rapoport , linux-arm Mailing List , iommu@lists.linux-foundation.org, lkml , linux-mm@kvack.org, Yong Wu , Matthias Brugger , Tomasz Figa , yingjoe.chen@mediatek.com, hch@infradead.org, Matthew Wilcox Subject: Re: [PATCH v4 2/3] mm: Add support for kmem caches in DMA32 zone Message-ID: <20181205113722.GG1286@dhcp22.suse.cz> References: <20181205054828.183476-1-drinkcat@chromium.org> <20181205054828.183476-3-drinkcat@chromium.org> <20181205095557.GE1286@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-12-18 19:01:03, Nicolas Boichat wrote: [...] > > Secondly, why do we need a new sysfs file? Who is going to consume it? > > We have cache_dma, so it seems consistent to add cache_dma32. I wouldn't copy a pattern unless there is an explicit usecase for it. We do expose way too much to userspace and that keeps kicking us later. Not that I am aware of any specific example for cache_dma but seeing other examples I would rather be more careful. > I wasn't aware of tools/vm/slabinfo.c, so I can add support for > cache_dma32 in a follow-up patch. Any other user I should take care > of? In general zones are inernal MM implementation details and the less we export to userspace the better. > > Then why do we need SLAB_MERGE_SAME to cover GFP_DMA32 as well? > > SLAB_MERGE_SAME tells us which flags _need_ to be the same for the > slabs to be merged. We don't want slab caches with GFP_DMA32 and > ~GFP_DMA32 to be merged, so it should be in there. > (https://elixir.bootlin.com/linux/v4.19.6/source/mm/slab_common.c#L342). Ohh, my bad, I have misread the change. Sure we definitely not want to allow merging here. My bad. -- Michal Hocko SUSE Labs