Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3825408ybl; Mon, 3 Feb 2020 07:15:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzAqY2L2n2MprOL2xp41xA4ysU9u8E0Yq1jiyFryHO3dwHNowXC/ygXnxvEr9ahAEEU6qWr X-Received: by 2002:a05:6808:aac:: with SMTP id r12mr14984205oij.59.1580742904626; Mon, 03 Feb 2020 07:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580742904; cv=none; d=google.com; s=arc-20160816; b=LBA0tJvCpBiChKhgfpv2D0N4gDL0zl2ATwf/0dUL1rJhvF0/fatk0dXaIUzuuLp30U Hj+JXGMxL8E2OPRU6v9A+4y1JLwWb5D7L48/+v9xnR867shlYwvZ8Z38r83bPJ0KYxAK vXOJnm8EClEciWQzuXjMC6Vk4oRj5DPJHzVP/WQwD3WRkSADoGaxky3Kbesp5KxdeejK dv5hVdKwnQm4Ked3VGZFLbbP26ECG5sZt59RTuMYXIOwq5agKF5Qz/I0PNBhnF9uuqAK pUyRMeV80QNp6fBGeI6p/uC5hjwivL/m6WyF29W9AIIkFfq9X0MFxLhatwFTL0XhBhi2 YEtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lixzxSvFrpo8ACZ+mFoc4XSH+6CaaC5C1z4xAKw9EnU=; b=hutm+pCfWbxBZQ8L4+s0FLnSivJUILq55Al2CEeJRuR4JXzLzqrdf2L0kc6wkmqxXW qT3UQroiAD11yJIgg/K4UGFChT74XXkgSchB7EUvB7IHJupuRzMizflaed4ABPrWVrZd 3yV1FcJyeBTameX1Otz1F42Aij1Z2Wsu0Zc4AkWRPcZD/rNZZkdGVKd0QAMR1+9ZCU5g +CYdVzXD6LPgBTdFHLVoFxsJifYiGuGD2He8hccCrwlZjt+xuaVp3oxi+6Pj/TlABqXf 6M62DUsxhePJVYd1USCXmwtwBLQaL4OcVWNP5y+y4+lKWKZrkMae7w+MZI7ObnMZy+rs ydvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Gb0Ay+VF; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si8148953oib.269.2020.02.03.07.14.53; Mon, 03 Feb 2020 07:15:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Gb0Ay+VF; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728193AbgBCOmF (ORCPT + 99 others); Mon, 3 Feb 2020 09:42:05 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:48544 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727454AbgBCOmF (ORCPT ); Mon, 3 Feb 2020 09:42:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580740923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lixzxSvFrpo8ACZ+mFoc4XSH+6CaaC5C1z4xAKw9EnU=; b=Gb0Ay+VFlkZzk7ImFrUfHQCjMBgieMOW5nWXP/5A9cRhaT99FsCJJSsUlPxYUdtFTLcFZg PStQJhJmykgSGcQv+KM7YsLsyDSFPN3XTkEN/eXYUTy44BaDTYfeU0apfIakCZqFhGsqfD 6yZ02gNU7ndsrxvJTVi69kIGY9InwdI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-1ooyBL54NQCR23wMMtqZiw-1; Mon, 03 Feb 2020 09:42:00 -0500 X-MC-Unique: 1ooyBL54NQCR23wMMtqZiw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C0281005502; Mon, 3 Feb 2020 14:41:59 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-2.rdu2.redhat.com [10.10.64.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 723565DA83; Mon, 3 Feb 2020 14:41:58 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: "Anna Schumaker" , "Dai Ngo" , linux-nfs@vger.kernel.org Subject: Re: [PATCH 4/4] NFS: Switch readdir to using iterate_shared() Date: Mon, 03 Feb 2020 09:41:57 -0500 Message-ID: <03CF6022-FEF6-48D4-9F55-7A7ED9DE6542@redhat.com> In-Reply-To: <20200202225356.995080-5-trond.myklebust@hammerspace.com> References: <20200202225356.995080-1-trond.myklebust@hammerspace.com> <20200202225356.995080-2-trond.myklebust@hammerspace.com> <20200202225356.995080-3-trond.myklebust@hammerspace.com> <20200202225356.995080-4-trond.myklebust@hammerspace.com> <20200202225356.995080-5-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 2 Feb 2020, at 17:53, Trond Myklebust wrote: > Now that the page cache locking is repaired, we should be able to > switch to using iterate_shared() for improved concurrency when > doing readdir(). > > Signed-off-by: Trond Myklebust > --- > fs/nfs/dir.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c > index 60387dec9032..803e6fec0266 100644 > --- a/fs/nfs/dir.c > +++ b/fs/nfs/dir.c > @@ -58,7 +58,7 @@ static void nfs_readdir_clear_array(struct page*); > const struct file_operations nfs_dir_operations = { > .llseek = nfs_llseek_dir, > .read = generic_read_dir, > - .iterate = nfs_readdir, > + .iterate_shared = nfs_readdir, > .open = nfs_opendir, > .release = nfs_closedir, > .fsync = nfs_fsync_dir, Jeez, it makes a lot of sense just to use the page lock. Wish I could have thought of that a long time ago. Thanks for this, we'll send it through some testing, but it looks good to me. Reviewed-by: Benjamin Coddington Ben