Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2217165pxb; Sat, 19 Feb 2022 05:31:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhOdmJxzT3kBJR8ja42p/N+uCmHN1xVhCkorDFEUZ83PMkyEe7oJKGQfZJuvj9oScjo7j1 X-Received: by 2002:a05:6402:5214:b0:412:996:9ffb with SMTP id s20-20020a056402521400b0041209969ffbmr12475102edd.238.1645277479616; Sat, 19 Feb 2022 05:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645277479; cv=none; d=google.com; s=arc-20160816; b=g2qcLvKg0NOg8vQzC6epCAiv36PJ/mDQusqXSzAuZWQKB9WKqttkpqSskIZfiqfAuK WJ4uQtAvXv8S2i3ddTTKVMN+V4rNxyJUeQ2d09GiPSwy/gUNUYUDkavsna25W3h9mNrO PCgltwrXwSJOl1CusFuJ1SmR59Igd0AdNNHVYlvAGv+qPjbsBhTbOaT4VAeJhHuaNHwe uTMNdhaNIvGhOGssJxH/pjSw6nfg1irKYeDpplxlHX7qYbIKn9abjQxeM72PEM4ztaSC IJVUnBqc4AyybpqfhZEHCO5pgh/kCi7RFmoA+0eKTFxVwjJGbXcymAj6oDRvAS7Ue+Ji U6GQ== 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=mH91QnSgxvC4j5tu0SPLOYxEGaLIR81KrmQMR9S7wsg=; b=Pr3/8GJUNLm07YJ02ERS6aMZ9j3EoBZaz+A6zJhzp9N6XJT/SmAUrVDi3+s80xz+4A 7h/b7ekr6hqWNpUKQYpkJuctEbx1pgBQO7WJmjWkJll/BIlQcRznR/5ev6gwsVitPXbO Dzeut3QWj0TT5iq7CugtoOmfzUSG9tNfJESvSXr7tTsJNhl8WDw/DerLCcCBGB/yVHkL VwvivG+vjCYXiUnkl+hZ6/XIzkxP1qJMUeoyhkfgI0OWyHVyw1xw/gV3mssgJODtgAXr Hr8/aUmB5rCBYoSSI9UXisLaNcDPTzCcaPcvrS8wbmopdPbj/RQjnQxfEEskX6BGScQU 21jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=GFjCtYbL; 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 4si5429916ejh.124.2022.02.19.05.30.55; Sat, 19 Feb 2022 05:31:19 -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; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=GFjCtYbL; 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 S242343AbiBSNE6 (ORCPT + 99 others); Sat, 19 Feb 2022 08:04:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242323AbiBSNE5 (ORCPT ); Sat, 19 Feb 2022 08:04:57 -0500 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 6AD0748388 for ; Sat, 19 Feb 2022 05:04:37 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id qx21so21332295ejb.13 for ; Sat, 19 Feb 2022 05:04:37 -0800 (PST) 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=mH91QnSgxvC4j5tu0SPLOYxEGaLIR81KrmQMR9S7wsg=; b=GFjCtYbL40cTtZhkRLv9Bl1jLjTTM36g7Wt3xQ0smUg5bGzLv9E1pwR4fAckTgHoqs 8COpCaHy87WGC3yIAe54CvV7KRCJ0VtUazzfkDnKaHSyIDfspsA0GTOsYPyatHZ0iX9t lPoKXa9riR3D4fuQ77JqbCIzxiMUNSWEBIdd0U1/Br8n62Es9vXtsAP5w75XjP22Yj61 0bEN3oHO9B3zR3z/O3gqVdvu2ZOoCZH0afVP1Cth+DXYJwmkEDLdCGnSXFTqSMXoqr+G 8Pkz0ziPHqFarTPwkQnMqPlt2918aQQCnCH0z+tYwqkC5q76w0r2ohY3h+1QvSyoB/Xo ysZg== 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=mH91QnSgxvC4j5tu0SPLOYxEGaLIR81KrmQMR9S7wsg=; b=jDRJfqmjGw3OR9tBWlCrzkDrzWZmFrhElbHa5QOT1nlPSp5DczOxq6Lv7FgLpBI2Fu ccCGbFXqkHn6zR11BNkGA6wsQZvJPng6Oy/GAbMjiz/FMGQ0fsyGptry8jRAbJHD2G/+ gYzwB2Bp+90DB2ACO3qoAJapqznrj4NpMSDtgNZpFuDPou1mfnA9HQpdPSNxD25lwuZ4 AIgDcnJWGYlMEDtfWROhnBKETHB/ZciJmCTlQJeAD+diWM32EldBmJ9xhbrI06SpM/nd fs0cYUzSjhOD7sU78sCStcXz8jwFlQ1EU1zEJ1Y74wq46ueV3tP9cPmVrJMtswp4y36C cGvg== X-Gm-Message-State: AOAM532JP75lE44dBYgUsAHx62V8Cc+0kOZqkyenoSVaTJ2zNzlVJXx7 arf3PlJCpnPUZ7UPpvUxauiboldL6Ua3AkbBJYqN X-Received: by 2002:a17:906:974e:b0:6bb:4f90:a6ae with SMTP id o14-20020a170906974e00b006bb4f90a6aemr10115442ejy.452.1645275875999; Sat, 19 Feb 2022 05:04:35 -0800 (PST) MIME-Version: 1.0 References: <20211227091241.103-1-xieyongji@bytedance.com> In-Reply-To: From: Yongji Xie Date: Sat, 19 Feb 2022 21:04:25 +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 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