Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp278377pxm; Tue, 22 Feb 2022 23:25:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8JJjRA11e4FccQDHwe9qmY+AMJXcwWSwFh5DUbkE/eTgvBZzX/7LP6wDrWoKEbp/guC3S X-Received: by 2002:aa7:cf10:0:b0:410:a59d:7317 with SMTP id a16-20020aa7cf10000000b00410a59d7317mr30194140edy.199.1645601138746; Tue, 22 Feb 2022 23:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645601138; cv=none; d=google.com; s=arc-20160816; b=xReKS5ptiDresfHXyLuoInk+t3pzl/EMQuN2qi5TmI3rPijic1WUP6mp35SxKbzcr+ 2O26yxkw9dbY7Wpywepn4VY/FpnijMaO2LJEpYIogEx7CV5GtuJPcqN8jY3QMZBKDFnC feRahnFlV3STqinkxxMbTe4VYNFj2q5ufydPb5+sU+9lKOL+YBBx+QMu4PlRk3c4ZZKc MRDblum7Bp9/zEN4qA6zMHMSIyV4GZUW5rKjj5N2TPAkDGkSZp56KQviz2J6dSoz7kV/ qMIgGsR1zvK/2jMej8nVqiBUnMlGdLJxQ/iHR6QJJ5l7Mw3iEzqSdavjEL1WaZq65kCd habQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=XdUkUvfpwtzTvsa2ATTbjEM1DiJ/ip0yR7DlZagZjK4=; b=0z6tpQI19iFZC7lpuUujoUGKmCWI+GZR1Rr7lH+AxAuBqVaHiI354EbI5H+E1M1g2Z poplAx7461YqlNQ+lWOiGWvS2s2a53Jht4TQ6LNESJdmySPf7SIrzccpvvTtC4JcsFL5 JOJM7c7pIo1wmrJd8p0DUfyXB1Mfk3oUjWLAcCm5nlcfpYQc1Twbj4rm9HWjhOwM5KzN LmaqgpVdRTvzzbaCB+OgtHC5Wmn37KBEILCDSAdedMZYCBHTp/JgEXzMgmzmedRm2tJr vgX/LPDEg+bETLIys353z2xSKD24B6N6g0cHzwEfMQEO2E6UQZZxzHZRWoRWYjGDG0oQ BiQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd29si19185477ejc.75.2022.02.22.23.25.15; Tue, 22 Feb 2022 23:25:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236492AbiBWA6O (ORCPT + 99 others); Tue, 22 Feb 2022 19:58:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236088AbiBWA6N (ORCPT ); Tue, 22 Feb 2022 19:58:13 -0500 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 886CFDF03 for ; Tue, 22 Feb 2022 16:57:45 -0800 (PST) Received: from fsav311.sakura.ne.jp (fsav311.sakura.ne.jp [153.120.85.142]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 21N0vS39054900; Wed, 23 Feb 2022 09:57:28 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav311.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav311.sakura.ne.jp); Wed, 23 Feb 2022 09:57:28 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav311.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 21N0vSuY054897 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Feb 2022 09:57:28 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <16a33a65-3c67-ef66-ccc8-9c4fffb0ae5a@I-love.SAKURA.ne.jp> Date: Wed, 23 Feb 2022 09:57:27 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] workqueue: Use private WQ for schedule_on_each_cpu() API Content-Language: en-US To: Tejun Heo Cc: 0day robot , LKML , lkp@lists.01.org, kernel test robot References: <20220221083358.GC835@xsang-OptiPlex-9020> <3a20c799-c18e-dd3a-3161-fee6bca1491e@I-love.SAKURA.ne.jp> From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/02/23 2:29, Tejun Heo wrote: > On Mon, Feb 21, 2022 at 07:38:09PM +0900, Tetsuo Handa wrote: >> Since schedule_on_each_cpu() calls schedule_work_on() and flush_work(), >> we should avoid using system_wq in order to avoid unexpected locking >> dependency. > > I don't get it. schedule_on_each_cpu() is flushing each work item and thus > shouldn't need its own flushing domain. What's this change for? A kernel test robot tested "[PATCH v2] workqueue: Warn flush attempt using system-wide workqueues" on 5.16.0-06523-g29bd199e4e73 and hit a lockdep warning ( https://lkml.kernel.org/r/20220221083358.GC835@xsang-OptiPlex-9020 ). Although the circular locking dependency itself needs to be handled by lockless console printing support, we won't be able to apply "[PATCH v2] workqueue: Warn flush attempt using system-wide workqueues" if schedule_on_each_cpu() continues using system-wide workqueues.