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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1DB2C433DB for ; Wed, 27 Jan 2021 09:10:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3FC5520758 for ; Wed, 27 Jan 2021 09:10:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FC5520758 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9F4066B0006; Wed, 27 Jan 2021 04:10:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A3EC6B0008; Wed, 27 Jan 2021 04:10:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BD5B6B000A; Wed, 27 Jan 2021 04:10:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id 71FC86B0006 for ; Wed, 27 Jan 2021 04:10:16 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 33612BF1D for ; Wed, 27 Jan 2021 09:10:16 +0000 (UTC) X-FDA: 77750983632.12.stem24_6117bb127595 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 0A55E180498BC for ; Wed, 27 Jan 2021 09:10:16 +0000 (UTC) X-HE-Tag: stem24_6117bb127595 X-Filterd-Recvd-Size: 3080 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Jan 2021 09:10:15 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 99AAC3F55A; Wed, 27 Jan 2021 09:10:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 960993F05F; Wed, 27 Jan 2021 09:10:14 +0000 (UTC) Date: Wed, 27 Jan 2021 09:10:14 +0000 (UTC) From: Christoph Lameter X-X-Sender: cl@www.lameter.com To: Will Deacon cc: Vlastimil Babka , Vincent Guittot , Bharata B Rao , linux-kernel , linux-mm@kvack.org, David Rientjes , Joonsoo Kim , Andrew Morton , guro@fb.com, Shakeel Butt , Johannes Weiner , aneesh.kumar@linux.ibm.com, Jann Horn , Michal Hocko , Catalin Marinas Subject: Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order In-Reply-To: <20210126230305.GD30941@willie-the-truck> Message-ID: References: <20201118082759.1413056-1-bharata@linux.ibm.com> <20210121053003.GB2587010@in.ibm.com> <786571e7-b9a2-4cdb-06d5-aa4a4b439b7e@suse.cz> <20210123051607.GC2587010@in.ibm.com> <66652406-25e4-a9e7-45a1-8ad14d2e8a36@suse.cz> <20210126230305.GD30941@willie-the-truck> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Tue, 26 Jan 2021, Will Deacon wrote: > > Hm, but booting the secondaries is just a software (kernel) action? They are > > already physically there, so it seems to me as if the cpu_present_mask is not > > populated correctly on arm64, and it's just a mirror of cpu_online_mask? > > I think the present_mask retains CPUs if they are hotplugged off, whereas > the online mask does not. We can't really do any better on arm64, as there's > no way of telling that a CPU is present until we've seen it. The order of each page in a kmem cache --and therefore also the number of objects in a slab page-- can be different because that information is stored in the page struct. Therefore it is possible to retune the order while the cache is in operaton. This means you can run an initcall after all cpus have been brought up to set the order and number of objects in a slab page differently. The older slab pages will continue to exist with the old orders until they are freed.