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 46708301466 for ; Fri, 21 Nov 2025 19:30:28 +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=1763753429; cv=none; b=pSgDeArAEI+VVCOeDvuiwW+71pyTyIob1eanmap2reIbUYwKk0eKlIZKuFGMsnQs90GGMxClI0T33wHlzZw4QE/TEOP4dAWA3Ve2yAwiRsrDnrpOMr48xm15STdm0i0eNHe4sJyzLiQNs0a8BG+rn/wroQr1LVxyKureutaDK+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763753429; c=relaxed/simple; bh=sPnMnalEi/oXAdVefWyPVHc9JJfxoM7qFructnw7Xao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=umV+kVBpJjz5yW36h0KyJPLaIcx2dwnmhyH1Ds/dlg/EhofARuifrKUREEzLlu+yNiNjNk2SwbTsjI9VZqYcpK6ct7YIOz5YzV5iTYvoaGiX5fy3EvIM9ArHWRmPuTQIx0En/DeCPRaBp54WOXIUNASpcVj0nA41uHMW3Ykr52o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bf3CalJ1; 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="Bf3CalJ1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9BF2C4CEF1; Fri, 21 Nov 2025 19:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763753428; bh=sPnMnalEi/oXAdVefWyPVHc9JJfxoM7qFructnw7Xao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bf3CalJ1FozKLWMTKK5fv+LyO0LhKjdKDdo1wVNIMcg0tR0BglQKxnqci+7lKpM0m T3jFGBG40K5QGJq8tON2dHdstuDWIsdgv0u+eYhvztTvWXJ+kvC9xIUhXdRkL4mJPC G4JucggmZNHT6xmK0ko/NENtxipaUp8zAMz2ba2pwduEVApKzh1e52XmmsA0ZRD2p7 le/WecjzdU7FHahVG/rfZT4TYyNIrjZavp890Sltvdd7MghaS6NpH+KLlsA7R1Bl6J 37EZ28h/vkTRwdYlqi8h+QaXQ+DJG6QwAkBXhH60rkRDNvogbSAxikWF2+SIFdP3ng 45aT3Wgcjgb1Q== Date: Fri, 21 Nov 2025 09:30:27 -1000 From: Tejun Heo To: Lai Jiangshan Cc: linux-kernel@vger.kernel.org, ying chen , Lai Jiangshan Subject: Re: [PATCH V3 4/7] workqueue: Loop over in rescuer until all its work is done Message-ID: References: <20251121145720.342467-1-jiangshanlai@gmail.com> <20251121145720.342467-5-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: <20251121145720.342467-5-jiangshanlai@gmail.com> On Fri, Nov 21, 2025 at 10:57:17PM +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. Yeah, given that you restore similar behavior later. I'd just note that this is temporary change to ease the transition. Thanks. -- tejun