From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68796C433B4 for ; Thu, 13 May 2021 08:40:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D4B7D6143B for ; Thu, 13 May 2021 08:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4B7D6143B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1BB156B0036; Thu, 13 May 2021 04:40:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16B8D6B006E; Thu, 13 May 2021 04:40:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 045456B0070; Thu, 13 May 2021 04:40:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id C87A66B0036 for ; Thu, 13 May 2021 04:40:11 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 52FB2181AEF3C for ; Thu, 13 May 2021 08:40:11 +0000 (UTC) X-FDA: 78135560622.40.265CA98 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf30.hostedemail.com (Postfix) with ESMTP id 8C5B8E0001AC for ; Thu, 13 May 2021 08:39:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AC22DAD1B; Thu, 13 May 2021 08:40:09 +0000 (UTC) Subject: Re: [PATCH v5 2/3] mm: memcg/slab: Create a new set of kmalloc-cg- caches To: Andrew Morton , Waiman Long Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Shakeel Butt , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org References: <20210505200610.13943-1-longman@redhat.com> <20210512145107.6208-1-longman@redhat.com> <0919aaab-cc08-f86d-1f9a-8ddfeed7bb31@redhat.com> <20210512173212.738f592c36bf0e4c205f628e@linux-foundation.org> From: Vlastimil Babka Message-ID: <40fd10f4-b011-605a-9c0b-6d7ce17837f9@suse.cz> Date: Thu, 13 May 2021 10:40:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210512173212.738f592c36bf0e4c205f628e@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Queue-Id: 8C5B8E0001AC Authentication-Results: imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam03 X-Stat-Signature: 73ih1y15mp71xoj6su5at67qcpbjqi1s Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1620895180-473124 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 5/13/21 2:32 AM, Andrew Morton wrote: > On Wed, 12 May 2021 10:54:19 -0400 Waiman Long wrote= : >=20 >> > 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 voi= d=20 >> *ptr, un >> signed long n, >> =C2=A0 */ >> =C2=A0enum kmalloc_cache_type { >> =C2=A0=C2=A0=C2=A0=C2=A0 KMALLOC_NORMAL =3D 0, >> -#ifdef CONFIG_MEMCG_KMEM >> -=C2=A0=C2=A0=C2=A0 KMALLOC_CGROUP, >> -#else >> +#ifndef CONFIG_ZONE_DMA >> +=C2=A0=C2=A0=C2=A0 KMALLOC_DMA =3D KMALLOC_NORMAL, >> +#endif >> +#ifndef CONFIG_MEMCG_KMEM >> =C2=A0=C2=A0=C2=A0=C2=A0 KMALLOC_CGROUP =3D KMALLOC_NORMAL, >> +#else >> +=C2=A0=C2=A0=C2=A0 KMALLOC_CGROUP, >> =C2=A0#endif >> =C2=A0=C2=A0=C2=A0=C2=A0 KMALLOC_RECLAIM, >> =C2=A0#ifdef CONFIG_ZONE_DMA >> =C2=A0=C2=A0=C2=A0=C2=A0 KMALLOC_DMA, >> -#else >> -=C2=A0=C2=A0=C2=A0 KMALLOC_DMA =3D KMALLOC_NORMAL, >> =C2=A0#endif >> =C2=A0=C2=A0=C2=A0=C2=A0 NR_KMALLOC_TYPES >> =C2=A0}; >=20 > I assume this fixes > https://lkml.kernel.org/r/20210512152806.2492ca42@canb.auug.org.au? Yeah it should.