Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1059396pxm; Wed, 23 Feb 2022 17:04:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzo15VmnaDGG/2hvMNnzCb2dE+tAaFfohVdwak9pYrq2YszP5Vshbnpi0nnVb6P2hXxJ6jO X-Received: by 2002:a05:6a00:10d0:b0:4e1:7504:25c7 with SMTP id d16-20020a056a0010d000b004e1750425c7mr363249pfu.77.1645664677037; Wed, 23 Feb 2022 17:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645664677; cv=none; d=google.com; s=arc-20160816; b=zAfjVeoUEK7wBS3BLj58x9hTng7ks3aSaiZPb2d7f2Wl1Wz/o6nf+w+z7ShtkERbfV zfGbXaO8XON0iOfE6Baqh+rTPGmS2T/9njnWbq21RsEdICNBRKhpFC21rknDNtJiSSE+ cugn2SkQqo6TxF1Sbx0zRQddyRNTcgQ4euJojRXqnY3S1Q+sLjBzKqv4bKsWCwVIq1B1 zjJhgx1AkxDxVdOUHEMBtavI+vQLXIzLVTbH/mMw8AyjQdfG8fNgieQYmO5vbHspQJyh 2niAnfLjekBGedlmvDCdQv9Fa8ItjVLj6d/FxeF28wvJ+xyXEpBvgAfzzqwknovWdJXH D2JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=o3F1fn31BsVyEav46oaUSfeJlWihbw10OJWGV7VLc8U=; b=jp2R81+WWPr0AwrLHmwj86ZTv5c43YsiR+gcVS0vbFCfWp/uGpcRJmPGBpE8OBLwNM dXXyqcIOJsw13oB/BK3WqDIwP7GUAE6n8d8VkwHVBlMz/1ZarvuNtRlNNlpX4901O5t/ E+nEB1mhGgPfRhL8HZHWttDVll5U/Yh12vdpNAS06Ck7Bak8v/y+k+uZo1fUVE9APFD3 PPtS/k9fbfqTISWCyyN+toMm5vVI5Q2Zp1lSW8ofg8UfIQ4h93nljYozQhNMFjZBUqXo TM/hhPUZ+F8OM8cf4L3P2mKBW0RjEatfJ0pVq2RIdnleDYh87Q74bMIpc1bUUa/RjkXZ xxow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y5gZkMi2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 132si1164754pga.257.2022.02.23.17.04.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:04:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y5gZkMi2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 63FA01451FE; Wed, 23 Feb 2022 16:54:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242716AbiBWVdf (ORCPT + 99 others); Wed, 23 Feb 2022 16:33:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234865AbiBWVde (ORCPT ); Wed, 23 Feb 2022 16:33:34 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14DD4EA38 for ; Wed, 23 Feb 2022 13:33:05 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id w2so60275pfu.11 for ; Wed, 23 Feb 2022 13:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=o3F1fn31BsVyEav46oaUSfeJlWihbw10OJWGV7VLc8U=; b=Y5gZkMi28r+WxhsjdUErs+zaiyQY+lpdC416gS3r7rWZh+GS+Tc3hfcEYsDarkkcd7 +x4LZlo0yMfHyH8DyfT4vEktSAfM9jQ5dbGJuc62BpXncxkjklGer/BjCEXLIT48of5h Gf0xQYYw4+jIf9hZ6hlkFkXb7QX1jihmXZ7qQFnNZH8BhRnYBmZp9uoUkOZOL7BjqoJI Y8v9W5TRKIAEInSiS37QxaSmaIREHcnCmAOAcza8nYqZWbQ2dSiWPEEc7hQpiRpV6MKn rJEsGD/tHUzJ4Whxpe9gbNzCxFj9kWf7dS7hPywrXSuSZgX+S5od38Dr6R3oOARe2CiJ /lQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=o3F1fn31BsVyEav46oaUSfeJlWihbw10OJWGV7VLc8U=; b=qJ1GkGDJwlcjlK5LzF98xogvBWVE/gDHJ5opTeN1MlbOXz9Nr6TblAz5I5KI6SUXBp +IjAAaiAjHKKbS9BEtE2IZdYBKluMv2iJv8lCmayg+vQBhQgFTTDfm3QtATIu0/O5RmI w4KN+sAcyuvCGAXgTZ27c5AzLTRYV7npS0p1nrL+NuQ/Ec2r9qx5L7IqgVvAS2nu+65H rR89qf5T7bzWdKvXlbKzBGhMNN5ZRQzd8tlpiJtUVA5DV/qk0uBO7T6JE/nCadjO/J1c VsbcRTiJ/ySKjOvLUuBv4YrAXuFWzCWFgzb4UkPrQZCho+cqQ//PPVb8WvHfXv9KpOW7 2Ryg== X-Gm-Message-State: AOAM533eZ9V1QGq0ndz3Yt5Kj9aT9NwRj6IS3zOmgI0ZQvcZKol5Z21g IIHpUGn12Re6K958PzH7p5Y= X-Received: by 2002:a63:cf4c:0:b0:34d:5dd8:c489 with SMTP id b12-20020a63cf4c000000b0034d5dd8c489mr1271355pgj.10.1645651984813; Wed, 23 Feb 2022 13:33:04 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id f18sm468209pfc.110.2022.02.23.13.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 13:33:04 -0800 (PST) Sender: Tejun Heo Date: Wed, 23 Feb 2022 11:33:02 -1000 From: Tejun Heo To: Tetsuo Handa Cc: 0day robot , LKML , lkp@lists.01.org, kernel test robot Subject: Re: [PATCH] workqueue: Use private WQ for schedule_on_each_cpu() API Message-ID: References: <20220221083358.GC835@xsang-OptiPlex-9020> <3a20c799-c18e-dd3a-3161-fee6bca1491e@I-love.SAKURA.ne.jp> <16a33a65-3c67-ef66-ccc8-9c4fffb0ae5a@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16a33a65-3c67-ef66-ccc8-9c4fffb0ae5a@I-love.SAKURA.ne.jp> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Feb 23, 2022 at 09:57:27AM +0900, Tetsuo Handa wrote: > 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. The patch seems pretty wrong. What's problematic is system workqueue flushes (which flushes the entire workqueue), not work item flushes. Thanks. -- tejun