Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9275824imu; Wed, 5 Dec 2018 01:59:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/WF8B7FBrhKh33MPTjl1x7HBRF5JaSmEmR3bc5v+z+NabgVH93l+ySzSEiLd0mCEnYuLflW X-Received: by 2002:a63:77ce:: with SMTP id s197mr19745292pgc.89.1544003984758; Wed, 05 Dec 2018 01:59:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544003984; cv=none; d=google.com; s=arc-20160816; b=izPhChiRhUaY9q3+IQumOn2KVxup+e1IirKX9lZZbE3a4rSWdoeRVHOZlWAOG0UIEc 08KTRALbwh/zwHnak3F+z+V+vFU57Ya50BiCo/I81Cio7Gb7fHFjKlmSSX8aqLMUz94I SyW6Vz3dxbTIdEyuU7Kv3h+Oe/wgI9UArf1eDNAPHIU5th58eiZd5xXCqwoOvKZ5s5Sk qIb90DCBzKT+k5gbbCxlh0NN9rYk+6ZvOpAd7ZqwnCzbXGsgsRSG5FySqoL/Kys41zLp 9wxbCIgnWKh7+ujqmCo3P4BfeZ+WlTRrwvtpZ45Cmz6GN40M5XvISy23hFAsjBsxIuiM iN9w== 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=4ttxQrU9pUrv1707mNgRrhYg0g9xl98NkMyAN2fai3k=; b=aX2VbM8UhOEV6tBV5D2VyOi584KaZjia/ffdiIFrQsqgwjGcL6r4f4xJFC/tw2a2zi tD0ZtIV7SuMpKrqxoKV3Wbu8kOYhm5LnKZT2wGDrCnQnDqntXQbHoZPQ9GgEtT2jEKAh Iw1SFGxxG5NbCVOT/2MAppp1hISl8nHQ3i0GU/x32owgBswka0EvCA00iLGWoJIh2gZW a8K5HfK0QWnllYpFrT/4gK8IStZagRefi4NtJ8GJ3hSN40sX+PkcKGhmbnnnrBhSwBJV x61O0M+3/YPC4MgZkWBI+nORpj2wZJ+A3SwKtcrrYN8L3bgv+AjbRk5U+VBZq2stxJQr adMw== 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 m30si21552057pff.158.2018.12.05.01.59.30; Wed, 05 Dec 2018 01:59:44 -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 S1730203AbeLEJ4F (ORCPT + 99 others); Wed, 5 Dec 2018 04:56:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:40042 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729796AbeLEJ4C (ORCPT ); Wed, 5 Dec 2018 04:56:02 -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 81CEEB695; Wed, 5 Dec 2018 09:56:00 +0000 (UTC) Date: Wed, 5 Dec 2018 10:55:57 +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-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, 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: <20181205095557.GE1286@dhcp22.suse.cz> References: <20181205054828.183476-1-drinkcat@chromium.org> <20181205054828.183476-3-drinkcat@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181205054828.183476-3-drinkcat@chromium.org> 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 13:48:27, Nicolas Boichat wrote: > In some cases (e.g. IOMMU ARMv7s page allocator), we need to allocate > data structures smaller than a page with GFP_DMA32 flag. > > This change makes it possible to create a custom cache in DMA32 zone > using kmem_cache_create, then allocate memory using kmem_cache_alloc. > > We do not create a DMA32 kmalloc cache array, as there are currently > no users of kmalloc(..., GFP_DMA32). The new test in check_slab_flags > ensures that such calls still fail (as they do before this change). The changelog should be much more specific about decisions made here. First of all it would be nice to mention the usecase. Secondly, why do we need a new sysfs file? Who is going to consume it? Then why do we need SLAB_MERGE_SAME to cover GFP_DMA32 as well? I thought the whole point is to use dedicated slab cache. Who is this going to merge with? -- Michal Hocko SUSE Labs