From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp153-141.sina.com.cn (smtp153-141.sina.com.cn [61.135.153.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC5853B47FF for ; Tue, 26 May 2026 21:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.135.153.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779830693; cv=none; b=JKeZwZ0nKluk6D4ssR2104hVFCAn4uLWrIc2CKgcFGY9Md/zLjU0tzfLJjFRwP7q/mamRKB1/ZXKoEfVt5uNxY5Zz17KOT4heZtpG9DMIeTIrcW8S/HWrR9ojEmv8aLo00HFFyC73me8U0aoODxk3OwpSaooDJUtAugCMDWaX+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779830693; c=relaxed/simple; bh=Atg4sWgOAxirkr+oLNQf1bwredA/3tZck5wFtI+vBPM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dhx7QHoMhvXrTymC7FEIXuxLtMZWiNLwyQaZgFqtAWzF1VEhPzkEszZoxCgdjvmgJifqIfuWzsZeYgQA/GhBH942qnYKB13rwbh4/bqXRmgtxbCz1hG5zre3SXzbsUqCSfnTP/+9+VZG5sAUzccpe0xRezeRt1A6MRiUsvapGKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=XEJi/tkD; arc=none smtp.client-ip=61.135.153.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="XEJi/tkD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1779830686; bh=3osLdeW1I5vhN2k04wKXq+1cVjGBUnwRZfNEKD+3W78=; h=From:Subject:Date:Message-ID; b=XEJi/tkDFqL8jfXwyw39cZuJAwAWVCVSJ8SWahABxJiJQKLmNs2WlndCGvGp/YOZ5 SiJV9rHh5tUq0pF0lLqW5nJICDmPYI2DV+zlERdwDwtrtRcLK6eOxKfjKbPMWRReOs CwIva5Y79EW48Nw9j64kyPmDfJVgOWbPK/3svM6M= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.31) with ESMTP id 6A160F6C00001C89; Tue, 27 May 2026 05:23:59 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 2881896816112 X-SMAIL-UIID: DEECCF0443FD4162BFFA4800B13AD95B-20260527-052359-1 From: Hillf Danton To: Breno Leitao Cc: Tejun Heo , Lai Jiangshan , linux-kernel@vger.kernel.org, marco.crivellari@suse.com, frederic@kernel.org, bigeasy@linutronix.de Subject: Re: [PATCH 2/2] workqueue: defer wake_up_process() outside pool->lock on hot paths Date: Wed, 27 May 2026 05:23:40 +0800 Message-ID: <20260526212346.1100-1-hdanton@sina.com> In-Reply-To: <20260526-fastwake-v1-2-e69ad86923e6@debian.org> References: <20260526-fastwake-v1-0-e69ad86923e6@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 26 May 2026 14:08:06 -0400 Breno Leitao wrote: > @@ -2423,6 +2424,15 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, > > out: > raw_spin_unlock(&pool->lock); > + /* > + * Issue the wakeup after dropping pool->lock to shorten the > + * locked region on this hot enqueue path. kick_pool_pick() did all > + * of the work that required the lock (worker selection and > + * wake_cpu setup); the wake_up_process() itself only needs to > + * take the target rq->lock. > + */ > + if (wake_p) > + wake_up_process(wake_p); > rcu_read_unlock(); > } > I suspect this works without the pool lock held, go and see workers culled in idle_cull_fn() for example.