From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C521C2D0C5 for ; Thu, 12 Dec 2019 02:28:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CDEC21655 for ; Thu, 12 Dec 2019 02:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CDEC21655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D2CC56B352F; Wed, 11 Dec 2019 21:28:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CB4966B3530; Wed, 11 Dec 2019 21:28:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA36C6B3531; Wed, 11 Dec 2019 21:28:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 9F7386B352F for ; Wed, 11 Dec 2019 21:28:38 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 474B0181AEF07 for ; Thu, 12 Dec 2019 02:28:38 +0000 (UTC) X-FDA: 76254905916.01.group89_685c6a3f3494d X-HE-Tag: group89_685c6a3f3494d X-Filterd-Recvd-Size: 1782 Received: from mail3-162.sinamail.sina.com.cn (mail3-162.sinamail.sina.com.cn [202.108.3.162]) by imf19.hostedemail.com (Postfix) with SMTP for ; Thu, 12 Dec 2019 02:28:36 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([221.219.0.244]) by sina.com with ESMTP id 5DF1A5CF0000256F; Thu, 12 Dec 2019 10:28:34 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 46267949284965 From: Hillf Danton To: Daniel Jordan Cc: Hillf Danton , linux-kernel , linux-mm , Tejun Heo , Lai Jiangshan Subject: Re: [RFC 3/4] workqueue: reap dead pool workqueue on queuing work Date: Thu, 12 Dec 2019 10:28:23 +0800 Message-Id: <20191212022823.21144-1-hdanton@sina.com> In-Reply-To: <20191211112229.22652-1-hdanton@sina.com> References: <20191211104601.16468-1-hdanton@sina.com> <20191211112229.22652-1-hdanton@sina.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.010146, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 11 Dec 2019 18:25:04 -0500 Daniel Jordan wrote: > On Wed, Dec 11, 2019 at 07:22:29PM +0800, Hillf Danton wrote: > > Release rcu lock to reap dead pool workqueue. >=20 > What's to be gained by reaping the pwq (and possibly worker pool and wq= ) before > __queue_work() retries? It'll just happen after the queueing finishes. Releasing rcu lock just says that the dead pwp no longer makes sense on the local cpu and it can go now, without the local queuing work AFAICS affected because of irq disabled. But it's hard to say how it will be reclaimed on other cpus, say before this queuing ends, and this does not matter in terms of the local queuing. Hillf