Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp232554pxj; Thu, 13 May 2021 03:43:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNqhh2k+pWu4mmY2MiQBsXsfnmfZfrQ7qNqUaMZIniLcYM1+CSEkoztWtQ0hnUQaTzVXiA X-Received: by 2002:a05:6602:2cd5:: with SMTP id j21mr31374805iow.83.1620902638386; Thu, 13 May 2021 03:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620902638; cv=none; d=google.com; s=arc-20160816; b=mx7TEebDhuEWBINOpzeRrbNSqEqL+LSibnigoXYmQReqPtlmIrQyWINYisa15Fc02k 1rYd1z4sVksiCQ3CWVmXteZ1u92TygVYChrxXFgT6rjy02vNlaWCEcaUWpZgw5m2RC3t pmQO/STy3WJ42xPvVnRXhRKYxnhGHLQ/WdXqQHlav/ILnuKfWDp2hSo56YiL7srW8okv lhS9T+q4IM8IgBoGRiT3y9CwDKJ1Ommvlm2ZlgXP3eGPzHfiyrvM4NpDtQamt2kP5Tlv pGNpSIxMeFo23IgnK2VVuj7dxEnhFLRSEUYAIVLUKFCczpVt32uhrvD20hpB+3nYmuNn rf3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=tZ/Aglj0J08TtY3MS2jMoa0ycNwBScDf5aON5o+aRDA=; b=Lb53IBiCI/uZjcbd+7YpBm3Q1l+eS975MRDm+BQhLdwa8wysh+EbKqgEIAtoiH/dHN pchVKBYEa4I1EsTgoQJnRhDW+VPXAwloCa2UgnaeqCEpXq5APRKI29ie/PAHrCkqtqHV P0zxn98nf4cJ9qyP9UvRtEW0rDHBfL0/GWBwQSxpb20RxPI79qB70Tgpfn1pz3oD6YQp Erx4M/o2D6vxAtIn6NSrmhz28yvXQN9pevMXBlc5pV6CosSilqWbFWvFu8/cL3l5msDE gEqivuNGIJr/oPnBWP/9is7jouCoo7m1t7Uf3Qjx0vwPG5mUfzZGvZEV1E3nxmOqkH7F 9dVw== ARC-Authentication-Results: i=1; mx.google.com; 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 f12si3348052jat.88.2021.05.13.03.43.45; Thu, 13 May 2021 03:43:58 -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; 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 S232024AbhEMIla (ORCPT + 99 others); Thu, 13 May 2021 04:41:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:41568 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231926AbhEMIlU (ORCPT ); Thu, 13 May 2021 04:41:20 -0400 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/21 2:32 AM, Andrew Morton wrote: > 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(-) >> >> The following are the diff's from previous version. It turns out that >> the previous patch doesn't work if CONFIG_ZONE_DMA isn't defined. >> >> 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 >> *ptr, un >> signed long n, >>   */ >>  enum kmalloc_cache_type { >>      KMALLOC_NORMAL = 0, >> -#ifdef CONFIG_MEMCG_KMEM >> -    KMALLOC_CGROUP, >> -#else >> +#ifndef CONFIG_ZONE_DMA >> +    KMALLOC_DMA = KMALLOC_NORMAL, >> +#endif >> +#ifndef CONFIG_MEMCG_KMEM >>      KMALLOC_CGROUP = KMALLOC_NORMAL, >> +#else >> +    KMALLOC_CGROUP, >>  #endif >>      KMALLOC_RECLAIM, >>  #ifdef CONFIG_ZONE_DMA >>      KMALLOC_DMA, >> -#else >> -    KMALLOC_DMA = KMALLOC_NORMAL, >>  #endif >>      NR_KMALLOC_TYPES >>  }; > > I assume this fixes > https://lkml.kernel.org/r/20210512152806.2492ca42@canb.auug.org.au? Yeah it should.