Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1374841rwb; Mon, 7 Nov 2022 00:32:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6GZfQuICBiR3RO4e8WBMFo5wclkMRZG5ZyCB+Pg4kc/e4f+0EDLHdWbogbPsL1EpcKdvvl X-Received: by 2002:a17:906:2317:b0:7ae:6cdb:870 with SMTP id l23-20020a170906231700b007ae6cdb0870mr2424304eja.338.1667809933453; Mon, 07 Nov 2022 00:32:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667809933; cv=none; d=google.com; s=arc-20160816; b=aPH9TIAvLzLHh/2fVjt3p1sno25RhnwPp3kOagx/NeEHl2Ip902OApdyTxxAHk9iTl dVMSjyNxmG+I7bFMwyNuHS0Sinm4MkgdPBtlrsbTnYJzTKZ3uDmuDsT0EkvBPbb9H0XC ziDtp3DRSvD71x/H+nYwjsXbFfZkD/VBgbaL0MirTf86mjI8GSprOK35GOpV09p+BzDp dRBTKyydd1SmOZtAuGrJtFnIbZ8JtSmpUD+5NVgMUtwUn7UrrfiaDg33qQvyA1jcPhSr hpASgmZdQmAIinG6RhgNJ5j0lMeP9ULsT1NgrMWaneaDmbxtoyJMGe9VLJQsVGdmmYvY hryw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4NlaTcXgAoZxfJFwezekk0EZPDhmSaS61HBI7QDfTXU=; b=qGyCAZ1ck1ufGFU3S6MYQWHLALdNLwSyT5ZqGcVznbVzlhxaISrd1IXMaBXh2ccX0I FxkClkRwDbJyE+4DUXxbhZa3CdV+bJgj1dduNo3DTCjj+mPDyXk2/XVr+arA0w+AMFC1 3xGAw7adx77UhQ8XOQ5AEWgnTEl+gesjDe5VvBzXHcz0MPGK+iRi2339x9zSXzi9wdJ1 mUjvipew+bvaRHuEeWdfKfB9jFWyHtP5pJWBAirjiFOGGj2BfYz+MKKtcD1HWqK5fhw0 wVkt/1sGU+jip2t2+3jSMUC0j4Puh+ngGrCQejOSmdtxgMSAJvht75mSw3nqcsSmDQaC Qxsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NzZQk7hh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020aa7cc05000000b004612915d1a0si7630512edt.507.2022.11.07.00.31.50; Mon, 07 Nov 2022 00:32:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NzZQk7hh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbiKGIYs (ORCPT + 95 others); Mon, 7 Nov 2022 03:24:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbiKGIYr (ORCPT ); Mon, 7 Nov 2022 03:24:47 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C44910CD for ; Mon, 7 Nov 2022 00:23:47 -0800 (PST) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.