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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97002C6FD1C for ; Wed, 22 Mar 2023 13:30:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 156056B0071; Wed, 22 Mar 2023 09:30:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1078B6B0072; Wed, 22 Mar 2023 09:30:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE9AF6B007B; Wed, 22 Mar 2023 09:30:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D8CAB6B0071 for ; Wed, 22 Mar 2023 09:30:48 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A5043AAF06 for ; Wed, 22 Mar 2023 13:30:47 +0000 (UTC) X-FDA: 80596619334.27.C76B86D Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by imf03.hostedemail.com (Postfix) with ESMTP id BD80D2002A for ; Wed, 22 Mar 2023 13:30:45 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=dAp2Sm7P; spf=pass (imf03.hostedemail.com: domain of merimus@google.com designates 209.85.219.175 as permitted sender) smtp.mailfrom=merimus@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679491845; a=rsa-sha256; cv=none; b=sJT6nfKANt+i1Sx3+nsfdqNcKLxrDyIcKL2C7lV5xDMXAra/kmPXnCoXYAG2N0VRZdSQZq OUzt80axEEJbS5Lelk7EXH1h0ktu6KQZZoWEGhwLv6wQXjYYadpH1ngTe920lP4UnOmzuO Q9CVOyhHwtDHO5KDxK/V3iTYl/oLzE4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=dAp2Sm7P; spf=pass (imf03.hostedemail.com: domain of merimus@google.com designates 209.85.219.175 as permitted sender) smtp.mailfrom=merimus@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679491845; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=Fj1ZEndN827h6H99ZndY6ISgjudYJ+QA+1NK7dJ1MKY=; b=kHWyaXJo3FgmEs5aCGpeLSop6ptY8uKgmTDMHijIzDtWl6xwcfJg7UkeGaV7R6GKmNBBC9 DR77bKXeJvxISp1qm5BYFWNOabQWAeA47f3i9tQta/OW0H9N4rABARpqD7OniaZ8jeWQ6R 0uGXpgGHagGensiWXOJuKwl4E/12nnM= Received: by mail-yb1-f175.google.com with SMTP id k17so10219467ybm.11 for ; Wed, 22 Mar 2023 06:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679491845; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Fj1ZEndN827h6H99ZndY6ISgjudYJ+QA+1NK7dJ1MKY=; b=dAp2Sm7P7M3MQaKNyWk6eEx7+O4qGXWX0+DMyeBe3i97co13uziImImpyMJGF4jLLb xA77N70wHknYdtIkxdMcbPBi2dV8fgnGDSaeaFCa1mFqNyi2hAATsozRzSBv/TnqPMkF p09JSU9UaWA35VbyplGqVFuvokTma7h74NFHl8ZLBKedG+qa8hQwxqEo3Q/saaytLRUt ofrdVXGmJBE5HUYGnmLV2DdhSwXE4W2Ugc8LdfDSnlBxpyp7jCxvYpN09mVgXGfV4ziy GFKhfQ4GzQyhKr+1Ky1+Ok7ncgb4g4cPb8nGHR4kSsvg1DAbYXUUWTkSj/BZF9mwKCf5 lJ3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679491845; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fj1ZEndN827h6H99ZndY6ISgjudYJ+QA+1NK7dJ1MKY=; b=OvQ1QT1PoaedBqPQMq9Dmlgx06cVHxeGc4h2Q3r/VsW1oyH7zhZgga6w3lRkxoMGRu ROJ9lwaaFsKx4/dfj9Xqd0cYtHkxU1HBVvyVTam8iKyuvM9LZC99OVFRwBZTw0cx7xlS rWNm/IyAuuEyWZPjg9pd+xKrY+mffvhNM+D0taezqAQYnF8Vlk7MP1LujcttxjE9jiM3 QtyZgcHMGfMfWN7Zd9D3Hf1MSYCMRy+1KWncGmDztblGwEMyRnkObKrJ4MjpbhiH/F9Y fyTtG6NjeVyMbACFbCXv/JaGVj7SjOd58p6im3DonyAcCNQY2n96zOXztUrqyDsYDHWl xnUQ== X-Gm-Message-State: AAQBX9eS6PrSwjyq9lRt92aRMrmyJiegDVFOT0oU+a9BLqz7N+yydeL7 6DvmlEJpDBvnyAlzwjEGA6A9AlUzJ9TkMqwBPKZ9vA== X-Google-Smtp-Source: AKy350bWFZJIkHw1dTAPTwr1WPguwRn3chvLp7222Dwm6xMXDK8TwrXNFJdroXPfKjAnjFCm6fSEeVSjJIIxXsUW6gM= X-Received: by 2002:a25:5456:0:b0:b69:eb08:8f3b with SMTP id i83-20020a255456000000b00b69eb088f3bmr5910216ybb.4.1679491844680; Wed, 22 Mar 2023 06:30:44 -0700 (PDT) MIME-Version: 1.0 References: <4b9fc9c6-b48c-198f-5f80-811a44737e5f@suse.cz> In-Reply-To: From: Binder Makin Date: Wed, 22 Mar 2023 09:30:32 -0400 Message-ID: Subject: Re: [LSF/MM/BPF TOPIC] SLOB+SLAB allocators removal and future SLUB improvements To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Vlastimil Babka , lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, bpf@vger.kernel.org, linux-xfs@vger.kernel.org, David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Roman Gushchin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Queue-Id: BD80D2002A X-Rspamd-Server: rspam01 X-Stat-Signature: 3w1wi639px3u77ychs4ietf3519cuwk4 X-HE-Tag: 1679491845-378391 X-HE-Meta: U2FsdGVkX18bff0MwHtfHwKHJ4T0LOtAoADLZl4fF5lG5jmsMwtPay6j9GVC/3WDJwTWpQ/tbaJ1NpWT7t0y1OMo00VSgxcLvIEEizX0b7b4cfvSnkVEIZ1QVTJ1pLTRGqlunzVEWy8NgBGz5hZqFuWAw7bVfNx42mEN/GM6kS/1V5m0HqAj6gcEVwyIySIb94hzdV2enwDSiXJUYe8DY8CAQ6gvTbwTHoY8cFJMdjKJ0oFlARr5xfGj5xep+kfwMTm9LEmoHvyATlEbrDx+7bC6ioVsJnuBOpbID7CdlAqBN6RKppWXXzMhNwogVxqvt2LxvbGk9HjT+R/CvsmDjljUSNq+9McwIESuzqxOXM1jAXga81y/AxlZcakTvAq8BKBbB107bQhVoEo92oLcczUZN4JBnUBmDR+KvmLv9zMav3bUFzaHGEa16K8OZEOxki8akjHDJJvw2k6PwThUM+eI/nyWlMJkrFtHC9OHmUma+2xJzoObT1QSr3+0Cidow27PUB+5/X11BGkKIqFBCEGviWT3T5QEBx9YnIUGIBvitjcTv3/KyMD8+gy9oWmPorpOpoylr80NeuDdbmeAZYHTn0WWT/VG1q0o2sfwlZSg2zY8VIbLkZDw7y8ah5lvG+kuv0FvS3A9UCMYuixjBzy8YsT8jETCOJ+VVsT38vF6jPBR7T2wHtfPfL5ySqqoqhGOclrrw6VRDxREe+lLS+B0yH3Phyv2X+WVqV3pSQ3O1y3gENkeDkBJNoUaObdfBIzP5sD1EWo42RhA+krccrmIemr3vo55V0gP21jGHzlUjsY5gxuY3ZXrUOvy/0vReUP6Lp1G76nz7zhokGDZGMaadODDXfts2yvJUH8NnYfYTa462KagPK6+O+vKy01AWWUM3UoLloxOJP8FPFmTQibvcb+dNI4d8WAY331ZOi3EVSV5LQXm4RoBcpbjAao4G8Bj6QvwGe8sx4KuN9F KviOEyxD bYh0UVyaJWyJ3I9ozyrsbuLztnlvadv0Q+ewqMh+GCge2isg7HDPc4679B/rrHMbYiemziuvc4YNfTHhDrWs3QUegcsoMdYiX5NrLHbalQGd5aBzqhOMiCAq/y0EGhm04vc4S85OxeBxLDiRvfbuACyyGLQOimEfFuKjs7GXpO39M9eTQ7SWoCyrj2Hy0zX9HlNUlnb0ctYW1X0DaCPjdwyrJkehgzwyD7QRDMo+BpT66xfmQKNdLnhDdRXdnGVW1vXz8Jc87rSJELNp6bj+qxlPcckBG9PW1MUbjp1JPHDoj2AsP25wsNib0hRO1uz/1OfL/NMHRkboyxmA= 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: Blah, sorry, lets try this. https://docs.google.com/spreadsheets/d/e/2PACX-1vS1uiw85AIpzgcVlvNlDCD9PuCI= ubiaJvBrKIC5OyAQURZHogOuCtpFNsC-zGHZ4-XNKJVcGgkpL-KH/pubhtml On Wed, Mar 22, 2023 at 9:02=E2=80=AFAM Hyeonggon Yoo <42.hyeyoo@gmail.com>= wrote: > > On Wed, Mar 22, 2023 at 08:15:28AM -0400, Binder Makin wrote: > > Was looking at SLAB removal and started by running A/B tests of SLAB vs > > SLUB. Please note these are only preliminary results. > > > > These were run using 6.1.13 configured for SLAB/SLUB. > > Machines were standard datacenter servers. > > > > Hackbench shows completion time, so smaller is better. > > On all others larger is better. > > https://docs.google.com/spreadsheets/d/e/2PACX-1vQ47Mekl8BOp3ekCefwL6wL= 8SQiv6Qvp5avkU2ssQSh41gntjivE-aKM4PkwzkC4N_s_MxUdcsokhhz/pubhtml > > > > Some notes: > > SUnreclaim and SReclaimable shows unreclaimable and reclaimable memory. > > Substantially higher with SLUB, but I believe that is to be expected. > > > > Various results showing a 5-10% degradation with SLUB. That feels > > concerning to me, but I'm not sure what others' tolerance would be. > > Hello Binder, > > Thank you for sharing the data on which workloads > SLUB performs worse than SLAB. This information is critical for > improving SLUB and deprecating SLAB. > > By the way, it appears that the spreadsheet is currently set to private. > Could you make it public for me to access? > > I am really interested in performing similar experiments on my machines > to obtain comparable data that can be utilized to enhance SLUB. > > Thanks, > Hyeonggon > > > redis results on AMD show some pretty bad degredations. 10-20% range > > netpipe on Intel also has issues.. 10-17% > > > > On Tue, Mar 14, 2023 at 4:05=E2=80=AFAM Vlastimil Babka wrote: > > > > > As you're probably aware, my plan is to get rid of SLOB and SLAB, lea= ving > > > only SLUB going forward. The removal of SLOB seems to be going well, = there > > > were no objections to the deprecation and I've posted v1 of the remov= al > > > itself [1] so it could be in -next soon. > > > > > > The immediate benefit of that is that we can allow kfree() (and > > > kfree_rcu()) > > > to free objects from kmem_cache_alloc() - something that IIRC at leas= t xfs > > > people wanted in the past, and SLOB was incompatible with that. > > > > > > For SLAB removal I haven't yet heard any objections (but also didn't > > > deprecate it yet) but if there are any users due to particular worklo= ads > > > doing better with SLAB than SLUB, we can discuss why those would regr= ess > > > and > > > what can be done about that in SLUB. > > > > > > Once we have just one slab allocator in the kernel, we can take a clo= ser > > > look at what the users are missing from it that forces them to create= own > > > allocators (e.g. BPF), and could be considered to be added as a gener= ic > > > implementation to SLUB. > > > > > > Thanks, > > > Vlastimil > > > > > > [1] https://lore.kernel.org/all/20230310103210.22372-1-vbabka@suse.cz= /