Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp112959pxv; Thu, 8 Jul 2021 16:31:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvLeEtc/sO/wvyL1ooI//Iuw0o4VCfjWI1HcPW/k6UYaFjRHmX0/V2n4gt1BOQd22R1Piz X-Received: by 2002:a02:866b:: with SMTP id e98mr29722193jai.48.1625787088974; Thu, 08 Jul 2021 16:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625787088; cv=none; d=google.com; s=arc-20160816; b=Ik7B2AuGFpoq9op3WGClE1WJEhThEmlq5UzrRRAjW7vzoaaGTAjs2/w/sNLFeUuIZB 4Jb1HAiyfBBpbl/pGSjJZl7YIy1wGJTMa60PuAkrzpZ4q38IR7ELg7OhYWfaH7xIQKl/ SC2HlCP6p6I9M1I/U/PMcFRgcxrT9ntyDcRRCxCRm4PAl/GlH+lMVFn/xFZDeppegj2N e+G96XgnHEt/t49RlmoqOGKswLyu+Tx85dZMKOPAV0/Nw4ed5KVRGljjcRlFu6IsIXKj M5dngJO6lVyo5Mqr+xbK8bnowY50ZDI+MsUb7r+iFCE1xRlMJ4fGMIGycwmHJK7kxTeJ SQIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jra6eVCUb4QOC04fq6nucXKQ0jZAs8nzjUB1r1PZFhA=; b=JujHN/4a7N0cClctHn761UKmP+lqx+ABcr7HnrXmw3oShZoCegHXo/2AVWHztEsoNU mFlMtxDPBVT2htnv7qqGze7XVIggrfVxvFXLPpp3PHqgWc04M54YTrnhp41eA9nyhkQT YCGrNdEefjG9HA8dYPTXXyz8zh9sdTw+26gLZMRfwUwgAMOX1MhPxG1B7pCJHz6PUExd Aeqc9IQuWSUFIwJACE5JBCfY6+N3iSE9CMn67Ydl74S5D3bCR5lp4mlbTkfprWTbBpjP MuoVAb5hiXIisPELqrmENDVtAGYIwk3d9y9yfL5+y2r3kE4I20cJ7UCDKJHdmVKmg4KS R1dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QswHst43; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si4166194jat.17.2021.07.08.16.31.15; Thu, 08 Jul 2021 16:31:28 -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=@infradead.org header.s=casper.20170209 header.b=QswHst43; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229497AbhGHXdw (ORCPT + 99 others); Thu, 8 Jul 2021 19:33:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhGHXdw (ORCPT ); Thu, 8 Jul 2021 19:33:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37860C061574 for ; Thu, 8 Jul 2021 16:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jra6eVCUb4QOC04fq6nucXKQ0jZAs8nzjUB1r1PZFhA=; b=QswHst436Z1sDOR32UFIIiumRx 7DhL+HW0K11GdlWrHerWGHPwqRGIGLrynZGbN7nmDLcUcDhueKvxitmI1u1NLdkgh4O+ItnFpJ2zZ q8sOq7r4chvz+TCb1+cvgCB732YbCMYHeMYzoRBcWk5VM+X5UGT6cJNBcvDsYwz3B1/U26tJEGvbe WIcZcfBjlqg8bKs2XR5JisH73eyFIQCB+VEonxLI9crtz9kevDHUcLR7xFNKieW3n3V/ccKwMQ2x1 sO97ejdSXZ+//XFeXEUdjb51317N1WrscvFUlZgKY3xIa5lvUkYEedcXwZejOtACbhFR+puMtGAso Ge6yaP1g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1dTu-00Dw5R-Kl; Thu, 08 Jul 2021 23:31:00 +0000 Date: Fri, 9 Jul 2021 00:30:58 +0100 From: Matthew Wilcox To: Chuck Lever Cc: linux-nfs@vger.kernel.org, linux-mm@kvack.org, neilb@suse.de Subject: Re: [PATCH v3 2/3] SUNRPC: Add svc_rqst_replace_page() API Message-ID: References: <162575623717.2532.8517369487503961860.stgit@klimt.1015granger.net> <162575798916.2532.6898942885852856593.stgit@klimt.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162575798916.2532.6898942885852856593.stgit@klimt.1015granger.net> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jul 08, 2021 at 11:26:29AM -0400, Chuck Lever wrote: > @@ -256,6 +256,9 @@ struct svc_rqst { > struct page * *rq_next_page; /* next reply page to use */ > struct page * *rq_page_end; /* one past the last page */ > > + struct page *rq_relpages[16]; > + int rq_numrelpages; This is only one struct page away from being a pagevec ... ? > @@ -838,6 +839,33 @@ svc_set_num_threads_sync(struct svc_serv *serv, struct svc_pool *pool, int nrser > } > EXPORT_SYMBOL_GPL(svc_set_num_threads_sync); > > +static void svc_rqst_release_replaced_pages(struct svc_rqst *rqstp) > +{ > + release_pages(rqstp->rq_relpages, rqstp->rq_numrelpages); > + rqstp->rq_numrelpages = 0; This would be pagevec_release()