From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 951E329DB65 for ; Tue, 2 Dec 2025 18:07:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764698847; cv=none; b=HCJCE5Lw3nFy5GeMDhbfSjC0bTEiPW9nJouVQ0BrEPrAeeL875ZomN9fsxQVuoqIGp+WeGbQZTiMbytEzXnTDWXZVKJN1YvCo9jI3lfejteBZFRMXawsJR1Kh22v/D51eCdm0rsTLekCiB0X3hS/OBsMbc8AGAFwz/5q/75ztCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764698847; c=relaxed/simple; bh=GB9dTBatktV4DgGur5LnJaz9ECmkwOtwQ9tLTeBkLj4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ACSEdWC08z4et/khouAAcRTM3tZ9WDBpbBqLApK9gKlaAOR70Wjifjzxuymi5rk6VHtka5MmoRwbsjx03q02SSW8ahwkYOLFpIvt57B228KorWToH/6U/EMSufrtLyH+GGm5ck1hOtefD+tsw1b0TI2QMInLk74VToHHvOik2bU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tEjJ35rI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tEjJ35rI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10963C4CEF1; Tue, 2 Dec 2025 18:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764698847; bh=GB9dTBatktV4DgGur5LnJaz9ECmkwOtwQ9tLTeBkLj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tEjJ35rI4RsNiRS0ovNSBVtG41d23xUdJevzc62x0wCyn7EqFroyc6hh7Mq9+Npws bxxntVU8P+TqESreTyjpyOgSyGVV8sfxn7ZHcv8HmGqynrkDDWhxoOlS83D/A0i/ek UwfZi7Rd4zFA6d8LUOfrDA2RYW3JcF+76G8DQp/pXbkg9ug/XA6JIIusVI2GIFAFnW sX8U05QUvvwSezrPjY+sjMHNOfO9wDzc3uhOszuM59cH5OL71Mfkerfhyjs0ymkHip wqQX+Iu7Iiuli5flZd57rY0G36U6cwALfukn787d13YgqZCa63q/Lntsr7cYeKeY2Y dpbQjE5YqxYyw== Date: Tue, 2 Dec 2025 08:07:25 -1000 From: Tejun Heo To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, ying chen , Lai Jiangshan Subject: Re: [PATCH V4 1/4] workqueue: Loop over in rescuer until all its work is done Message-ID: References: <20251125063617.671199-1-jiangshanlai@gmail.com> <20251125063617.671199-2-jiangshanlai@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251125063617.671199-2-jiangshanlai@gmail.com> On Tue, Nov 25, 2025 at 02:36:14PM +0800, Lai Jiangshan wrote: > From: Lai Jiangshan > > Simplify the rescuer work by looping directly in the rescuer rather than > adding the pwq back to the maydays list. This also helps when > max_requests is 1 or small but pwq->inactive_works has a large number of > pending work items. > > This might hurt fairness among PWQs and the rescuer could end up being > stuck on one PWQ indefinitely, but the rescuer's objective is to make > forward progress rather than ensure fairness. > > Fairness can be further improved in future by assigning work items to > the rescuer one by one and this is a temporary change to ease the > transition. Again, I'd just note that this is temporary removal rather than trying justify that fairness doesn't matter because I think it does (not in terms of theoretical correctness but in the practical approach of avoiding unnecessary surprises) and the behavior is restored by a later patch. Thanks. -- tejun