From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12A8833B6DC; Mon, 26 Jan 2026 13:59:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769435999; cv=none; b=U3fbe4bH7bcRMigM5mGOESgQ9MY0ofUBuprfp+Hy3dJCG//FPE4Mm1LdRY7DmrwZjS8gG1HSuuUdBpyXtscEb7nD0SMJFOLKeFxYpOUDfUKiwyCb6xa2J2ubnJ8n+Kn7/sW4ewd0ZMLfo477Y8BugQOelUgG1g09hl4KLYwdPd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769435999; c=relaxed/simple; bh=Jk058962S/z+UfR591wadY2ouZ+hkgMaDC0o0U/B/+I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Mvy/Q2D0PsIvFL6LO21vXmRhksiUJmdeZRoT3sktUl478YiS75DvGY42384HggsgBA3VjhTaZzcCxYClwxY8LP3bIAOuG8KBJgzSz1pR9ppXNPXh5F7S6JVZBK5CPlgsoOQbBoveyYg0iqrPFpa+MZzx4p8sUpZ/iRJnokhvcC8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=Q7sbxvHC; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="Q7sbxvHC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CA7ZM6arGeM7G5r4XYd+i+HkxrAcrO5ouJ48DYGWkxk=; b=Q7sbxvHCpdJlOA8+0uz3927nIV KNaaEpbu0uDEYOC7QS+Zsyy5x2BGTRKzrowzUL3FKnt5t/IUy9oI/eDR5hKyY71LyrAPNfoCM6Pi8 4N+4PiyYyDXCiRBrYAZnlsG2H2PofaRBU1DaJiOdtIumZ6/XHerpclx/I9lBDhVhrcavjvUTglMGM Aa2ychCEXyVFuE1KrRmDjZgSzJC1T8VHtw8tHRGvVdgGHHCnPG3AWncsMuyJ+Dzz139qym9F7UrdT tX77nPTY9Tl6MFne75lIndVhuZjUdk03NffssHw7WyF2nJZbOyytPo1c2eJeozzpZKtOlfBbITWJv BYbM6vVA==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1vkN7t-00GDx9-Lb; Mon, 26 Jan 2026 13:59:33 +0000 Date: Mon, 26 Jan 2026 05:59:28 -0800 From: Breno Leitao To: Vlastimil Babka Cc: Harry Yoo , Petr Tesarik , Christoph Lameter , David Rientjes , Roman Gushchin , Hao Li , Andrew Morton , Uladzislau Rezki , "Liam R. Howlett" , Suren Baghdasaryan , Sebastian Andrzej Siewior , Alexei Starovoitov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev, bpf@vger.kernel.org, kasan-dev@googlegroups.com Subject: Re: [PATCH v4 06/22] slab: add sheaves to most caches Message-ID: References: <20260123-sheaves-for-all-v4-0-041323d506f7@suse.cz> <20260123-sheaves-for-all-v4-6-041323d506f7@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260123-sheaves-for-all-v4-6-041323d506f7@suse.cz> X-Debian-User: leitao On Fri, Jan 23, 2026 at 07:52:44AM +0100, Vlastimil Babka wrote: > In the first step to replace cpu (partial) slabs with sheaves, enable > sheaves for almost all caches. Treat args->sheaf_capacity as a minimum, > and calculate sheaf capacity with a formula that roughly follows the > formula for number of objects in cpu partial slabs in set_cpu_partial(). > > This should achieve roughly similar contention on the barn spin lock as > there's currently for node list_lock without sheaves, to make > benchmarking results comparable. It can be further tuned later. > > Don't enable sheaves for bootstrap caches as that wouldn't work. In > order to recognize them by SLAB_NO_OBJ_EXT, make sure the flag exists > even for !CONFIG_SLAB_OBJ_EXT. > > This limitation will be lifted for kmalloc caches after the necessary > bootstrapping changes. > > Also do not enable sheaves for SLAB_NOLEAKTRACE caches to avoid > recursion with kmemleak tracking (thanks to Breno Leitao). > > Reviewed-by: Suren Baghdasaryan > Reviewed-by: Harry Yoo > Signed-off-by: Vlastimil Babka Tested-by: Breno Leitao