Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1084247pxm; Wed, 23 Feb 2022 17:43:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9I+YHkhhs1tlvq4cJAq5szLEqhDhj8WXqebIcNct+EYy2IUrZ4lFjGTbjxhK4GZHGLC5w X-Received: by 2002:a17:902:cec1:b0:14f:d4d3:58c0 with SMTP id d1-20020a170902cec100b0014fd4d358c0mr303573plg.62.1645666985071; Wed, 23 Feb 2022 17:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666985; cv=none; d=google.com; s=arc-20160816; b=IdMAarwLvjRMyXTWjOAeA+FkyoJ9qSBu1DxSVzYl24a932RrLuPSZCQU9c0B9nxFrR WF6wIGVHyGicYF8T4vm9E/lRoE2IurDT8jUCLlkY+StX32JSTqpPsDeiu3mcw2TaJ6a6 divC0u8wO9ETudtnrtAaC5AZ6nUeSqKo5YYB9cNhK8PdWreyrQEM2P/3dWP2sK14+pwk J0XKvQKzvzxoX8rJglgfUG1tUpSmWTBIKFp6Gk7vRIv7i8+M5K8w1F/JVzZ6TTWS/bJI 8gIrYNhC1PObiNckd03EiNv9sRgTxENjXpfaiKi9M+uxC3UDyta0GeuR0RFS2OxwW94V O+3A== 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=pw8TvNgVlmBgIO6YzpKLPyWHQoVH27zBH28hkdeGag0=; b=RgBsr2J2CkFs71JVU5J/8mWBmMxNBIwgM7bS0vjJRpwwdoKms/HEDqDNiRTZeTsB0k X0HbV2HRu2YMBEY/m1quFmH49+uzpiTRYoKUCZr8ohQopDLKJlrC3uwveFlo04qrdCYG xOdU0yMhB076CYtCgjmIKlWR4UjBYtP352nyWDkYTbbGODltRb//kwUEN30iMoqa+TdI 9qjDqxB9CpfwU0QIMSWW8u/0YsFp0sDaSylUjOP5zESOBs0qdtsjav/FZZHXxlFEizSs UQzd4e9EGOLOVPCv6cC4Mr/BMeziWmIxdTRO3XqzI3yIGqXHBfuewtVCZYNd1mH+ivQW PGLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b9LdrnU6; 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 g10si1020647pju.17.2022.02.23.17.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:43:05 -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=b9LdrnU6; 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 447F318A7AB; Wed, 23 Feb 2022 17:18:15 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243740AbiBWW3d (ORCPT + 99 others); Wed, 23 Feb 2022 17:29:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbiBWW3d (ORCPT ); Wed, 23 Feb 2022 17:29:33 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8249E40A16 for ; Wed, 23 Feb 2022 14:29:04 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id d187so180337pfa.10 for ; Wed, 23 Feb 2022 14:29:04 -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=pw8TvNgVlmBgIO6YzpKLPyWHQoVH27zBH28hkdeGag0=; b=b9LdrnU6kfLF2sK90sOS6OzKcOThXn0v0jgQIIuKOIbQqhDSBIOFj4bY+5DEoKiHGB Wp9z9Muzp8OQcbiuxOYa1jxPhTXMyK8ooFvPXmlcLuKU50Ect7n06wRM+POVS3QojYV6 S6Q3VmYFzPydMkG30X9Rr55m+2WYui7pJwwLqGPMEAhRtG/ZzTzNTlSb0o4CA7+jHkHB lZWXQoB8To3G0frEyWeoa7dzUehJvkK1xCezs5UYTfxCrU2SjN2T3LL6C37iWoX+qzhK PTH6DYeO6+4SLWXxgMOTQS4HMy1GdO5JSDGulAbxIP1YbWypdQJMaVNJNGuU3rqHT+1Z 5wMQ== 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=pw8TvNgVlmBgIO6YzpKLPyWHQoVH27zBH28hkdeGag0=; b=z9DJiTTy1pU3A+C72ZER1AxgtpEILpFfQ6wzqct9eiSDNG4dCKPNhT3TyhkDyUSXUO DaiMMm/mBy3C/jweALL3p14KB63quHfce7hTmjycUPlAEbl2W9N1rgAfo/9xyNTRo2cC tpkD2hMO7JRUqQI/enWZWVcFLKj/8YxyE0E+7rSWxp7kfjEW4hRzoikKxP5ZYISE/Y5c AyAr8Ya+jlbYvK4mDMUPCLHT/uQjXEMH5Mb9pSxLvBKCbZQHPNRS3APwovf8YdJhRxkM EWyCy+j3Caa34KJy1/WpVAMZpS4/ZdltGWo//OSA9Xi8DbcHZF66Vuv59VPSpWLOP/a1 zCTw== X-Gm-Message-State: AOAM531fhu4i7lu3gRJxx5ZyBmZ9wmEhmp886cvzxh6LX/D1jYD79fnO VID8mt8gSSSeG+kRy32v9qmIsBLJJeg= X-Received: by 2002:a63:707:0:b0:373:9e4f:f56b with SMTP id 7-20020a630707000000b003739e4ff56bmr1327606pgh.565.1645655343865; Wed, 23 Feb 2022 14:29:03 -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 i11sm467292pgs.58.2022.02.23.14.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 14:29:03 -0800 (PST) Sender: Tejun Heo Date: Wed, 23 Feb 2022 12:29:01 -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> <9a883d72-ea7d-1936-93e6-5c2a290509d4@I-love.SAKURA.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a883d72-ea7d-1936-93e6-5c2a290509d4@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 Thu, Feb 24, 2022 at 07:26:30AM +0900, Tetsuo Handa wrote: > > The patch seems pretty wrong. What's problematic is system workqueue flushes > > (which flushes the entire workqueue), not work item flushes. > > Why? My understanding is that > > flushing a workqueue waits for completion of all work items in that workqueue > > flushing a work item waits for for completion of that work item using > a workqueue specified as of queue_work() > > and > > if a work item in some workqueue is blocked by other work in that workqueue > (e.g. max_active limit, work items on that workqueue and locks they need), > it has a risk of deadlock > > . Then, how can flushing a work item using system-wide workqueues be free of deadlock risk? > Isn't it just "unlikely to deadlock" rather than "impossible to deadlock"? If we're jamming system_wq with a combination of work items which need more than max_active to make forward progress, we're stuck regardless of flushes. What's needed at that point is increasing max_active (or something along that line). Thanks. -- tejun