From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 915A542A7B0 for ; Mon, 20 Jul 2026 14:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784557498; cv=none; b=rJJX57S0NU7BjgOHF8PhSh3ATe/MtXCi981RBCSH96PDYljFSiUIYv+XGIHwKVOFHUPOFP7AJqc34edauLJPsdVH2hMkYDXHwyTJ44jqGv4OEmgqDyoYDf9F7ATqqd4UdTw8f3KtFVHP+8SteNzqTKrO3+2Vq3zMY6j0wZmXb2I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784557498; c=relaxed/simple; bh=5YOz07pqrRzHc/y5gK+zPeW+ZinkUbIdk5AyTHFzBQQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fTrhHKG7JG46wX+AFBYjN2FkcOlQDWA5CFkarGnnlUaKyZIq3kdGIjOqcWcSwyqwlcXAkt8CqQzo3GStnVih8quE6KnTWeihikLwn7RNT+66UpExZzcEPCiuxz4nUz4SBBF3TI8itXYALfg9k26Oey8KeNXD8OtCAd2bHhrpqZg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=eyYrC7qL; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eyYrC7qL" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2ccdf36f63dso360705ad.0 for ; Mon, 20 Jul 2026 07:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784557496; x=1785162296; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=8cwKQpI83P5FqESUgzNcjIOqIVaxCRz594tRNYraCzw=; b=eyYrC7qLGTAnFMKsv6ZcinzzifSSJUnqW8Llm7a114KjX2qM2U0pMVj4iDKzW/FC0L HmyLwDcFzzFhuqCts1v3b/T6+4QJaYwAEjVSlD25eAZjW/I9ZzbUfiuzPnvmWgMcpHuA 7EV2ZKMoV1EV5hQiW1egHYlI5Y6fn9gaMJq1ECzvQeRT/DOA7JDIkap3HUcdWJow/dVy m1rn8k6ocpYkVzrScuTibx9W/0HpjX76Uo7PCjTRd/e38pVeIdAWN9J+pHHjxVI0YytQ 40/0sHBM1XtVF4n01B7nQpMdPHNEIpYfbCoiJYGsBZRk7tEbFaxwjrYK29+6PB9iJqx4 3EsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784557496; x=1785162296; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8cwKQpI83P5FqESUgzNcjIOqIVaxCRz594tRNYraCzw=; b=njjJNwRUeFKxN3aWnZbJ62Lqhf8FRbWNInvtUJY6gqc9AstTw+W7Kt25FlJ8qtmH5c IZvheV9OcC6WSS1msSczK34maNpPChn6iSjUglPl5+8s4YjpcR+ju3qYNzqGVWGuGgsY kQnUj2gpeDVh5Kn4Blq4GbwQkHayNsCDDqOlmUF+WB3o0ZLk4WuoYXupQKis5TwCXHar PegJ++NflpmylSCAdyu/Fbhcmm2749GRkwFmBQYRPbOnWA2GTF1EsQl4/d1OXo3PZEhH cvLUpG98azpjPiJ9PM6Ga0/+sQdS4fFXwq8ZulC/CK8t0q61Eyjx7MjMFH06TDmgqUqY /PEQ== X-Forwarded-Encrypted: i=1; AHgh+Rq33AVT0OJLj4q4hLdJiLQKJt27yiRRpSbwYYoBaZlQrtQF8AJAmL1sJvPI3W8Ag1nR0Suz/BwbPA6fopQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzgX913JzKENPLtWQAK/MNAc6K7ZRnBNVTZsG+lF7XMq17l+cZj Gk8O3zkoybI8BE3DID3jkfhmWnEvv+0wx+Qxtgc+0ZSJvXpHR4B79HrubRoyCvtWcg== X-Gm-Gg: AR+sD13Y9eTxB6kivgfg0mmzWIn3bZ+1HVhxIOe7+C+Garj7k8lQ5HPzgTjW70E/Z2e a0WhSCvaVKNY8X/Ng6TvKMkcVvS9WHe9QEW7NwZMtboSXo2Nq2ermCcOxlOa8RULYdrJafPSwdi CehF+zSahZ2AmrdQTYafz9q8KIntHjHk2Sr74jD6xtI31BICy6aCjqCtkmam5l7LmtctZdV8EOi kVf+jbJ3EryHE1haHjNqE/aB0GGpUcx4BgIneNprTBR+9UPICqf1kug4sFdWPfDh+N2KaVniO3D CJGMhjUuD9SGhjcUfWFOAFtkYO0Agdr+67EvrRlmCGGyR00U+Jv1FjC9gOaeqLz2qyjfFWz0uhV Kz0JlUCrWLdmWvQPlDm+SbtCnTS0Ppp+I25I02guuKAyBMxMLPkmcewgi8FpGrs8sqnmWw7lcdn 2GRVEXXxx53qj/EBx8IU3pjmKTLelfsQYeYmslRtfo/CsYonM= X-Received: by 2002:a17:902:ecd2:b0:2ca:bf8e:360b with SMTP id d9443c01a7336-2cf7b52947fmr768815ad.9.1784557495303; Mon, 20 Jul 2026 07:24:55 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cf34743105sm58050985ad.69.2026.07.20.07.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 07:24:54 -0700 (PDT) Date: Mon, 20 Jul 2026 14:24:49 +0000 From: Pranjal Shrivastava To: Christoph Hellwig Cc: Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org, Chuck Lever , Jeff Layton , linux-kernel@vger.kernel.org, Logan Gunthorpe , Jason Gunthorpe , linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org, Shivaji Kant Subject: Re: [PATCH v3 3/5] nfs: Introduce nfs_release_request_list helper Message-ID: References: <20260715143540.3597616-1-praan@google.com> <20260715143540.3597616-4-praan@google.com> <20260720091505.GC24298@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260720091505.GC24298@lst.de> On Mon, Jul 20, 2026 at 11:15:05AM +0200, Christoph Hellwig wrote: > On Wed, Jul 15, 2026 at 02:35:38PM +0000, Pranjal Shrivastava wrote: > > Introduce a centralized helper, nfs_release_request_list, to handle > > the bulk release of nfs_page requests from a list. > > > > This serves as a preparatory step for two upcoming improvements: > > > > 1. Pin-Aware Cleanup: As we migrate to iov_iter_extract_* API, > > requests will hold pins (GUP) instead of standard references. The > > helper ensures that the correct unpinning logic gets applied > > consistently across all requests in a list. > > > > 2. Folio Support: In subsequent patches where nfs_page structures > > will cover multi-page folios, this helper provides a clean > > infrastructure to unlock these larger units of I/O in bulk during > > completion, similat to the pattern in bio_release_pages. > > > > Additionally, refactor nfs_read_sync_pgio_error() to utilize this new > > helper. > > [...] > > +/* > > + * nfs_release_request_list - Release a list of NFS read/write requests > > + * @head: list of requests to release > > + * > > + * Removes each request from the list and drops it's refcount. > > + */ > > +void nfs_release_request_list(struct list_head *head) > > +{ > > + struct nfs_page *req; > > + > > + while (!list_empty(head)) { > > + req = nfs_list_entry(head->next); > > req could/should be local here. Or you switch to list_first_or_null, > which some folks prefer. > Ack. Made it local > > +extern void nfs_release_request(struct nfs_page *req); > > +extern void nfs_release_request_list(struct list_head *head); > > Please drop the superflous externs for new code. > Ack. Dropping the externs. Thanks, Praan