From patchwork Sat Apr 15 00:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13212215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E4E1C77B71 for ; Sat, 15 Apr 2023 00:17:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4B4E900003; Fri, 14 Apr 2023 20:17:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DFAFE900002; Fri, 14 Apr 2023 20:17:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE9D7900003; Fri, 14 Apr 2023 20:17:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C59C9900002 for ; Fri, 14 Apr 2023 20:17:54 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 96D4880417 for ; Sat, 15 Apr 2023 00:17:54 +0000 (UTC) X-FDA: 80681712468.08.03A9A23 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id 0D57B180006 for ; Sat, 15 Apr 2023 00:17:52 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RFRGXz40; spf=pass (imf24.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681517873; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=y5s0oj3fspkMIqQe4/p1hOKCXH2L3uSpGkhVf5simQs=; b=jq7ZwzydxFkj83aNx+o6tCrS0DS08rtys55kVl+7C5gIJkDRiuq6SCGw113zUAi78pheRt F/PcD09kpdIeyNqh9MiOkXMvLQ9lgmT+tnBHUy/JHETKqTXNeaw4+L2nD2xCU9CNVQtvTR Mb9FQIdIvXr/Sbof0xJ7LxJ++ryu7vQ= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RFRGXz40; spf=pass (imf24.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681517873; a=rsa-sha256; cv=none; b=OwK37wnBjbmcDCXjog+F94idGHk68n0fo37Qed8LflyLhJ2zUo1fxH1U/6Xc/KONUAaojq qBC+ZOj4S6Aezgs0OpT8/dEos9j1UVjoVefzEVo8lORc2ZTqsLFoV8kMPgTe74n88CaIco hn1oK5Ajh1KG18uNTGml9qV3HZLblhc= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E919A616EB for ; Sat, 15 Apr 2023 00:17:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 315A9C433D2; Sat, 15 Apr 2023 00:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681517871; bh=G58Efku2aEurEx7cOiEClTaBhHkLB7i6XRXkkHn0ZwE=; h=Subject:From:To:Date:From; b=RFRGXz402G4mwYNc+HxoDI32EOxrB3fOmvbeHwYS6Ycy1sJw30B0mSIIaLIOT3mQf MrjUQudHRo3jhYPhgiEct30QNVNi543QsgsF9Kj+a6zMib6HEw/ZEB81wVImPjhS+z xzQBGxEtbbxGa/ZiWrdr7TWtp3fj/YbOr4LIaE2BJGUKbHWyYG5vBlOBFVMq3TTxLO bfNc2d6z0xq7Twf5yp9XmKXiv/cmM9OFKJUXJfB/O513mKoYxb7RK8qZ4ICfJtmf6F BnNG4P/Y1bAO3jjr2B3GIqK0tZQHIi+eUWpKbMQ4igi0fR974Xd81oPq5Cd3ynpuCd xmmjTo2WGHO9A== Subject: [PATCH v1 0/4] NFSD memory allocation optimizations From: Chuck Lever To: linux-nfs@vger.kernel.org, linux-mm@kvack.org Date: Fri, 14 Apr 2023 20:17:50 -0400 Message-ID: <168151777579.1588.7882383278745556830.stgit@klimt.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0D57B180006 X-Rspam-User: X-Stat-Signature: 745bmb18dutdiuanp9o5pke9u49sfrzf X-HE-Tag: 1681517872-12481 X-HE-Meta: U2FsdGVkX1/h9AID+/COtgli5pR9ZhDx4mIveVT8My4H7XANdRJTc/c2INs2H5+M9Wg6usf6v13bbSBkMskM9L7+44pgts5nU2zD5d8WBsxzpvEmhmkofmCUGMVzvOQHZge5CGqpBHfveIJI0rKYLELWPtnKT4etHDGlsM0jk6cSPSJkzgztpostyKe0t+yV6zS3xdEn7AxRuHIzmlIVfWyL2Hj+VNjbCXI93naf5fo6qNb5s02EWbdjEkXZ8TrTv66ZsEpXmoKEt6NXYm8ppAzNZPU0DwH52WblD0oLn/he3ydQHf/DQY/DD971UvPS5kyRuq7ayeK4ztRDCof7C6Nd6nUi2/bQ0M+UGpLnxBSkTnYDAoZs/uqU5DQ/pGImRDcr8oPEMt2hNCXb844K3nIC8X0NWX6i1VEdA4UNjDDn5Otto5pQXfsYnusY2pmbHIZH4whUWd7x7y7pGj3sXBG3QyxsUVSlNYe4q3VoB7YAXrOTHu4tKK74n9u0RtWdQaWU+nm1ZwUQf2OnA4aPInqIAxjpLEsi+ECOl6pNIc8WoYwt1qdbgy/chQSGSTvLrPlCfq/R6BLpYSvyf4VblmxK/+Tn5jYkRpwxMEFthzEdCxTyKG78IxxzOtDxc5wxOb6jXqFtOYOtEg18MzDufyVECp9oeMUGEWUz3QOnMSOBVmh+4bdaeSOTV1MxATfxUTzAlqo572GGCLwTN2BTYVPL25MeymJ4emYMe+RIgOc0ch/f2FeIwvY8KBXUaD0mKH0OBU8Y26Gn9pFYm4IqqldOG2gEwyuHm0By0yyC7WcMAp+ffBCJPC64mM8I0UdqFzKAZFtbNngq7t0rbHjUUzgiJmSG3uIOOgPKgKF2rzv0zrToZyUQe52PDfH7llMwX+oCwBawLUFQhAy4T+B+0yzQ9U9eKuU2jYR96w4nWusRTbNk9AVvvL7njqOmmFs7PU2AtFSYVyKPKaXDAyL fUjvOCSw 5Brx5lBC9Fgs4DDAcBKD9w5bW+d/uFEKrny8e/WXx0UIIgJVugymZqXtXbyStIbcAzMey1cK1LcAfoYDn4+DpyTPki5ZRfFqVB2784bPlgNiUYGoCJ50/UnZuuZ1v9Eqit+6tfa69a0SraneE0305uKh+c80tKtgPLaCigMUwGqFaKUb1k+1BiBEE22rPkV+iVMa2EcQoaOYMjrviW4jcO6ckv8p3YH56846g0iyCWGetmFc3nzr9cqRa7CoEsPIIhy8bsmQHIDtmtI0LEspR7eZ1/BAQEbmcUwi96JSQTlq4vGGQDz5WXno0SSwNNMqXn1jEjl3LxqCNJjk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: I've found a few ways to optimize the release of pages in NFSD. Please let me know if I'm abusing the release_pages() and pagevec APIs. Reviewed-by: Calum Mackay --- Chuck Lever (4): SUNRPC: Relocate svc_free_res_pages() SUNRPC: Convert svc_xprt_release() to the release_pages() API SUNRPC: Convert svc_tcp_restore_pages() to the release_pages() API SUNRPC: Be even lazier about releasing pages include/linux/sunrpc/svc.h | 12 +----------- net/sunrpc/svc.c | 21 +++++++++++++++++++++ net/sunrpc/svc_xprt.c | 5 +---- net/sunrpc/svcsock.c | 12 ++++++------ 4 files changed, 29 insertions(+), 21 deletions(-) -- Chuck Lever