Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1204252rwb; Sun, 6 Nov 2022 21:29:10 -0800 (PST) X-Google-Smtp-Source: AMsMyM7L+ohJl5n4QCiVmM9hf3E2eGCYcSbh07A4YGR48bf+Aau/WbVm18XdOf6Ts3ResGzavi8L X-Received: by 2002:a05:6402:4446:b0:457:eebd:fe52 with SMTP id o6-20020a056402444600b00457eebdfe52mr18332761edb.234.1667798950625; Sun, 06 Nov 2022 21:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667798950; cv=none; d=google.com; s=arc-20160816; b=HoSJ5KgD2bLnwc6OmgSS/X9aVMz4ntrYlCJWmWk+9d40M24by7IsUznXitgeVsbGm7 2mPuoaTNptgW6OLVnkdeY461OCwF0kEFBnFeoTEQGyy3n0QR5QvPVM4P4gV+qml1mC9T 4TyqmwGJM4oIBEmZ4PFdnVotDce9UCQZ/JaO7kSHNYia8TnKCQn5lhEy8mW5CUpI6+JY e4GXFHI/OyI9uGXUnRqg+oMhafr6wI93vA0Qls83SsiTbq2l+TLxpVi6UCE2h/rQbG+C YL4bd0+xDpR0DBkUm3+ePLIrMzF9Q0UBkli0Gq/i+/Oy4zPr3gxGO+wtFnkSpgW7tRJg i2vA== 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=L57ypoeYMk6I2Bcn67ySi5K7HfBryn3CWbm8eC7QAIo=; b=CEtahfFjamK8Y0hH8csDPHF3SZg0/o/JVATJiHmBwyitbFNaZ82GnhpiwBPErNKjbu 8qJklXeHNNe2xm+/hPhhsnoh6LeJuJaV8jOoRTqvIEsVAq2L5icyHJx5EaKvYWZy5veQ S84sG+msIpMPhlUg6Yi/KAaR+Or+xmKMTN6n0GstSqtjrUA61uhtwZyz/FS6cXGUXMYm tWFzqxD8q16eT8qnXexCJ0e1qxtJHb8eLYI2GhHPPM9OhrEyVp1XU4B0NWwyCSyo32EV suJCswhCsneZSGlwenY365it2EiDoj6HrUmHp3NlSmChxiEtmJqkbD7eMQHB/x1S8FlU vrEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IEDD6ST6; 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 hr14-20020a1709073f8e00b0078d878d8fb7si8348233ejc.920.2022.11.06.21.28.24; Sun, 06 Nov 2022 21:29:10 -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=IEDD6ST6; 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 S230395AbiKGEhH (ORCPT + 96 others); Sun, 6 Nov 2022 23:37:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbiKGEhG (ORCPT ); Sun, 6 Nov 2022 23:37:06 -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 67E74DFA8 for ; Sun, 6 Nov 2022 20:36:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667795771; 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=IEDD6ST6UJpw62zUc2gQvYmbCrHPquMW6YUTIElkubqkHkLBTavgXJFrxnOyPQZMU+OGDi 9BsjSRO3CVhs8CZ6y9ybdyc5N4QBGmm9lWVodfZdkzJFZsWskcqYGVQs/1dHox4lXuTn9F yC2aZfWDBB+OFLotU3dmfdpekRaMjVY= 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 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 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.