From patchwork Tue Mar 23 15:09:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever III X-Patchwork-Id: 12158245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70D25C433DB for ; Tue, 23 Mar 2021 15:10:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0480A619BD for ; Tue, 23 Mar 2021 15:10:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0480A619BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 845B36B0206; Tue, 23 Mar 2021 11:10:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7F5626B0208; Tue, 23 Mar 2021 11:10:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66F016B0209; Tue, 23 Mar 2021 11:10:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id 4686D6B0206 for ; Tue, 23 Mar 2021 11:10:01 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EDBB58249980 for ; Tue, 23 Mar 2021 15:10:00 +0000 (UTC) X-FDA: 77951474160.18.3D95F25 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP id 93C39C001C6C for ; Tue, 23 Mar 2021 15:09:59 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id F0858619BA; Tue, 23 Mar 2021 15:09:52 +0000 (UTC) Subject: [PATCH 0/2] SUNRPC consumer for the bulk page allocator From: Chuck Lever To: mgorman@techsingularity.net Cc: brouer@redhat.com, vbabka@suse.cz, akpm@linux-foundation.org, hch@infradead.org, alexander.duyck@gmail.com, willy@infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org Date: Tue, 23 Mar 2021 11:09:51 -0400 Message-ID: <161650953543.3977.9991115610287676892.stgit@klimt.1015granger.net> User-Agent: StGit/1.0-5-g755c MIME-Version: 1.0 X-Stat-Signature: n1yc9wq156wndguaq4r8pka3gkz7kmxz X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 93C39C001C6C Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: none/none X-HE-Tag: 1616512199-563928 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000061, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patch set and the measurements below are based on yesterday's bulk allocator series: git://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git mm-bulk-rebase-v5r9 The patches change SUNRPC to invoke the array-based bulk allocator instead of alloc_page(). The micro-benchmark results are promising. I ran a mixture of 256KB reads and writes over NFSv3. The server's kernel is built with KASAN enabled, so the comparison is exaggerated but I believe it is still valid. I instrumented svc_recv() to measure the latency of each call to svc_alloc_arg() and report it via a trace point. The following results are averages across the trace events. Single page: 25.007 us per call over 532,571 calls Bulk list: 6.258 us per call over 517,034 calls Bulk array: 4.590 us per call over 517,442 calls For SUNRPC, the simplicity and better performance of the array-based API makes it superior to the list-based API. --- Chuck Lever (2): SUNRPC: Set rq_page_end differently SUNRPC: Refresh rq_pages using a bulk page allocator net/sunrpc/svc_xprt.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) -- Chuck Lever