Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp863666pxp; Sat, 19 Mar 2022 21:46:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9svb8G6ZjYeAVpaIHfA2ck4FPNQptFgLbRufP1u8P9AymC87cOuYyO3DCPqa5dG6uxt58 X-Received: by 2002:a65:614e:0:b0:380:bfd9:d4ea with SMTP id o14-20020a65614e000000b00380bfd9d4eamr13543800pgv.92.1647751563352; Sat, 19 Mar 2022 21:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647751563; cv=none; d=google.com; s=arc-20160816; b=usTXhZfqh1S5e1woS6MZIoQGscb/lsx5EAlWRuvFA+wdY/xVsOI163AYGkzgECNBW2 usuzX0W3SpEfUEgrn8IzVsYayg6WY4wG5Dc1X9uX3E3Dco1gpM3jsQo0YIS6J3W/2y9R FCs4URrnWC/WgoaeTnbdgoIeZQTdoXClk/5qTz7NqPQdzGLH2sFDgzLNlbD99d9Un72G TPu/Cf+gsxjGTIvNY9xZsVxBLvm6Hg1aRjyaDMyDxdf/eXHBfd5Saj8AncMF3/3CFeE7 RMJEmWc9As2ak9O26/wMzvl3mw3ZwuU14Tg7pyMJeN+Qi6gsAj9gC7BI7DsMXs7qBjxx UZkA== 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=YNWKzeESaiRrDcgHJeZCozlSwAkXte0RbGLzewEjFFI=; b=zTEwQQE4h52chHGw4w9yF+zXseUw7TuAmcUFCDKu6g8GTpXaIT9BXbT2zCTrcb1IdZ xbTYpee2ZpTkuMlyGkCuZsn8LFWaoaQ+XGBc4+qbZzESMN8F7M5bNHlqA5eWe4T0yWFk 8F4DeLsmunQ7XaQB5xfCjoxjYhbWYVIO5fEu8/C0XkbCF5g4MQqaTMTWTuEM18ZSxqeD kAdSOoSr0tQJS3F1XZ6rngpFxGaYCCEl3ww3g7Zac894qnOyssIfQDU1AKDoX5DbMzN7 eN1yutSlyKQfmVo1vnO9pdjkFgUOhxYfuU1tMdU2SbL6GNT12L/fnjWbodCOyOLkHoko RjHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="UIj/HDhM"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c191-20020a621cc8000000b004fa7103f312si3469032pfc.68.2022.03.19.21.45.29; Sat, 19 Mar 2022 21:46:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@google.com header.s=20210112 header.b="UIj/HDhM"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241740AbiCSBqh (ORCPT + 99 others); Fri, 18 Mar 2022 21:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241734AbiCSBqg (ORCPT ); Fri, 18 Mar 2022 21:46:36 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0E552DD9A1 for ; Fri, 18 Mar 2022 18:45:16 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id hu12so7701931qvb.6 for ; Fri, 18 Mar 2022 18:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YNWKzeESaiRrDcgHJeZCozlSwAkXte0RbGLzewEjFFI=; b=UIj/HDhMkav0QFqczdIho8WP3JdoCMDkr1LD604PR+TsjAkkNtiopzn1Rz292AAuv+ U6YncleKjfEf4GUBioDcATWjt6rFu+uib/wiTqBtWlOxGS5ebBViSRb+9DK6LN0Oa88P P+3FUqL2Y/F8Do3pkfntu+AA5V+iaqdVyFStNCvdp8+PkbdMQpGYPxZlRYieGNov2+S5 JYFqPfIXjQY/JlKBCJl8hZoHkq77klZNsmjl9U1UN12CKsOIuNgR6xLW9gjj+F/Tv639 H8NWl7J5C5RJSjHZPEamEX8wdHWUnJMa6AuMBS4Su82xGRTaxCTxJrmz0sYcypA6FNm7 LKMw== 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=YNWKzeESaiRrDcgHJeZCozlSwAkXte0RbGLzewEjFFI=; b=pXWLSmpZZIKc7mjr9KfHyM2hXtPA1WcU2wsPQdYw4YcML0KEXX2hYNK1MpCD+FZOo8 Xx7z9gVCm3jV9GCyBU6YNPzXlv5mrpUqDgP1HVHYiUXimeiiBQqb110ofFH01iD4HzgY Yht/UvFYuOVSOwSH0V1A0d5RkGv24MX/XgA9opApBIPheMSVqYE7bsgfj/LtPD1kxWi/ C5s6ywq32JTugcnQaLCc+OjxOVut9cPEreZZkAnQ2g0ML6M/vKlEdamald1qNcced3Zc x5S9Udck28hpwBd9pLLyo/jM/wKQEOEgQktHVm5we4eHPTcJcl2Nax7JB2Eu0vt5jOiD 0l0A== X-Gm-Message-State: AOAM532EtL3OHS+WrxOrUPJFZuUk+UbNM1pdm8lHP5cqT/vzOOzBZtpP RsSJSdVtT7C0ouNYx8fboBqPIm2DuhDDhi+oheYA0Q== X-Received: by 2002:a05:6214:29e9:b0:439:eedb:dedf with SMTP id jv9-20020a05621429e900b00439eedbdedfmr9213739qvb.15.1647654315245; Fri, 18 Mar 2022 18:45:15 -0700 (PDT) MIME-Version: 1.0 References: <20220319001635.4097742-1-khazhy@google.com> In-Reply-To: From: Khazhy Kumykov Date: Fri, 18 Mar 2022 18:45:04 -0700 Message-ID: Subject: Re: [PATCH RFC] nfsd: avoid recursive locking through fsnotify To: Trond Myklebust Cc: "bfields@fieldses.org" , "chuck.lever@oracle.com" , "linux-mm@kvack.org" , "linux-nfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000327a0305da886a68" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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-nfs@vger.kernel.org --000000000000327a0305da886a68 Content-Type: text/plain; charset="UTF-8" On Fri, Mar 18, 2022 at 5:36 PM Trond Myklebust wrote: > > Isn't that stack trace showing a slab direct reclaim, and not a > filesystem writeback situation? > > Does memalloc_nofs_save()/restore() really fix this problem? It seems > to me that it cannot, particularly since knfsd is not a filesystem, and > so does not ever handle writeback of dirty pages. Ah you're right. An alternative would be delaying the destroy_mark, which I am noticing now that, on mainline, the shrinker calls nfsd_file_dispose_list_delayed, something missing from the version of 5.4 I was looking at. To my reading 9542e6a643fc6 ("nfsd: Containerise filecache laundrette") should have the effect of fixing this deadlock (and the message does explicitly call out notifier deadlocks) - maybe something to send towards stable? > > > Cc: the linux-mm mailing list in search of answers to the above 2 > questions. > > -- > Trond Myklebust > Linux NFS client maintainer, Hammerspace > trond.myklebust@hammerspace.com > > --000000000000327a0305da886a68 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPmwYJKoZIhvcNAQcCoIIPjDCCD4gCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz1MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4 AJXB1Q3nGNl2tNjVpcSn0uJ7aFPbAgMBAAGjggGKMIIBhjAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0l BBYwFAYIKw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