From mboxrd@z Thu Jan 1 00:00:00 1970 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 386FCC369AB for ; Thu, 24 Apr 2025 16:51:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CBF76B00D1; Thu, 24 Apr 2025 12:51:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3540B6B00D2; Thu, 24 Apr 2025 12:51:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 17DA16B00D3; Thu, 24 Apr 2025 12:51:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id E66EE6B00D1 for ; Thu, 24 Apr 2025 12:51:14 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EAC2F1CFADD for ; Thu, 24 Apr 2025 16:51:15 +0000 (UTC) X-FDA: 83369527710.08.C53BF6C Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf16.hostedemail.com (Postfix) with ESMTP id 5A29B180013 for ; Thu, 24 Apr 2025 16:51:14 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=t7yETnR4; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of snitzer@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=snitzer@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1745513474; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=L0kksqhtPc0PqgCGnS0V0xDWd8x96IjYYEyT+fEE3h0=; b=4lF62S+t+Cd34S6l3sHz89Hcan4nFAxZgckBSE7ItQYO8h4gdLDIpUZbuOYWBO2WpiR7eD ZlnBAdUlOzn7/NDpgzVaujmmillqdgEFvFWXjIsOBJiSkgtFsoWrv2Yj4H20OpPuSH+cVb DVNy9GfQWuNcMtU3pED2nKWBHPSm20g= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1745513474; a=rsa-sha256; cv=none; b=AqBZOVlcrA+OdX4jO+Vqs2k94z1YjUj2alPNenHBLBdIBkCllhYL6bBqwmUznR15lsfs1V nUF3PiT7jzdSglc/i/g+ZFMcHx8lFS0+ePjILxKRU5ePa/cqPDIX2YCt76v1Fi7JJ+i6w4 KbozP48hmi5F7BudW3qR/hvWzOeEI6w= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=t7yETnR4; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of snitzer@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=snitzer@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A1A8861137; Thu, 24 Apr 2025 16:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25B12C4CEE3; Thu, 24 Apr 2025 16:51:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745513473; bh=O30a3FalLBME3kBJ1cSEVuQL9s7QShLEWwr9eGBk9y0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t7yETnR4wlf3sc5MnAFm9WBuY2XqtUAT+VUhj9x1LRWN4+0PvhSk0eRuNt8nrNd4+ q7Ofx48Yi4/IyPg/5JG3jwHCxVplyqYgiQ6t/KxDUDz92Z1jRama+jvFEOwoumITWG UaeByzPzQHFLUX9rIyAkC+f9cgb+u0hP56+1dwUPoYw7sJuq17KIPBQooCxstMAqM1 xHu4rABYUpIvUTyuE/3VPFocxx63TVpclETkuhV1ecoDNRRVqzTe90MReNULFMvIvo 9Mju2vZw07f9TCaXAc9hje+QFS13g0ao/OQmxS96ahILjE5j7pwmWqBkcZD7ARy3p5 Q5XZsoyy4Iy0Q== Date: Thu, 24 Apr 2025 12:51:12 -0400 From: Mike Snitzer To: Chuck Lever Cc: Matthew Wilcox , trondmy@kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH 0/3] Initial NFS client support for RWF_DONTCACHE Message-ID: References: <97033bd0-dcf9-4049-8e44-060b7e854952@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97033bd0-dcf9-4049-8e44-060b7e854952@oracle.com> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5A29B180013 X-Rspam-User: X-Stat-Signature: s8i6bdnp8cbwo9u4z77d5niwgc4u98wt X-HE-Tag: 1745513474-328917 X-HE-Meta: U2FsdGVkX1+jnISue29DHL0O8VamwMaNCVDmihXYWHFVt60GMkXliKCmsSTl/LqwnYQqdu540VwlTnb4EcLaCGiiCj2yx2L34Bv4ccLaR5m2mnNQnX9pp6xS+C4sq8f8pEVFlVtCJeYZtAuSpAJ8mYD50ExYHQ4g5hc5ECKg44Rxc0RRBumLtua45no1ZqaHKHKFs+MRNThgXHAiVD+YCKXDQTHfUxL9ZZJLXnsQjAiOMoFrCAOnCdrVaENmqHKHFJR+LMgGyRi7KXze+3qf/zuoO2VEjRslIIPclCJV/FQcvJVX2Pw7LHuB6teWG4MBJlxzmdUJ1GmeyOX+cXqliR3moX6iWFW3jMyQ1RaTIO+Qmg5ZzJDQFClViKGjbW8ey8n23Vh47cezFgT3ARSjbUeTatnFO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.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Apr 23, 2025 at 11:30:21AM -0400, Chuck Lever wrote: > On 4/23/25 11:22 AM, Matthew Wilcox wrote: > > On Wed, Apr 23, 2025 at 10:38:37AM -0400, Chuck Lever wrote: > >> On 4/23/25 12:25 AM, trondmy@kernel.org wrote: > >>> From: Trond Myklebust > >>> > >>> The following patch set attempts to add support for the RWF_DONTCACHE > >>> flag in preadv2() and pwritev2() on NFS filesystems. > >> > >> Hi Trond- > >> > >> "RFC" in the subject field noted. > >> > >> The cover letter does not explain why one would want this facility, nor > >> does it quantify the performance implications. > >> > >> I can understand not wanting to cache on an NFS server, but don't you > >> want to maintain a data cache as close to applications as possible? > > > > If you look at the original work for RWF_DONTCACHE, you'll see this is > > the application providing the hint that it's doing a streaming access. > > It's only applied to folios which are created as a result of this > > access, and other accesses to these folios while the folios are in use > > clear the flag. So it's kind of like O_DIRECT access, except that it > > does go through the page cache so there's none of this funky alignment > > requirement on the userspace buffers. > > OK, was wondering whether this behavior was opt-in; sounds like it is. > Thanks for setting me straight. Yes, its certainly opt-in (requires setting a flag for each use). Jens added support in fio relatively recently, see: https://git.kernel.dk/cgit/fio/commit/?id=43c67b9f3a8808274bc1e0a3b7b70c56bb8a007f Looking ahead relative to NFSD, as you know we've discussed exposing per-export config controls to enable use of DONTCACHE. Finer controls (e.g. only large sequential IO) would be more desirable but I'm not aware of a simple means to detect such workloads with NFSD. Could it be that we'd do well to carry through large folio support in NFSD and expose a configurable threshold that if met or exceeded then DONTCACHE used? What is the status of large folio support in NFSD? Is anyone actively working on it? Thanks, Mike