Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3821681pxb; Mon, 4 Oct 2021 10:18:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpsRvlGQoaUlfKJxy2/01BZLD4pv1/JcujQylrEEU4Vsm8oNeSoOZ/EUpJs+l70O2GRU8t X-Received: by 2002:aa7:d59a:: with SMTP id r26mr19339388edq.86.1633367936498; Mon, 04 Oct 2021 10:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633367936; cv=none; d=google.com; s=arc-20160816; b=N/RHefDeSDTI521z7C9aXk24A4PqhCLEYK2JgHpbtvHgZT/njpnetPPquRkBg0W8rS A6jPaDEpdavznKNpePACQiqFkBYo/BZKBQTTZCGVS/V/XA3VgmDcUUgcJ8xlVwvw42Ba lDNhFoNfxHlGH4eZSw7IGFTMEKmjhs2TokXtFLJH6cUcAGnm+VmAiQbS2K8exPin2Eqi jfUyq62KgrclmmyVcHnHIG4FH1xsxPcYktI0wozTo9jMzLL/wLC/deK8OkQscSksXm0d KLYitTgJIsM/HURCjc0iNmnacsU6RYgoKlYl5BdDoNvuvkI4FLZ8T7AmEWL83qSXbeVC Ck2Q== 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=G9ezp7evjOZKJ358P904p9qdWMlp+LXB67WAKDUGAvU=; b=swEErlJvcQvB2+jmPBYH/m1VMVxps10qd9YrRQ5SjBNhzmMTzqaRKds+bBJHgf/Rno sPBQWhgeOF4E9tEhtAh/cS+fHBjoIZ2CWB+mzorDJfTDXAcaK+lFupHyR2Zk9ZFB4GkV uqYPo9CjzHgMIeS4cgK2Extps5uP5i4QwB+L3E55/vfouFAwCXhPlRs9fpLq93RRV/mw EekktbmAL0hu/IPI8NhCa0rhFl94iuiLNSsCspkOnYK77UkNgNYZ3yar6pwg93MWV+Pp QHuaGxMbqV2jCO4AxmvhEsmcIKVzFuOCVqE3IIoMwINQ5g+9KgiwGf+LZXMnPhjpq+ng fs0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fDVZp6zU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd16si11399823edb.501.2021.10.04.10.18.29; Mon, 04 Oct 2021 10:18:56 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fDVZp6zU; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233617AbhJDOY3 (ORCPT + 99 others); Mon, 4 Oct 2021 10:24:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233384AbhJDOY2 (ORCPT ); Mon, 4 Oct 2021 10:24:28 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B17EC061745 for ; Mon, 4 Oct 2021 07:22:39 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id h1so3937216pfv.12 for ; Mon, 04 Oct 2021 07:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=G9ezp7evjOZKJ358P904p9qdWMlp+LXB67WAKDUGAvU=; b=fDVZp6zUdjdIrAJ4sxqkNxQwpOBzbMrmRJKzHx1YIV96EQzpOKrz4oAL73lx4ohBOK HSZCs/pdurVBOY01RbN2jVygRzzFwLNF89CI8gL0Aa+uC7NgFKuEK3fkLGvj6a4khyjd s8LBkUGKzgjAYEfCQcf46xF6tHb3mXvsp9PZiq0ZmVy9VEX8oNcjh9+ac2KAfUhMI4Bt ZqxCnKHzGfUovEoCQLy3Jq2irgWApPKgDK0wfGOapR8HVkilgwS6VSgOg7rgU9xQC0SX prmsfH/GjvWsQNFzWOUFq3QprF+LHoKVTIpDuQAM83wV2TecN1hel3LJRXdQqA+QlKUD mnxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=G9ezp7evjOZKJ358P904p9qdWMlp+LXB67WAKDUGAvU=; b=J4HKR9610PvHQw33IVc7B4gsSjeqbco0AXKyPHwwY26bKzTIDObqZBgjSj9+thcrbj V0pkJOmAWSUq2MldwCKdOjqu8+UbZbFtsGGfslAP/+syg7UaX5n+5TvueBYOt4wV6f4K W2QQNJq+iHRx6o49M4GV0iv+AAn6/QwzC+VztfgT4WYV/ShkEFj+vmRxxMQE0B34JUvR 3gkFjNacmiPvjFpVYgwNOjheYWZAYpw2uSUcJu3UbZw13ms+zsHIYwFYfPLYPk2Ol0zU zWTv4P6w9FPOrDc1tjwM8sGdj0HGwvSNNJ2qKT+6vXeo3/wKGXaKZ5yRqA+dN0H4WKoI +WSg== X-Gm-Message-State: AOAM533+iJJBh2/pboyDwI5AEs1q+Yn9WuqoN4ssbHK64MZvGW0ksPN6 HPxi5GsLNZWEnisHYyFYNdg= X-Received: by 2002:a62:8c93:0:b0:44c:faf:43cd with SMTP id m141-20020a628c93000000b0044c0faf43cdmr20165717pfd.5.1633357359042; Mon, 04 Oct 2021 07:22:39 -0700 (PDT) Received: from kvm.asia-northeast3-a.c.our-ratio-313919.internal (252.229.64.34.bc.googleusercontent.com. [34.64.229.252]) by smtp.gmail.com with ESMTPSA id 8sm13859473pfi.194.2021.10.04.07.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 07:22:38 -0700 (PDT) Date: Mon, 4 Oct 2021 14:22:34 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: linux-mm@kvack.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [QUESTION] is SLAB considered legacy and deprecated? Message-ID: <20211004142234.GA3065@kvm.asia-northeast3-a.c.our-ratio-313919.internal> References: <20210927090347.GA2533@linux.asia-northeast3-a.c.our-ratio-313919.internal> <8aa15f4b-71de-5283-5ebc-d8d1a323473d@suse.cz> <20210928111231.GA2596@linux.asia-northeast3-a.c.our-ratio-313919.internal> <20211003055928.GA7643@linux.asia-northeast3-a.c.our-ratio-313919.internal> <8224ddae-88f5-63ab-c375-473462c50efe@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8224ddae-88f5-63ab-c375-473462c50efe@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 04, 2021 at 01:34:17PM +0200, Vlastimil Babka wrote: > On 10/3/21 07:59, Hyeonggon Yoo wrote: > > Hello Vlastimil! I'm happy to discuss with you. > > I hope this discussion to make us think about slab allocator. > > Yeah, it's useful, thanks for asking! > Me too, Thanks for answering. > > On Fri, Oct 01, 2021 at 04:07:56PM +0200, Vlastimil Babka wrote: > >>>> In some contexts it's still being preferred, AFAIK. > >>> > >>> In what context is SLAB or SLUB is preferred? > >> > >> I don't know the full answer. With our distro we have used SLAB, and > >> switched to SLUB after verifying that there are no major regressions. > >> Better debugging features were perhaps the major reason. > >> > > > >>> And what is the core reason that SLUB is used by default? > >> > >> The usual reason in MM, nobody objected :) > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0acd82080768 > >> > > > > What was the decision based on ? performance measurements or anything > > I haven't been around back then, so don't know. Also tried to find this > particular patch (and possible replies) in the linux-mm lore archive, > and didn't succeed. Might have been event sent off-list by mistake. > I can't find it in the list too. Maybe it was not sent to list. > >>>>> 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. > >>>> > >>> What makes you to say 'To some extent'? > >>> That's what I'm curious about :) > > > >> "To some extent" because SLUB is default and if some new stuff was added > >> that only worked with SLUB and not SLAB, there wouldn't be major > >> objections expected. > > > > You said new features are added to only SLUB and there are no > > objections expected, But what makes you to do so? > > > > You are not saying why. what you are saying is just only result. > > What is the mind behind maintaining SLUB and neglecting SLAB? > > David explained it well. I'll add it's a question of motivation, people > generally add features to the subsystem they prefer, and most prefer > SLUB these days, and in that case we don't require the same feature to > be added to SLAB (or even SLOB) as well. But if someone wants to, we > also don't stop them - but to some extent. If someone suddenly came up > with "SLUB has this nice debugging and SLAB not, so I will reimplement > it there" we would be questioning hard if the code churn is really needed. > I got your point. no need to take unnecessary maintenance cost. Thanks, Hyeonggon