Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4937997ioo; Tue, 31 May 2022 15:30:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmZlMr1g+bER4pYQW0R/nSyOV+IX8DqJPw0R8Tx2ZkeeVeFHGqWIg0lg7qu//rSWftp7iT X-Received: by 2002:a65:5901:0:b0:3fc:2c0b:93d6 with SMTP id f1-20020a655901000000b003fc2c0b93d6mr8443131pgu.361.1654036243226; Tue, 31 May 2022 15:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654036243; cv=none; d=google.com; s=arc-20160816; b=uH/I/cJw417dEQDk+M8z4lLMFuxWM5yfeJOxNMjHMEXAsrUggd7cSEdZHS1uiH4Xsl HeQLq/cPF91jps9QhUuTwmwkBXg/AJf9k3AacFKJgtmq+owsdtCGQmL8zPUMeyOfm2TX w942VvqNv1UbZMWg13c4XvU3qJLLQjET8N4vOUY43GvHXBoY7Ky+5jUKsvkcs6U2ASvn XQJcXonTSEgYjWY16Kr3and6k3whDSjpOf0xF/olhX3G23oWcqlOvKhGF7Jf8c1fpDK+ LVx8ouTmUx7OdPlh3Nj6PfBLd3ZQy/CZxZNjcJDJk/DrFMWxZn2gWScF0KOck+//hEa9 47dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:references:in-reply-to:cc:subject:to:from:date; bh=oKUucN+V4aOD+Of4n9HQLx+zmJlXUpDQC1erDJcrCPw=; b=I1jm9vYjycPaGd+b7ZE2gbGXgxIQuS4PakKtvJUeUZnhefMjftBN2Sc7Qe56R07jwo SCnGfLI3FkJE+LmONNxLFBI9rcLFnUiokZSIKZdhTsBs7yR/+4EvWAJpvCc5Vsj0afbz QxRO48dn1Hww5u4z33yGoMsv2DgC0P2Esq1XJ1LnO+eSelgTDFRtpaWxT5/NU78WPK9j /b6oty5Gk9KFi6G78W5sOuGu9QVlgX7f7rN/oF51RNmOf9c8w8blbRymtR5L3WhO0IdN 1lax4FP7Ac7llcYGgXRZCOfi5GRCpP5YyjBIM5vGOQI4E13+zr8XIkJNq03rxSw5vWyX 1csw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a17090a644700b001e2734dc84csi3678355pjm.184.2022.05.31.15.30.18; Tue, 31 May 2022 15:30:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345274AbiEaOo0 (ORCPT + 99 others); Tue, 31 May 2022 10:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236138AbiEaOoZ (ORCPT ); Tue, 31 May 2022 10:44:25 -0400 Received: from out20-97.mail.aliyun.com (out20-97.mail.aliyun.com [115.124.20.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D50E8FF85 for ; Tue, 31 May 2022 07:44:23 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1268614|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.234318-0.0468408-0.718841;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047192;MF=wangyugui@e16-tech.com;NM=1;PH=DS;RN=2;RT=2;SR=0;TI=SMTPD_---.NwasG1p_1654008260; Received: from 192.168.2.112(mailfrom:wangyugui@e16-tech.com fp:SMTPD_---.NwasG1p_1654008260) by smtp.aliyun-inc.com(33.37.73.205); Tue, 31 May 2022 22:44:20 +0800 Date: Tue, 31 May 2022 22:44:21 +0800 From: Wang Yugui To: Chuck Lever III Subject: Re: [PATCH v2] nfsd: serialize filecache garbage collector Cc: Linux NFS Mailing List In-Reply-To: References: <20220531103427.47769-1-wangyugui@e16-tech.com> Message-Id: <20220531224421.7601.409509F4@e16-tech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.75.04 [en] X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 Hi, > > On May 31, 2022, at 6:34 AM, Wang Yugui wrote: > > > > When many(>NFSD_FILE_LRU_THRESHOLD) files are kept as OPEN, such as > > xfstests generic/531, nfsd proceses are in CPU high-load state, > > and nfsd_file_gc(nfsd filecache garbage collector) waste many CPU times. > > Over the past few days, I've been able to reproduce a lot of bad > behavior with generic/531. My test client has 12 physical CPU > cores, and my lab network is 56Gb InfiniBand. > > Unfortunately this patch doesn't really begin to address it. For > example, with this patch applied, CPU idle is in single digits > on the NFS server that exports the test's scratch device, and > that server can still get into a soft lock-up. IMO that is > because this change works around the underlying problem but > makes no attempt to root-cause or address that issue. > > I agree that the NFS server's behavior needs attention, but I'm > not inclined to apply this particular patch as it is. Yes. this patch is just particular for xfstests generic/531. In xfstests generic/531, when many(>500K ) files are kept as OPEN, a file delete will cause LRU walk( CPU soft look-up) too. big LRU data is still fast to add, but very slow to remove some random one? Best Regards Wang Yugui (wangyugui@e16-tech.com) 2022/05/31