Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp520779pxb; Wed, 27 Jan 2021 13:45:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUHTTGgPx0adldCm3Ap6CG9R9TCURP0eK/9Y4jgONrQ58EcV7EU4KMwmS12e75v9qEyN45 X-Received: by 2002:a05:6402:54d:: with SMTP id i13mr10868343edx.12.1611783941181; Wed, 27 Jan 2021 13:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611783941; cv=none; d=google.com; s=arc-20160816; b=pHOG1u2Wv/dUjbOZJj9kv/1lHbp2y1CR45gdZczQ3W8BUcNo6zTL38bwuoTrB+Ix1/ TAxtw5I0zTbXuisB1AKC7G71Tqjb7J3o9jNw5FTc6neZCSM5jZFiceLMblOpjrkdd0FZ Sz4qdVzLkBjYSnIBVIQjxbU6dtZIOyD6vw9PuxGTT637hxuUzuOYr3OyhIh7ouZDy/QB fQE4g4TrdoXJTBPS50j1PIyi47AXtSOBmejSKxxjsYey9P4rxoZXF5o9inqhMXOvGOIg oqbA2GRpTPFNNHfEbhRnCX7fomOtbrIhVUFDZJPfGDoWF4nw9qe2myYyNisldzR4Y2Xc mruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=ADujusbn//Wlw9+oypFf1vQfhDJ6kGoQkyQUiSyZPW8=; b=YbhZbxboRee7yecVNzxl5CMHbt8JFyOeoRvUm4Ok+9XTUnphSUB0yXtVQmBRhpGU/W byDiqLs2JQ2Umnp/erryTXPI/0Zd5fjmX4SldfMRKy8PBJPcMY/QaAXeL62kHVISYitv pWkddaBb9InrUsk+iMyoDX7TB9D0UkMMTMvK+qktjCSx41iZFxSd8uXzmLXrtLdqWgaY enh/hlAzJSO9a7buEQKOO/eQ19EL7dloeBHkxZIZpxRFv+O+lNasH2LinjmY8i1t/eYQ 1eKHxzmCk0Z2z3Xo1gwuyAYbj5T9oEVAFoaNtqopDGejVZvrH0/kih6UjipqpGGcviHL 2KdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si1586974edt.204.2021.01.27.13.45.16; Wed, 27 Jan 2021 13:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233167AbhA0JOk (ORCPT + 99 others); Wed, 27 Jan 2021 04:14:40 -0500 Received: from gentwo.org ([3.19.106.255]:54266 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231405AbhA0JLJ (ORCPT ); Wed, 27 Jan 2021 04:11:09 -0500 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.