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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C3AC433EF for ; Mon, 27 Sep 2021 17:03:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BAD9F60F46 for ; Mon, 27 Sep 2021 17:03:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BAD9F60F46 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5D67E940007; Mon, 27 Sep 2021 13:03:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5867F900002; Mon, 27 Sep 2021 13:03:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 476F2940007; Mon, 27 Sep 2021 13:03:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 3AC25900002 for ; Mon, 27 Sep 2021 13:03:22 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DC3F431E4D for ; Mon, 27 Sep 2021 17:03:21 +0000 (UTC) X-FDA: 78633974202.32.5B313D2 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf12.hostedemail.com (Postfix) with ESMTP id 50C2210000AC for ; Mon, 27 Sep 2021 17:03:21 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 004DC20181; Mon, 27 Sep 2021 17:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1632762200; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1eGUfOqPu/lBwkmpXEEWf9be9AIbg3skC9AUOGR+PNc=; b=eY+WNJRUcWKQSCqIUh5pqlcUJnX7wu1s2AewRudU0KhKD6YTAp405SJN5p0eUASBp1erpw JOCLZFzVeIuxd63kO3h5Y+NVt96K7a0XLoxOqwCWNRzjYJiwVCNWGHxY5Lgzz6475G7n4W KhT0vUSX2ddzMpb0husjLKJ4ipWt9C4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1632762200; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1eGUfOqPu/lBwkmpXEEWf9be9AIbg3skC9AUOGR+PNc=; b=N0RG5IjFRwQwL708PF1zjGwojvl15FahJuW0VPxsCnIuIcGg5hkEqkoVyVqimZDBghq42t LOWzqqDwkci8kpBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D23A713C08; Mon, 27 Sep 2021 17:03:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id BaiNMlf5UWEbCgAAMHmgww (envelope-from ); Mon, 27 Sep 2021 17:03:19 +0000 Message-ID: <8aa15f4b-71de-5283-5ebc-d8d1a323473d@suse.cz> Date: Mon, 27 Sep 2021 19:03:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org References: <20210927090347.GA2533@linux.asia-northeast3-a.c.our-ratio-313919.internal> From: Vlastimil Babka Subject: Re: [QUESTION] is SLAB considered legacy and deprecated? In-Reply-To: <20210927090347.GA2533@linux.asia-northeast3-a.c.our-ratio-313919.internal> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 50C2210000AC X-Stat-Signature: k6hebmxagwfeyoa18mzb458ho3ksqiw3 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=eY+WNJRU; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=N0RG5IjF; spf=pass (imf12.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1632762201-272658 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 9/27/21 11:03, Hyeonggon Yoo wrote: > Hello there, > > I've been working on adding 'lockless cache' on sl[au]b for a while. > But what it actually does is actually adding 'queuing' on slub. Yeah, I pointed out those threads from 2011 that called it exactly that... was there any conclusion why that was not ultimately merged? > So there is a fundamental question coming into my mind: > 'is SLAB considered legacy and deprecated?' To some extend, but not yet in a sense where we would have a deadline to get rid of it. In some contexts it's still being preferred, AFAIK. But it's okay if new optional features require just SLUB - for example PREEMPT_RT. > It seems there are little development on SLAB and people think that > SLAB is legacy and deprecated, so CONFIG_SLUB is used by default. > > But I think both has pros and cons for their own: > SLAB: more temporal locality (cache friendly) > but high usage of memory, and less spatial locality (TLB misses) than SLUB. > > SLUB: less temporal locality (less cache friendly) than SLAB > but more spatial locality (TLB hit), and low usage of memory > and good debugging feature. I'm not so sure about the usage of memory, SLUB can easily use more I believe. Instead of caching some arrays of objects it will have one or more private slabs per cpu, and the slabs are larger-order pages. > Why do people say SLAB is deprecated/legacy? Do they? > Thanks, > Hyeonggon >