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 656D0C433F5 for ; Fri, 15 Oct 2021 21:22:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CBF7560ED4 for ; Fri, 15 Oct 2021 21:22:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CBF7560ED4 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 47A8E6B006C; Fri, 15 Oct 2021 17:22:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 42A48900002; Fri, 15 Oct 2021 17:22:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 317DE6B0073; Fri, 15 Oct 2021 17:22:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id 254D76B006C for ; Fri, 15 Oct 2021 17:22:18 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D35DD184818B2 for ; Fri, 15 Oct 2021 21:22:17 +0000 (UTC) X-FDA: 78699945114.31.BD52C4E Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf25.hostedemail.com (Postfix) with ESMTP id 67247B000180 for ; Fri, 15 Oct 2021 21:22:15 +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 F08801FD53; Fri, 15 Oct 2021 21:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634332935; 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=JrEhU8m2xFa8ufvhfkz9KGyUkDSd12RuDsYYJ+HwGsM=; b=RflKShkXIxg2nOWZ/05zCxzmoW3p99JjCB9j1Yz8lysDF3Qie2hQwvqIkSz8o4TVvHI22l k4qBnUAiweo81hmD33B2snDKoHkHnVsatdc6wHGWrkJIYMxMF9MJKOhtPYc+Xc7mIYl5IT qLBOl0SqDLgJ3kgEJC9frKC1gpn53Ks= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634332935; 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=JrEhU8m2xFa8ufvhfkz9KGyUkDSd12RuDsYYJ+HwGsM=; b=zVxZXB4L4Pc0iZ0kA00WzGli3v66CJ6vqpSUcIKfZo3WeQ4wV6ohHZaWoh0gQwwbmFdEIj yPIVJHqcKd+TChAQ== 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 C5C3613D27; Fri, 15 Oct 2021 21:22:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OfFKLwfxaWGEaQAAMHmgww (envelope-from ); Fri, 15 Oct 2021 21:22:15 +0000 Subject: Re: [PATCH] mm: Allow only SLUB on PREEMPT_RT To: Sebastian Andrzej Siewior , linux-mm@kvack.org Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Ingo Molnar , Thomas Gleixner References: <20211015210336.gen3tib33ig5q2md@linutronix.de> From: Vlastimil Babka Message-ID: Date: Fri, 15 Oct 2021 23:21:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20211015210336.gen3tib33ig5q2md@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 67247B000180 X-Stat-Signature: 7soe4orz174xnwyamfce8qmbmjm4yj8b Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=RflKShkX; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=zVxZXB4L; spf=pass (imf25.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: 1634332935-393827 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 10/15/21 11:03 PM, Sebastian Andrzej Siewior wrote: > From: Ingo Molnar > Date: Fri, 3 Jul 2009 08:44:03 -0500 > > Memory allocators may disable interrupts or preemption as part of the > allocation and freeing process. For PREEMPT_RT it is important that > these sections remain deterministic and short and therefore don't depend > on the size of the memory to allocate/ free or the inner state of the > algorithm. > > Until v3.12-RT the SLAB allocator was an option but involved several > changes to meet all the requirements. The SLUB design fits better with > PREEMPT_RT model and so the SLAB patches were dropped in the 3.12-RT > patchset. Comparing the two allocator, SLUB outperformed SLAB in both > throughput (time needed to allocate and free memory) and the maximal > latency of the system measured with cyclictest during hackbench. > > SLOB was never evaluated since it was unlikely that it preforms better > than SLAB. During a quick test, the kernel crashed with SLOB enabled > during boot. > > Disable SLAB and SLOB on PREEMPT_RT. > > [bigeasy: commit description.] > > Signed-off-by: Ingo Molnar > Signed-off-by: Thomas Gleixner > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Vlastimil Babka > --- > init/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1896,6 +1896,7 @@ choice > > config SLAB > bool "SLAB" > + depends on !PREEMPT_RT > select HAVE_HARDENED_USERCOPY_ALLOCATOR > help > The regular slab allocator that is established and known to work > @@ -1916,6 +1917,7 @@ config SLUB > config SLOB > depends on EXPERT > bool "SLOB (Simple Allocator)" > + depends on !PREEMPT_RT > help > SLOB replaces the stock allocator with a drastically simpler > allocator. SLOB is generally more space efficient but >