Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1152456pxj; Tue, 18 May 2021 23:03:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdD8O2NZplkpTC7OxI6QvGI5u37FSeGYwwjiuGwEoJl1i4/z07HGshNErT6kZ1slNfCWlg X-Received: by 2002:a92:ab01:: with SMTP id v1mr9650987ilh.190.1621404237290; Tue, 18 May 2021 23:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621404237; cv=none; d=google.com; s=arc-20160816; b=RqV4XKgVht95uc2WaWsG7d4apNr6aocnkM0M1ZfUUefzL4UdILtLUj500pto/+q4zu WQTzerbkNA/U396DRsyW1wg+L6Vpuo+8B272DYwlKr2oIW7rjdZAuJpT4O5M1CkKpIHW 2idyMq2gYQh9cTZ5AzaW9pVo6G52k6T0Iob2Xy3f0ZRrJFF+g07JbXzSHMpel9c652MD Zp4FcSRjepQsyCMXvp7VOqz6gdCY4A3KbCKpupg2EKIfta8+fSnEmwlTewLC/56+VaN9 gT3H3Nnt6UCqa0FNqkyeeZoBbkq7oaqpV63dalhmqv4qwziW+885LmYNwUz0FzpgPljq X45g== 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:date:subject:cc:to:from:dkim-signature; bh=Z261lr6g+w9tGZ1+MpXSBR0T5+E8W3C9XBorlKxfuf4=; b=glPQN2XfWtcDRaTWyhefv5TB3atryoenC1IFr4SISZ8uNUJUCtQL8ziXJhICTqClFt 9VD1jH3RqX055cvRKIK0LDowtHhDrr7i7oQb/CKXa3x/R7RTnnqwsGWJuyCgR/0sfUNW jOsFXUsfpO9GMd5o8UgguaC0u6orGHZ2OZwxodHfD/d0SsDlMU1oxm+isV/Tx7JOP2D6 GU0C3m26KOGfHBdXUUPnzoHnu5mhupk439T1MRPwzom5g+ZT5IjBIPovOJUCdoXw2ROp VA2t7P/jr05OmAVuiiyjJAtYszV/1UQDqBFnMHN5Jrtz7kuzCfvhXpqMW4Fqxv8OWgL7 QeiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=s6zYDhno; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si14469119ilk.127.2021.05.18.23.03.36; Tue, 18 May 2021 23:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=s6zYDhno; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344018AbhEQWpB (ORCPT + 99 others); Mon, 17 May 2021 18:45:01 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:59444 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236878AbhEQWpA (ORCPT ); Mon, 17 May 2021 18:45:00 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14HMfrEt023092; Mon, 17 May 2021 22:43:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=Z261lr6g+w9tGZ1+MpXSBR0T5+E8W3C9XBorlKxfuf4=; b=s6zYDhnoFtKcNjTWwXwOvZgSuVeihbTMk+p9wlmlxx2ph/Nq/kRtM8ruLDfUpeaWmzig wc/LiLhHiu8BdM38nPziD1zvz2MVgHU3UKyEhdSfpV/iauaLL9ViRCJrEWEf+TpGaKoW tBkE/mV0FVNZU7mxfTPbaJekceOMm7CN3TOtRKn2YYcg/J2yd9iLXWwyg2I9hf9l5KWb Q7LaeVMBlb9/YQUKqqQ64vw+I7Ugfj4PXicxK8jat4s6MGU94W/JtvEF5rKg9/P/5Qgr HU7H8OSqJhosZbQUdeAaLDiPfvp83fhIspE3hty010kb8KilDza09UnhIzrfDD2iSrnK DA== Received: from oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 38kffu0d6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 May 2021 22:43:39 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 14HMfAZl145354; Mon, 17 May 2021 22:43:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3020.oracle.com with ESMTP id 38kb37baw3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 May 2021 22:43:38 +0000 Received: from userp3020.oracle.com (userp3020.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 14HMhbq8153088; Mon, 17 May 2021 22:43:37 GMT Received: from aserp3030.oracle.com (ksplice-shell2.us.oracle.com [10.152.118.36]) by userp3020.oracle.com with ESMTP id 38kb37bavx-1; Mon, 17 May 2021 22:43:37 +0000 From: Dai Ngo To: olga.kornievskaia@gmail.com, bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, trondmy@hammerspace.com, chuck.lever@oracle.com Subject: [PATCH v5 0/2] NFSD: delay unmount source's export after inter-server copy completed. Date: Mon, 17 May 2021 18:43:28 -0400 Message-Id: <20210517224330.9201-1-dai.ngo@oracle.com> X-Mailer: git-send-email 2.20.1.1226.g1595ea5.dirty MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: irlJzAWe-c8XmdWVzaiZCkryKnbC1yio X-Proofpoint-GUID: irlJzAWe-c8XmdWVzaiZCkryKnbC1yio Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Olga, Bruce, Currently the source's export is mounted and unmounted on every inter-server copy operation. This causes unnecessary overhead for each copy. This patch series is an enhancement to allow the export to remain mounted for a configurable period (default to 15 minutes). If the export is not being used for the configured time it will be unmounted by a delayed task. If it's used again then its expiration time is extended for another period. Since mount and unmount are no longer done on every copy request, the restriction of copy size (14*rsize), in __nfs4_copy_file_range, is removed. -Dai v2: fix compiler warning of missing prototype. v3: remove the used of semaphore. eliminated all RPC calls for subsequence mount by allowing all exports from one server to share one vfsmount. make inter-server threshold a module configuration parameter. v4: convert nsui_refcnt to use refcount_t. add note about 20secs wait in nfsd4_interssc_connect. removed (14*rsize) restriction from __nfs4_copy_file_range. v5: make use of the laundomat thread to service delayed unmount list. destroy delayed unmount list when nfsd is shutdown. make delayed unmount list per nfsd_net to support container.