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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF251C433FE for ; Mon, 7 Nov 2022 04:36:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 211E58E0002; Sun, 6 Nov 2022 23:36:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C19C8E0001; Sun, 6 Nov 2022 23:36:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B0E38E0002; Sun, 6 Nov 2022 23:36:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id F112E8E0001 for ; Sun, 6 Nov 2022 23:36:12 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id BBC1440D05 for ; Mon, 7 Nov 2022 04:36:12 +0000 (UTC) X-FDA: 80105384184.17.6E8D1A7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 46C7A1A0002 for ; Mon, 7 Nov 2022 04:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667795770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L57ypoeYMk6I2Bcn67ySi5K7HfBryn3CWbm8eC7QAIo=; b=eJFvcA88Bw8ETxms7Vd/KI9bARTIe45I43hJLfFXKE44bHsAR9YSYsjEaVpy6VIblWquSE hs/E+pvV08VCbyrYEp08xVfiqgpIGYYJ3wJvWTUvzKxDutyvvSGzv1apl05/CCAF4WpTtE p/o3GhoFASEYWA9WMtCnOBbLT14f1IE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-140-F6GAXaeROLygGpDuwMvLsA-1; Sun, 06 Nov 2022 23:36:06 -0500 X-MC-Unique: F6GAXaeROLygGpDuwMvLsA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0ADBD3C025C8; Mon, 7 Nov 2022 04:36:06 +0000 (UTC) Received: from localhost (ovpn-13-134.pek2.redhat.com [10.72.13.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A23E740C6EC4; Mon, 7 Nov 2022 04:36:04 +0000 (UTC) Date: Mon, 7 Nov 2022 12:35:56 +0800 From: Baoquan He To: Vlastimil Babka Cc: linux-kernel@vger.kernel.org, Dennis Zhou , Tejun Heo , Christoph Lameter , Andrew Morton , linux-mm@kvack.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: Re: [PATCH 8/8] mm/slub, percpu: correct the calculation of early percpu allocation size Message-ID: References: <20221024081435.204970-1-bhe@redhat.com> <20221024081435.204970-9-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eJFvcA88; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667795772; a=rsa-sha256; cv=none; b=elr2e39BpKLLF9y7UMpFg13RNevOKfqYr4Yb32na10BaLCvQE24EeKmlKihF2OcxVNP5BA RXtBMDfrtyLmotaTxXTZn3qlXcNAGos9qzd7yPz6YnY2FRIra4ZW05K7ncar5TsvmjTDJn hDR9OnU5s1AkrNT4rahLK/4J17QqqWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667795772; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=L57ypoeYMk6I2Bcn67ySi5K7HfBryn3CWbm8eC7QAIo=; b=eHlhBsTcBsuI3a4uFgYG50o1Pkw7mY8IhEBHR+TC2d3r2aczjMIk2/koN7SVFC1ng+9ELA 5vDui4CvjpB67UfytR5E2nHpTtqMs62Kjxxi7Vm0qIpt6uv23GwkomSO7e1oWHV+i8tY1r dRULc/CK8H6S/ZhnJr9JRGOAoCWJ8+c= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 46C7A1A0002 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eJFvcA88; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: dwxxqwnq8fmo318jj9oe1kjjt84w37mo X-Rspam-User: X-HE-Tag: 1667795771-790612 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 11/06/22 at 09:56pm, Vlastimil Babka wrote: > On 10/24/22 10:14, Baoquan He wrote: > > SLUB allocator relies on percpu allocator to initialize its ->cpu_slab > > during early boot. For that, the dynamic chunk of percpu which serves > > the early allocation need be large enough to satisfy the kmalloc > > creation. > > > > However, the current BUILD_BUG_ON() in alloc_kmem_cache_cpus() doesn't > > consider the kmalloc array with NR_KMALLOC_TYPES length. Fix that > > with correct calculation. > > > > Signed-off-by: Baoquan He > > Cc: Christoph Lameter > > Cc: Pekka Enberg > > Cc: David Rientjes > > Cc: Joonsoo Kim > > Cc: Andrew Morton > > Cc: Vlastimil Babka > > Cc: Roman Gushchin > > Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> > > --- > > mm/slub.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > As only slub is touched and there's no prerequsities in the previous > patches, I took this to the slab tree, branch > slab/for-6.2/cleanups Yes, it only changes slub code. Thanks for taking it. I will resend v2 with the left 7 percpu only patches with update.