Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5153582pxj; Wed, 9 Jun 2021 10:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmFbwKGTfYEqRBMjAo+j0eNQp9inxhfN93+ZD4EO5kjvAc4j/VAr+7MfHHtlgg0UDFI6MO X-Received: by 2002:a17:907:9801:: with SMTP id ji1mr861548ejc.523.1623259171565; Wed, 09 Jun 2021 10:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623259171; cv=none; d=google.com; s=arc-20160816; b=0DTQtgoRsQ2Zk+s7g4vV+0s7jSqIXa1pzp2GP2hU7JrG871zMUvkUijYNvKhDKalCO BkQtkg4z3zegCZ8tISanWAo8u2FWm4E+nRuHgxZkCi5TntCPnr50ErV7p3Bxtt+7dm89 8Ptk6E8fbw3FzqliXzP5G2r1DPajkie+p2vedz9q/NmYZSRHVp8tbboFB1ycpn6pqxl/ qmGAY2NKTe/2RgCUopAVOaFVosVtOfhahJgrvJgDryH2AnTX4t/6iBWyEQnxam/wmKBx 8SH2dzUPlkOvDRJz7mlQ1KeRT1UZrQD4QT14UddA0lfUvFbM2QRHJcdY6pTo4b3whyWQ a2ig== 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:dkim-signature:dkim-signature; bh=5JmSnpyHqca5PLmH1BHqymRQUyP4QdjzJkGjzwDILP8=; b=Z/f9h7e/I/tntqpX9uGZKqKNwIbz8Bc3pzkKUW5oOOjm6iK8Fhk/65ZOW6Zl0F85Ld TPaz5N+CNwbcKoR5hmhRtGOjEVmCWE+grvUC+9JYl2RQiDe3D1MJr8H2M/dr7MFrSWvc 1dAU59gyryK6pERDYxzSKrzv33n3paQNsdrzDxtXwr4OsMdNsU2UW2Z2+Itrj4lNc7Fu yHV6LUdzB10Y6kyNVniqv7kHLY//UWNCs1DRYxaJS1YLXJDIMqkbtMFyv/Ktz2xSCBbh d+0Fqnnb45XY2JEIahdC42+TqwowOG9I5zWhSiMBAUITtkyBZsJrQL6kSsQQADzdpxos Ocjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RJCMgcjX; dkim=neutral (no key) header.i=@suse.cz header.b=bcbC7k8p; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RJCMgcjX; dkim=neutral (no key) header.i=@suse.cz header.b=bcbC7k8p; 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 i19si202001edb.180.2021.06.09.10.19.07; Wed, 09 Jun 2021 10:19:31 -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=RJCMgcjX; dkim=neutral (no key) header.i=@suse.cz header.b=bcbC7k8p; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RJCMgcjX; dkim=neutral (no key) header.i=@suse.cz header.b=bcbC7k8p; 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 S239152AbhFILl3 (ORCPT + 99 others); Wed, 9 Jun 2021 07:41:29 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:46800 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239054AbhFILl1 (ORCPT ); Wed, 9 Jun 2021 07:41:27 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7C1571FD58; Wed, 9 Jun 2021 11:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623238772; 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=5JmSnpyHqca5PLmH1BHqymRQUyP4QdjzJkGjzwDILP8=; b=RJCMgcjXUe7ROekNc9knNZ3EovAV5bzgtjaRIZ52W6GxVogbwC36wO3UdMhVOohqu9CDr/ mT19g+aZtuBYkD29fLKOUzc9lca6x4UBRSpC3+Xu/MZreTJLiJdxpK4JQo2Di9H85ngtam FuCcTosNSujvBrbU0FWZwuXQyvjED6E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623238772; 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=5JmSnpyHqca5PLmH1BHqymRQUyP4QdjzJkGjzwDILP8=; b=bcbC7k8pol07TGi2Zq6kgTNF6P2X5P72t6Y5S5tDOI2PqAHl7iE1wo2HwFsauNM7dOdkpu cI0/YVvVKf6m+eDA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 4E48311A98; Wed, 9 Jun 2021 11:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623238772; 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=5JmSnpyHqca5PLmH1BHqymRQUyP4QdjzJkGjzwDILP8=; b=RJCMgcjXUe7ROekNc9knNZ3EovAV5bzgtjaRIZ52W6GxVogbwC36wO3UdMhVOohqu9CDr/ mT19g+aZtuBYkD29fLKOUzc9lca6x4UBRSpC3+Xu/MZreTJLiJdxpK4JQo2Di9H85ngtam FuCcTosNSujvBrbU0FWZwuXQyvjED6E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623238772; 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=5JmSnpyHqca5PLmH1BHqymRQUyP4QdjzJkGjzwDILP8=; b=bcbC7k8pol07TGi2Zq6kgTNF6P2X5P72t6Y5S5tDOI2PqAHl7iE1wo2HwFsauNM7dOdkpu cI0/YVvVKf6m+eDA== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id uI2iEnSowGD6XgAALh3uQQ (envelope-from ); Wed, 09 Jun 2021 11:39:32 +0000 From: Vlastimil Babka To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: Sebastian Andrzej Siewior , Thomas Gleixner , Mel Gorman , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn , Vlastimil Babka Subject: [RFC v2 05/34] mm, slub: remove redundant unfreeze_partials() from put_cpu_partial() Date: Wed, 9 Jun 2021 13:38:34 +0200 Message-Id: <20210609113903.1421-6-vbabka@suse.cz> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210609113903.1421-1-vbabka@suse.cz> References: <20210609113903.1421-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 2953f6e43cae..f740598696b4 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2420,13 +2420,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.31.1