Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4099931imm; Mon, 30 Jul 2018 08:40:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf+pwFVR+uG3J18y1XcxJYbS4sT33k6N0hNSLJNg0fRe6UcsVZmaXXYYJOKAjwcCgJBIbjk X-Received: by 2002:a17:902:26c:: with SMTP id 99-v6mr16544248plc.341.1532965204639; Mon, 30 Jul 2018 08:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532965204; cv=none; d=google.com; s=arc-20160816; b=CZOBMs61hhmJuJdpuat0oFrl6n2Go4qpCoqkOjmrhfoT9LP+jTM3ifLwgcMpXDNer6 hq+f2nz/Fhi7zUIBzXY2fm6yIKa6o22b18E5653nqAbjVJehrjVfYaIiE8jnwMZxnwJX hhPfsk3G185bXGG/Pw3GsVe0gh16hVF2MLW0Vvxyb8sPrFHYUGTDYoBsedwAc0ESZrmo NjPf2gW+0Gz62OKdMrrxsxyns1uxFRnRhv1gYvnFo2su3hEj8hy05+dyXQITwlDBXW8E pYOVWqhjgYsp2mBsDM6mq4GX0wEy6RYovG3Ms23szLZ+LaSC7T6G4k/fcz6hV0tLSz++ OKlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=+XQoMVHuNYYyFkzWTTxnhb+9+Rc6WDLxeWUvAG2yVfU=; b=MG5XyrbYRdCtMDmRGVxP0PeDHd3v8X+tja0LmyfWBQaGN47yhK6LJoNPv1qhRdGkPV fGvsXhnodSjcaXbQgDWLSjrU/g7aipwFNtQxWFDmH8HD24imieY2e62h3Q+HxvUvVd5i 1Tmq1351LUhJsE6UMqQGqlLSjhks2SeLOw4mIKbxr2lHdwBb2Xp1q6Z+/BDGNNW3ZoUc FkqWgpJDb9/ZUKtRzTDUVXweGjO6UrK3MubRb6skUMbRPtTpCqAJkEn2zgSXsZJhp0b6 zm59rjM1lFS+PAjAVq7lSgngq5hczaP3Jeq8dgzRGD6ul5sfGAF1Xdm6H4MuIlucgmE/ vGdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b="PN7/UBaq"; 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 o5-v6si10454966pll.449.2018.07.30.08.39.50; Mon, 30 Jul 2018 08:40:04 -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=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b="PN7/UBaq"; 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 S1728672AbeG3RO1 (ORCPT + 99 others); Mon, 30 Jul 2018 13:14:27 -0400 Received: from a9-112.smtp-out.amazonses.com ([54.240.9.112]:51356 "EHLO a9-112.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbeG3RO1 (ORCPT ); Mon, 30 Jul 2018 13:14:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1532965134; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=oo7GGMffmAEmf/lnUhdZCphNmPvwdr62jem/OMa8y3g=; b=PN7/UBaqLKd1I3YzSWFBIFvvGukc9FVI8ImmI/fi8j0yUa/TgFrMHteMGJty5ioU obEMK6xSat7+d30/PfyayzlPGOleO944xOTAshHurlIpwuf/0hxYY5RDdOOqA1mzLRx nD+cXwMU0kF3t0UI4RFKgvYfkXtSbUvIVPO1SZiE= Date: Mon, 30 Jul 2018 15:38:54 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Vlastimil Babka cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Roman Gushchin , Michal Hocko , Johannes Weiner , David Rientjes , Joonsoo Kim , Mel Gorman , Matthew Wilcox Subject: Re: [PATCH v3 1/7] mm, slab: combine kmalloc_caches and kmalloc_dma_caches In-Reply-To: <20180718133620.6205-2-vbabka@suse.cz> Message-ID: <01000164ebd7a137-093f1337-e0b0-4ea9-81dd-2e37b6adadb9-000000@email.amazonses.com> References: <20180718133620.6205-1-vbabka@suse.cz> <20180718133620.6205-2-vbabka@suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2018.07.30-54.240.9.112 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Jul 2018, Vlastimil Babka wrote: > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -295,12 +295,28 @@ static inline void __check_heap_object(const void *ptr, unsigned long n, > #define SLAB_OBJ_MIN_SIZE (KMALLOC_MIN_SIZE < 16 ? \ > (KMALLOC_MIN_SIZE) : 16) > > +#define KMALLOC_NORMAL 0 > +#ifdef CONFIG_ZONE_DMA > +#define KMALLOC_DMA 1 > +#define KMALLOC_TYPES 2 > +#else > +#define KMALLOC_TYPES 1 > +#endif An emum would be better here I think. But the patch is ok Acked-by: Christoph Lameter