Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2587531pxp; Tue, 22 Mar 2022 01:33:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEwbQrbq13DLTtWRVAgtGtLSlX0ibh7TVUFg3P5FNr7wg3DF441nGFhVxSQaWAAxcsNQbo X-Received: by 2002:a17:90a:2b86:b0:1c7:6e7a:3e00 with SMTP id u6-20020a17090a2b8600b001c76e7a3e00mr274837pjd.115.1647937999378; Tue, 22 Mar 2022 01:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647937999; cv=none; d=google.com; s=arc-20160816; b=TP7IDJ1iSptjlQkMEdQnazg9auUuvNoOnfNNO8pPyQUb5irbdo3x87h+tWMJ3uYQu6 iHc8p0haB+Xd9rddzhXEQnS0QmdXgTyzsnL7EIMiwfWyVBynZBVizOn7ySXYybi/W0Ox HgVYRWxnck6AcUIhtdyx0S1KmQwSHUc4P42JUPmbyZXQ6qSk8zIfkgkLScLKiANyXcOc XM0oCUanNqcnpZqzjxIKKXehpwLzztC8/8foLEAEQcPMuw3MRfm8rE3HmWPcERVZ3bjA oUCO9vTeRyDjaWTvUVBajq0qVr6xn3+w3Xc85v/0Oo0jc+T5ghux7JOhn6P8zhMwrRYi epjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UXb3smoMBvhttrnsQRq5L6nwxrUqkBCEz6UXeK2LsH8=; b=SbCPrQXDXkpBIBo5cF87N2A7TvWYaSKFTG4xjUfND5HgqqRtf7igPrgJaQAr+ivPYu ZRnIUb1M6fs5JnjbKsKiU1TA5GkPomf6wpDNhPb9o4n7Glq+WtLx84EWgPsscfzP1Pf+ G6UAdbiwXzVRhWZjKEwibpVetfpn1uvQDyCbRgNnB+6dlBcS55ZTZZQUVcOfKMkDwCaV FqwKwoae5MtjupGp/UwwNEFbKlfqhx5zyJbPxyCmZJcxVQWlsZJHWnpo4iELgIy26gv4 sTRlpj4xzqTJ8nC7rs+7x3Y2Bkhk6L0eHN9RZ9kikm+qdk2SaDv3aEOVYcbGXVDQqYmu bsmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=4tHROM5e; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a635206000000b003816043f172si16007307pgb.871.2022.03.22.01.33.07; Tue, 22 Mar 2022 01:33:19 -0700 (PDT) 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; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=4tHROM5e; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbiCVILi (ORCPT + 99 others); Tue, 22 Mar 2022 04:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbiCVILa (ORCPT ); Tue, 22 Mar 2022 04:11:30 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD471A801 for ; Tue, 22 Mar 2022 01:10:02 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id bi12so34551079ejb.3 for ; Tue, 22 Mar 2022 01:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UXb3smoMBvhttrnsQRq5L6nwxrUqkBCEz6UXeK2LsH8=; b=4tHROM5eCxSqEH+0gGrEnQdJzb3byz4cfatE08GCqso2U3NWO33XyHCsHGRAAGtbKb t0efUnAewq8+OrK/I02DP8+aliGeDn/7Km2OaIUVZMy2f9DpgJysKEIUAyYjddfPipvN puMJrcdYUcuPoFZPWnzDHsxq63L5tYZ+3mHGLKQz83yUofsP+oD1R2hWtJ5uwSGef/rc 9l4vj24A8/wEqvnAGDttH5GhAmknGrb9cjKm2Zi74KqBSmQUEwDm2b2aNXCPaTirTsAu +P+7mZafsecyY22vSVQml7i+bhCjkwkzmDhwnqObhFslS4D1a80RgoZXET2PWNqozcnL Of0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UXb3smoMBvhttrnsQRq5L6nwxrUqkBCEz6UXeK2LsH8=; b=1rc+4uS3cMUYv3iOk2O01XA73Bs0CZsOZsIhVTWofm0AvIsd/1IK55UQAnK9Vu3jfv Y9KvrJfKELcxSTpZTvp6t13Ldx8QizR9i+gT4e5k3vcXBz1iTBnp1YqIUel9LPrIs2D1 OaE4JJ9MRhyv45BEdSZ5OdIPu+5dhibug+V4aJCagcrw75f9idxrNo564mjr15yf2pWQ 8wMVMZ6khAMlLUS7ljkkprgu322F8pEDYvRHC9l9jHNrPIVQNt07AHwtVsX3fGkjlitE H96sHpuisORa4ppF1TgDs4HlkrU0rhKcg4UkSr8tkt0fotp8sHA5VihjUx5lNY7ChxHc C9bg== X-Gm-Message-State: AOAM533yd2gxZmXIGRkW7jMCPHW/eTyMNCMSsr4zKYpBQt2HzDEVPUIB gJtUl9fvY6yJAMU+V6WiAh4tbl9H2fl/g0WP77hr X-Received: by 2002:a17:907:a422:b0:6e0:238c:4f44 with SMTP id sg34-20020a170907a42200b006e0238c4f44mr5927362ejc.257.1647936600722; Tue, 22 Mar 2022 01:10:00 -0700 (PDT) MIME-Version: 1.0 References: <20211227091241.103-1-xieyongji@bytedance.com> In-Reply-To: From: Yongji Xie Date: Tue, 22 Mar 2022 16:10:01 +0800 Message-ID: Subject: Re: [PATCH v2] nbd: Don't use workqueue to handle recv work To: Josef Bacik Cc: Christoph Hellwig , Jens Axboe , Bart Van Assche , linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 Ping. Hi Josef, any other comments for this approach. On Sat, Feb 19, 2022 at 9:04 PM Yongji Xie wrote: > > On Fri, Feb 18, 2022 at 11:21 PM Josef Bacik wrote: > > > > On Tue, Feb 15, 2022 at 09:17:37PM +0800, Yongji Xie wrote: > > > Ping again. > > > > > > Hi Josef, could you take a look? > > > > Sorry Yongji this got lost. Again in the reconnect case we're still setting up > > a long running thread, so it's not like it'll happen during a normal reclaim > > path thing, it'll be acted upon by userspace. Thanks, > > > > During creating this long running thread, we might trigger memory > reclaim since workqueue will use GFP_KERNEL allocation for it. Then a > deadlock can occur if the memory reclaim happens to hit the page cache > on this reconnecting nbd device. > > Thanks, > Yongji