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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBBB0C6FD1D for ; Mon, 20 Mar 2023 22:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbjCTWWy (ORCPT ); Mon, 20 Mar 2023 18:22:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbjCTWWl (ORCPT ); Mon, 20 Mar 2023 18:22:41 -0400 Received: from mail-io1-xd4a.google.com (mail-io1-xd4a.google.com [IPv6:2607:f8b0:4864:20::d4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C337B298FD for ; Mon, 20 Mar 2023 15:21:55 -0700 (PDT) Received: by mail-io1-xd4a.google.com with SMTP id p128-20020a6b8d86000000b007583ebb18fdso362990iod.19 for ; Mon, 20 Mar 2023 15:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679350862; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=50eFb9j8uCXjcCC6/NygorZQvmwLMi5m3ODD5mO18Vg=; b=DErBQxXn+lfh4XrCIkTHnvIlk/dRGuK1FDAXO0ngq0JTQJ4DpnD/b3I++BOx3R/1gk d2fnxzOtMs72+/4XNDHwQKpqpSEd8Vc/a9HIqqVUv5cFQp5lIUOHXqBURqfkeSVyRqhJ bfFlBWVAVRKUhXqk0pF0Ci+lxjREnGNUCJSPRvCF128lGlQvJmbIqzjiLMxpFFAiotTp BVSn7QNHraI0PQIVwjGAdZ/BDPsqxSG/Oj3hPgEB9JxC7665qpOUX4e2WNfIWHJJeHlC PivAqhGh36fdTSXXHxGQPRp/njVyLAerFfKJM3K2Ho9K4pyKimjTUlrP71TfP1V75k6F 3QrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679350862; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=50eFb9j8uCXjcCC6/NygorZQvmwLMi5m3ODD5mO18Vg=; b=IFrR4ALGww84VaaJ+CGG/fVWbw3yGg8WFPf8zgGVU1A2/F5CZ63GTV5YJDXmiBsmbq XQBpUm8CDvY8ianoCA4wo5zGRl/Xob+1uqwZnHGYLT2txfxcaNd+sqx0k2bhMUJduvpP f/QtcxW0phzsq1uucVAqrf65jYSlEUxnwzaqnJw6gpZWGtmttCe+4BOA/Pv1HLHTzolZ t/dGhNk6m2USbBuZoSZlVZt/WBmQdZcg1wdnPuHAzFvOXsAgOKWbKIJCKmDtt0XcRFd+ 5CPIeDLn74hDrENUj/p6Hxx2i3187f3/LuibgfBEjeFWkUv5XYkgiTQYXeouXQyqXqmW UgEA== X-Gm-Message-State: AO0yUKVxuvu4mrDc22ff3GdMmnluagRn+EPPu43mF08EPv98gdwKuB4O OzDVGisVO4Ti6aKdfRZJ9ZZDkQPVre0AnQ== X-Google-Smtp-Source: AK7set/iaDkBdwLyzyxVcYRhfRv6JRXzysyv8QtmczZDJGnd673jus4sIDC/HG5m8iYeU4jvrAyMt5NIcoPSlQ== X-Received: from talumbau.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:90d]) (user=talumbau job=sendgmr) by 2002:a05:6e02:962:b0:315:8e92:39ad with SMTP id q2-20020a056e02096200b003158e9239admr80802ilt.1.1679350862035; Mon, 20 Mar 2023 15:21:02 -0700 (PDT) Date: Mon, 20 Mar 2023 22:20:57 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog Message-ID: <20230320222057.1976956-1-talumbau@google.com> Subject: [PATCH v3] posix_fadvise.2: NOREUSE now supported. From: "T.J. Alumbaugh" To: Alejandro Colomar Cc: Andrew Morton , Yu Zhao , linux-man@vger.kernel.org, "T.J. Alumbaugh" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org POSIX_FADV_NOREUSE is now supported in Linux[1]. Updates text regarding former no op behavior. Indicates the readahead policy and treatment of file pages read with this flag. [1]: https://lore.kernel.org/linux-mm/20221230215252.2628425-2-yuzhao@google.com/ Signed-off-by: T.J. Alumbaugh --- man2/posix_fadvise.2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/man2/posix_fadvise.2 b/man2/posix_fadvise.2 index 57c65c810..9e562f74d 100644 --- a/man2/posix_fadvise.2 +++ b/man2/posix_fadvise.2 @@ -64,7 +64,10 @@ The specified data will be accessed only once. .IP Before Linux 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the same semantics as \fBPOSIX_FADV_WILLNEED\fP. -This was probably a bug; since Linux 2.6.18, this flag is a no-op. +This was probably a bug; from Linux 2.6.18 until Linux 6.2 this flag was +a no-op. From Linux 6.3 and beyond, \fBPOSIX_FADV_NOREUSE\fP signals +that the LRU algorithm can ignore access to mapped page cache marked +by this flag. This is useful, for example, while streaming large files. .TP .B POSIX_FADV_WILLNEED The specified data will be accessed in the near future. @@ -154,6 +157,7 @@ in POSIX.1-2001 TC1. Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely. +\fBPOSIX_FADV_NOREUSE\fP does not modify the readahead window size. These changes affect the entire file, not just the specified region (but other open file handles to the same file are unaffected). .PP -- 2.40.0.rc1.284.g88254d51c5-goog