Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4271777pxt; Wed, 11 Aug 2021 01:57:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhEcRCuY3GNagDMNdrOtqdZyywvBMkVr0wW87PHZ7BtWuiOGaQ7E55wN4Ct2p4GNhpngxa X-Received: by 2002:a05:6638:618:: with SMTP id g24mr31164607jar.94.1628672253675; Wed, 11 Aug 2021 01:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628672253; cv=none; d=google.com; s=arc-20160816; b=XmNoXZelkVtv1U3FuNuEemnlKbEgAKScSIO8MVB5mPYutjzQ2KHHuMlBy4co8CQwWQ BcHVTTv8JpPStxZjLrkboa9FaM/ANOvx3hwEdCDiScOmPYZaaKTUhMiVnU+hgDq+qPI6 mYol3/0Q4Ubh7t0e5JD83e0uupgP7bQuyJuEtWfq8mzNH5RgWC3jp2EtEzie+wcHcYp2 vpIkiTQyCf2A9RuR9bpdI4EtUfBueJMjPW+dU15f9bLdyu/bqQDtkYQ1xUAZcIiAB3PC luacfF6VUjPOedomDvjudxBMPwehgmDkJKJewxPQNLDpVDIn1Z6P4CJtmP3FPNYAKKp6 Q7Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature:dkim-signature; bh=KKE2B1opnvB/hJAxsbfc2CiKooYcumMdQd+fJCEjFtM=; b=BnnAa5nVJZ2COVW4AT3uXp4+pUZNSTJj4jpt2r1kFBjWDLiAJSIzzLa63q+f2HGR4S 3uceqDcz9HTmMwHy+QHKbxDRLvYrKZ64V6tZqKNkR3dy1FvlZ61DPFxIslJNWyvnkqPx XnpDtgf9h+xOtaFyPEwAnByvXobyJWs6CJzh7K+fK+B3UVisQCv79sGPMtQBxNZyDYF9 1xD7xVbfB85JHz8YNOHyfEKnTq+08+TcnJUy6vxKkj3bFVhVnO9fQY1IUURorlUEAoCO cGWpPWbUBRrzW0WBK6rVBkg24q9RXnnuonddbL4TG5osPRlPEHpF3WDhUr9TZqnROYIH /yAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=UFqYaCyR; dkim=neutral (no key) header.i=@suse.cz; 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 z16si24061699ilo.50.2021.08.11.01.57.18; Wed, 11 Aug 2021 01:57:33 -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=UFqYaCyR; dkim=neutral (no key) header.i=@suse.cz; 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 S236498AbhHKI4B (ORCPT + 99 others); Wed, 11 Aug 2021 04:56:01 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:35156 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236336AbhHKI4A (ORCPT ); Wed, 11 Aug 2021 04:56:00 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 082E71FEAF; Wed, 11 Aug 2021 08:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1628672136; 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=KKE2B1opnvB/hJAxsbfc2CiKooYcumMdQd+fJCEjFtM=; b=UFqYaCyRuF0TqfywsPvOhlsX3rY1kmgjbSVYphwOTqY6JZhaXyc867yHS8pnLhehv5jCBN h9FDJCilYiAEveqKuyK6mbBsocXGFMBP5FONJGRnjDjQ7FqkR4i414KIEVpRhHqLlNxHUp 6+l02soRYgG+JBmV7uFGhX5OUEQv8QQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1628672136; 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=KKE2B1opnvB/hJAxsbfc2CiKooYcumMdQd+fJCEjFtM=; b=cDO8H1F/zq0znC2swz+XLJovpND8ceWcW50OpyeVXwha4eC0c5WdBWkH/MbfwF18cb/ue/ 71N1SMVMMMLB0RDQ== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id C224C131F5; Wed, 11 Aug 2021 08:55:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id wc/HJYeQE2GudwAAGKfGzw (envelope-from ); Wed, 11 Aug 2021 08:55:35 +0000 Subject: Re: [PATCH v4 29/35] mm: slub: Move flush_cpu_slab() invocations __free_slab() invocations out of IRQ context From: Vlastimil Babka To: Qian Cai , 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 References: <20210805152000.12817-1-vbabka@suse.cz> <20210805152000.12817-30-vbabka@suse.cz> <0b36128c-3e12-77df-85fe-a153a714569b@quicinc.com> <50fe26ba-450b-af57-506d-438f67cfbce3@suse.cz> Message-ID: <60e50d8c-ccfa-1036-5a03-2b1a9d25f958@suse.cz> Date: Wed, 11 Aug 2021 10:55:34 +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: <50fe26ba-450b-af57-506d-438f67cfbce3@suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/10/21 4:33 PM, Vlastimil Babka wrote: > On 8/9/21 3:41 PM, Qian Cai wrote: > >>> static void flush_all(struct kmem_cache *s) >>> { >>> - on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1); >>> + struct slub_flush_work *sfw; >>> + unsigned int cpu; >>> + >>> + mutex_lock(&flush_lock); >> >> Vlastimil, taking the lock here could trigger a warning during memory offline/online due to the locking order: >> >> slab_mutex -> flush_lock > > Here's the full fixup, also incorporating Mike's fix. Thanks. > One more fixup, sorry for the churn. ----8<---- From 7cfe3fb1bcd6e589199b10bef480ed097ba9de14 Mon Sep 17 00:00:00 2001 From: Vlastimil Babka Date: Wed, 11 Aug 2021 10:51:14 +0200 Subject: [PATCH] mm, slub: fix memory and cpu hotplug related lock ordering issues - fix Make __kmem_cache_do_shrink static to silence "no previous prototype" warning. Reported-by: kernel test robot Signed-off-by: Vlastimil Babka --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 152487f84025..c9531e03addd 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4393,7 +4393,7 @@ EXPORT_SYMBOL(kfree); * being allocated from last increasing the chance that the last objects * are freed in them. */ -int __kmem_cache_do_shrink(struct kmem_cache *s) +static int __kmem_cache_do_shrink(struct kmem_cache *s) { int node; int i; -- 2.32.0