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 A0AE5C4332F for ; Mon, 7 Nov 2022 08:23:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1188F8E0003; Mon, 7 Nov 2022 03:23:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A1BC8E0001; Mon, 7 Nov 2022 03:23:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E84A98E0003; Mon, 7 Nov 2022 03:23:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D56B38E0001 for ; Mon, 7 Nov 2022 03:23:47 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B3366805FF for ; Mon, 7 Nov 2022 08:23:47 +0000 (UTC) X-FDA: 80105957694.15.4AE7E65 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 4C906C000A for ; Mon, 7 Nov 2022 08:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667809426; 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=4NlaTcXgAoZxfJFwezekk0EZPDhmSaS61HBI7QDfTXU=; b=NzZQk7hhwYl4Iq0F3fB/7fYul6ZurE5AEq21l3sp8MUSvkxk1WHV9cfPM/+N8VHVJm+1j3 MQ5RfwkbsQ7wSqy54jTb/num9bpiwlKezI/4RI5S/IPUZb2Gp9JE508ktd8noZTl5pZVw7 dL3fudaZHUdcojjxQWBmzN5Kf8aGZ1k= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-1Nt4XhUGOTaLNHEo_-iX9A-1; Mon, 07 Nov 2022 03:23:43 -0500 X-MC-Unique: 1Nt4XhUGOTaLNHEo_-iX9A-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 C343C86F130; Mon, 7 Nov 2022 08:23:42 +0000 (UTC) Received: from localhost (ovpn-13-134.pek2.redhat.com [10.72.13.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 770B940C6FA1; Mon, 7 Nov 2022 08:23:41 +0000 (UTC) Date: Mon, 7 Nov 2022 16:23:37 +0800 From: Baoquan He To: Dennis Zhou Cc: Vlastimil Babka , linux-kernel@vger.kernel.org, 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; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NzZQk7hh; spf=pass (imf22.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=1667809427; a=rsa-sha256; cv=none; b=gT//LuMBLIy47ZT/7Fxe9IjtP1CN9ae3Kw/yDhsUw9exiEs+jiyNZ5wjwFDGiwOEzIfIsb E1Y3UTU4ayqB8kDIjG1yaF95lLRPbawVte29LXa+BD+g3Gj/K9tGYJQIspwLFS7C8m1hb6 xiCv5YK9huJRNOX/FKYenCORNW3B7QM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667809427; 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=4NlaTcXgAoZxfJFwezekk0EZPDhmSaS61HBI7QDfTXU=; b=sOZyYS6eLFAMM51wiPG8TXRSmm8cXSVsPLBnbXPlmxqjE697VMJUK5NSSA9B1aIEJQVY69 a38FSktNTocU68+BmdQUZeTZC6GRsM9KB9gSzkhUmo6c4lp61RXc8I+12RY+PFgBkGDTls rKwpYLRyzUrbgCWmsGSsdqNQNikFkcA= X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NzZQk7hh; spf=pass (imf22.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-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4C906C000A X-Stat-Signature: byja4w1u4ddc8si1hd73h48qmwdi8qfw X-HE-Tag: 1667809427-994435 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 11:20pm, Dennis Zhou wrote: > Hi Baoquan, > > On Mon, Nov 07, 2022 at 12:35:56PM +0800, Baoquan He wrote: > > 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. > > > > > > Don't worry about resending them, I'll pick them up tomorrow morning. That's great. Thanks a lot, Dennis.