Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp791817pxt; Thu, 5 Aug 2021 11:46:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNvmqgBll5eKbC2bTqTggcxRiHm4oEZx9vzoHSbLn2qqhJm8LbYK2TfYgT/OA2k/fNQOh3 X-Received: by 2002:aa7:d899:: with SMTP id u25mr8385373edq.151.1628189205129; Thu, 05 Aug 2021 11:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628189205; cv=none; d=google.com; s=arc-20160816; b=jZAlyfxsppfzPM40EGJlDFdsGymIdfpV46uEtFlS2CzHBvtzJ/0OQ+myk5cDDTnuHG jcTXfsEZFmEofR2hO+Hn8AwMX4lAt/9xbl8Mutl11oUSzBwN2rEzULLOFPVu1mhRw0nq TGNl/ogoetr8kUWi1/hIaXOgKqt3cUZSNMiv5Z3ZgWoXrDAZ752tRbkLxI2Qlr2YX81e TeSdwml2TOFM75ynpG88UjfVy3uMNoEKHUsdVpxrq/4By8STnU3fqia2xA/B+oNQGdWp iSUF50irBlmz6630CuPs8txfOsUAGYlsIAz5gfa9+ikKlEUG7v0NxVdTEnSQSzRNBKuL v8Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=oIPKR8wh8GFRHbfvvx5orNH+gLTr2c1nG0HwbhXdS6A=; b=t+QOxoApKPvQYLSTW41v3mJ8uMW0HP2Z1BHAGO4CCyd/EoxhY0CN7nvO0OQiyCJ2ID qurZZHRfxgSSrtPUycPhfqcqFYUGBe7mqZnAquHlXoX0StKqIZiRaMZRlRfT7cA7JnJJ /FG/IboRR7C3hm2fs4HJl6jVuwBxJcvSyfQM3b0oChAbYnwjjWkzFxUFGYQQ2klV1SqE teak4Rmyr7Y5ktfCdjK/7WP7FyU9mulXkSKTPj4tqzp7sEoC4XEiBT9zQa/V+XHc+KEG IPAJC50HzyhlJ4QOiT/6BOklxqNnCdt20UbbEIbfDvUrBc6frAzXZN40XCe3n0QlWr7K VkMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=DvCOyy4G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=WX1iiByd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o15si6143538edc.22.2021.08.05.11.46.21; Thu, 05 Aug 2021 11:46:45 -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=@suse.cz header.s=susede2_rsa header.b=DvCOyy4G; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=WX1iiByd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242091AbhHEPVm (ORCPT + 99 others); Thu, 5 Aug 2021 11:21:42 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:33952 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241769AbhHEPUU (ORCPT ); Thu, 5 Aug 2021 11:20:20 -0400 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-out1.suse.de (Postfix) with ESMTPS id 0E35F2230A; Thu, 5 Aug 2021 15:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628176805; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oIPKR8wh8GFRHbfvvx5orNH+gLTr2c1nG0HwbhXdS6A=; b=DvCOyy4GzvizAhEwlIXRLWZCMdbBVtzM4sk1g4NaGd4tscBFxNkGm+w6UB04uT8vlI23Ge mv59U+UdiXuFAMsGkXWh+f8nSmDJqaBrYv5N6H3SWYym3TIFVEtPNyFuuwBx2Cu/2IVANT 4RvD3v56UTXSaZ0RT5mfrf0sB5FuZSs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628176805; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oIPKR8wh8GFRHbfvvx5orNH+gLTr2c1nG0HwbhXdS6A=; b=WX1iiBydl+rNMfqXvA19XSJO16aeAa7HCq/TymHD85ixlvmCYPOt/kwo88bdZtlW6CH/+h rSHNPUigkQBgH6Dw== 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 D4E0D13DAC; Thu, 5 Aug 2021 15:20:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QJVbM6QBDGFDdQAAMHmgww (envelope-from ); Thu, 05 Aug 2021 15:20:04 +0000 From: Vlastimil Babka To: Andrew Morton , Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Galbraith , Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Jann Horn , Vlastimil Babka Subject: [PATCH v4 05/35] mm, slub: remove redundant unfreeze_partials() from put_cpu_partial() Date: Thu, 5 Aug 2021 17:19:30 +0200 Message-Id: <20210805152000.12817-6-vbabka@suse.cz> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210805152000.12817-1-vbabka@suse.cz> References: <20210805152000.12817-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit d6e0b7fa1186 ("slub: make dead caches discard free slabs immediately") introduced cpu partial flushing for kmemcg caches, based on setting the target cpu_partial to 0 and adding a flushing check in put_cpu_partial(). This code that sets cpu_partial to 0 was later moved by c9fc586403e7 ("slab: introduce __kmemcg_cache_deactivate()") and ultimately removed by 9855609bde03 ("mm: memcg/slab: use a single set of kmem_caches for all accounted allocations"). However the check and flush in put_cpu_partial() was never removed, although it's effectively a dead code. So this patch removes it. Note that d6e0b7fa1186 also added preempt_disable()/enable() to unfreeze_partials() which could be thus also considered unnecessary. But further patches will rely on it, so keep it. Signed-off-by: Vlastimil Babka --- mm/slub.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 4ac4ad021fca..812345fdf13c 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2463,13 +2463,6 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) } while (this_cpu_cmpxchg(s->cpu_slab->partial, oldpage, page) != oldpage); - if (unlikely(!slub_cpu_partial(s))) { - unsigned long flags; - - local_irq_save(flags); - unfreeze_partials(s, this_cpu_ptr(s->cpu_slab)); - local_irq_restore(flags); - } preempt_enable(); #endif /* CONFIG_SLUB_CPU_PARTIAL */ } -- 2.32.0