Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4958858pxj; Wed, 12 May 2021 17:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy83u3d+f4GT1Je+5HVcfByVIQev/eJaXC6B+JamtVO5ao322w09mFQ4vvpxoswLYt4Zp3 X-Received: by 2002:aa7:c781:: with SMTP id n1mr11276440eds.108.1620866770969; Wed, 12 May 2021 17:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620866770; cv=none; d=google.com; s=arc-20160816; b=wGqEjAFTdTpvIU2Ol6UMGIIQJX7hpYEbpMZypD+wnKfVbxGv6UthnxWUGVuxec+ylI exide2hgsd+ee1qpR49eSNaS7ggv8DPUPL2iLTFlbsolAf0nbeO5imvTmJ7PUXFC3VYN XhG1ZFAmJrd4NYy6NZ2Mv8v6ibcrBYnbQRKD/1IDRAUN9g9XlMWs2Om/5bqBUc1GaRm6 5cWXXfKuda9N8dL2M5P19SIKInCH99zlASxdkJJ77CdJW84Gos8PxaiuPt1KS59akeyA 8+Lc7v51gqXdrC5Ijcw2q9VmdabQUPXBcu0gUI1qGujimkaR1PWutkrqY5ETzfs0Wv4y AeeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=jRDmzneLjEA/66KMCLNfMX/WUE6zXK/pw3aDnFn4dCY=; b=JgKr+e/kHW8QRM8NhbK7ONhJ8nhOEdrSetPdF8/+eeBHKdsfHGYIy2W4okl1CiqTPn 8D5VRw2yqX9UljiMnQUUUOSKZ9Luh9q9gHwl8PcHmSrUGmthlXbDcbHo/vtabjeP0OOJ gjp/jZytJYKneYLKm0gYfFrrEmDUAY34SkavL2Y3cHsi3C47sYijFEjfJpkuHOmNNlbg T8KYg4IdTFdFf+4zk4qXrhMCt/9YobyRY/DdwOn6sTi0GwdnHjPx+Ruuw/I8T99gXo03 /42+p+uVc3iyjdfmPvPGaZJkPVjTYN1PttjhAdZ4ESGwg43Y4Hw7jGH5cJtv47dHvlO9 j3Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=L00Jcm0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1392950ejj.154.2021.05.12.17.45.46; Wed, 12 May 2021 17:46:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=L00Jcm0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233187AbhEMAhG (ORCPT + 99 others); Wed, 12 May 2021 20:37:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:44716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbhEMAd0 (ORCPT ); Wed, 12 May 2021 20:33:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E923613DF; Thu, 13 May 2021 00:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1620865933; bh=NqerZcueDe5Vdup5YWaIr/cMiCRyTzm7WBaBKhWYa7o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L00Jcm0ErlbgR36ajW4jCZFAKDnlSvY9k0wYlsDluPw9zlduW/bOD6JVblaQcOt+q z46YCVZw8lws+725jTiNN7kC0DWof2X8vMlEDhc1T5+yyuhwo3cRh+uQaGIs4NQBX6 VKcQn7lVOU3pR8dh+zEbvvU3oM6VTG9J4VaohlS4= Date: Wed, 12 May 2021 17:32:12 -0700 From: Andrew Morton To: Waiman Long Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , Shakeel Butt , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v5 2/3] mm: memcg/slab: Create a new set of kmalloc-cg- caches Message-Id: <20210512173212.738f592c36bf0e4c205f628e@linux-foundation.org> In-Reply-To: <0919aaab-cc08-f86d-1f9a-8ddfeed7bb31@redhat.com> References: <20210505200610.13943-1-longman@redhat.com> <20210512145107.6208-1-longman@redhat.com> <0919aaab-cc08-f86d-1f9a-8ddfeed7bb31@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 May 2021 10:54:19 -0400 Waiman Long wrote: > > include/linux/slab.h | 42 +++++++++++++++++++++++++++++++++--------- > > mm/slab_common.c | 25 +++++++++++++++++-------- > > 2 files changed, 50 insertions(+), 17 deletions(-) >=20 > The following are the diff's from previous version. It turns out that=20 > the previous patch doesn't work if CONFIG_ZONE_DMA isn't defined. >=20 > diff --git a/include/linux/slab.h b/include/linux/slab.h > index a51cad5f561c..aa7f6c222a60 100644 > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -312,16 +312,17 @@ static inline void __check_heap_object(const void=20 > *ptr, un > signed long n, > =A0 */ > =A0enum kmalloc_cache_type { > =A0=A0=A0=A0 KMALLOC_NORMAL =3D 0, > -#ifdef CONFIG_MEMCG_KMEM > -=A0=A0=A0 KMALLOC_CGROUP, > -#else > +#ifndef CONFIG_ZONE_DMA > +=A0=A0=A0 KMALLOC_DMA =3D KMALLOC_NORMAL, > +#endif > +#ifndef CONFIG_MEMCG_KMEM > =A0=A0=A0=A0 KMALLOC_CGROUP =3D KMALLOC_NORMAL, > +#else > +=A0=A0=A0 KMALLOC_CGROUP, > =A0#endif > =A0=A0=A0=A0 KMALLOC_RECLAIM, > =A0#ifdef CONFIG_ZONE_DMA > =A0=A0=A0=A0 KMALLOC_DMA, > -#else > -=A0=A0=A0 KMALLOC_DMA =3D KMALLOC_NORMAL, > =A0#endif > =A0=A0=A0=A0 NR_KMALLOC_TYPES > =A0}; I assume this fixes https://lkml.kernel.org/r/20210512152806.2492ca42@canb.auug.org.au?