Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp700413pxp; Fri, 11 Mar 2022 12:45:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyN3FoQ9AeP/1+Zb4f+44NlHL5VU16L9AarA7zgzz/asn1DqrtI26/phyCeTmQaMkA1q5T3 X-Received: by 2002:aa7:8882:0:b0:4e1:4531:e3c8 with SMTP id z2-20020aa78882000000b004e14531e3c8mr12099083pfe.76.1647031506614; Fri, 11 Mar 2022 12:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647031506; cv=none; d=google.com; s=arc-20160816; b=WLMlOdTOx2k2aM0iQzM19p3XLT9d8LtDd3x/TCjNRwhMPIQpGQN2uc+oBHsFGsteaw t0sdR9Nisysh/kQ6247ezKSwTnuC4XcR++XZg+6DTffr3Yb/dVbU8lIKInBZsBY60S6X /ooUnM8lT0vt3oH7t2wjjHJJKDcjjxG9RF8Vych+y8wSxWanWGGgcdEGGWd1NuhUWiZP cF5Zn/nDsvTSlJK5sG3LpGd4/33tuXiQFQsb3XPwUcTiubHxUAMzfBm0H6xjBmX1LN8V EJ9g3aHn45nktWGZcUf9x33RZ4XUdNWz3pyw1Rxk+BrHYVWNl3WQr/ISAhW2EjrT9r2W PgBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fBJs7SaLaOuVPjkP5j1dbtF7vVu9lC6LDsocaKc5yFQ=; b=qTRv3aKUJWMClZkBfGeNgHLC4q3JhSkboThBluIIPO5lHcJ4qsXELC0o3BNVp5UE9L 1lEC2gg7Qibh0eVMRG2nQoEcUyW6ABZMx4mNBYFlI3b5cbw6HXOOKSOmQNPc/iN/tj21 5S9D/neFPCnA9qtqMHVBv8H445HNKhYTUQBaHfNvSLGbICs55aSsYPRKGJsU47H9AV2F V2sjafcMT4vlMQFOsIYRIvNa76ILqaXAIG5503Zu4/pl18DM2r9OXZHpF3vlEOHSDvRj +otcXV1/fGH91wbZjFa/dRmDrSY1JTaQNNYDFPgmJMsL+OyXOf+su6bc9IYo2CrH2znU vwhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f+zt9RBT; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n14-20020a17090a394e00b001bf74f9258bsi8868657pjf.156.2022.03.11.12.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 12:45:06 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f+zt9RBT; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8CAE61DF848; Fri, 11 Mar 2022 12:41:31 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351073AbiCKTIs (ORCPT + 99 others); Fri, 11 Mar 2022 14:08:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351080AbiCKTIq (ORCPT ); Fri, 11 Mar 2022 14:08:46 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF01F4ECCB for ; Fri, 11 Mar 2022 11:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647025660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fBJs7SaLaOuVPjkP5j1dbtF7vVu9lC6LDsocaKc5yFQ=; b=f+zt9RBTLHQjBr1sB1XbR6xIVMmT7WlP/9AY097yu1HpXo3G26sFSBkbaKsBLE1nZ7hF6Q g3qh//IJDVK8aS9lL2Sd+dYo+Wsw9DvFU635qGsRtfUVZDr+eJ4NxXyxRplhseTJDXIv1x hXpkw3WXswMJFNfacUv1JjVQXyb8g9I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-244-yeO4DIdzNpaHEMFS_Wkb6Q-1; Fri, 11 Mar 2022 14:07:37 -0500 X-MC-Unique: yeO4DIdzNpaHEMFS_Wkb6Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A3C151854E27; Fri, 11 Mar 2022 19:07:36 +0000 (UTC) Received: from nyarly.rlyeh.local (ovpn-116-72.gru2.redhat.com [10.97.116.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80DF160BF4; Fri, 11 Mar 2022 19:07:10 +0000 (UTC) From: Thiago Becker To: linux-nfs@vger.kernel.org Cc: steved@redhat.com, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, kolga@netapp.com, Thiago Becker Subject: [RFC v2 PATCH 7/7] readahead: documentation Date: Fri, 11 Mar 2022 16:06:17 -0300 Message-Id: <20220311190617.3294919-8-tbecker@redhat.com> In-Reply-To: <20220311190617.3294919-1-tbecker@redhat.com> References: <20220311190617.3294919-1-tbecker@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1946283 Signed-off-by: Thiago Becker --- tools/nfs-readahead-udev/Makefile.am | 2 + .../nfs-readahead-udev/nfs-readahead-udev.man | 47 +++++++++++++++++++ tools/nfs-readahead-udev/readahead.conf | 14 ++++++ 3 files changed, 63 insertions(+) create mode 100644 tools/nfs-readahead-udev/nfs-readahead-udev.man diff --git a/tools/nfs-readahead-udev/Makefile.am b/tools/nfs-readahead-udev/Makefile.am index 010350aa..eaa9b90e 100644 --- a/tools/nfs-readahead-udev/Makefile.am +++ b/tools/nfs-readahead-udev/Makefile.am @@ -10,6 +10,8 @@ udev_rules_DATA = 99-nfs_bdi.rules ra_confdir = $(sysconfdir) ra_conf_DATA = readahead.conf +man5_MANS = nfs-readahead-udev.man + 99-nfs_bdi.rules: 99-nfs_bdi.rules.in $(builddefs) $(SED) "s|_libexecdir_|@libexecdir@|g" 99-nfs_bdi.rules.in > $@ diff --git a/tools/nfs-readahead-udev/nfs-readahead-udev.man b/tools/nfs-readahead-udev/nfs-readahead-udev.man new file mode 100644 index 00000000..2477d5b3 --- /dev/null +++ b/tools/nfs-readahead-udev/nfs-readahead-udev.man @@ -0,0 +1,47 @@ +.\" Manpage for nfs-readahead-udev. +.nh +.ad l +.TH man 5 "08 Mar 2022" "1.0" "nfs-readahead-udev man page" +.SH NAME + +nfs-readahead-udev \- Find the readahead for a given NFS mount + +.SH SYNOPSIS + +nfs-readahead-udev + +.SH DESCRIPTION + +\fInfs-readahead-udev\fR is a tool intended to be used with udev to set the \fIread_ahead_kb\fR parameter of NFS mounts, according to the configuration file (see \fICONFIGURATION\fR). \fIdevice\fR is the device number for the NFS backing device as provided by the kernel. + +.SH CONFIGURATION + +The configuration file (\fI/etc/readahead.conf\fR) contains the readahead configuration, and is formatted as follows. + + ::= | + + ::= + + ::= | + + ::= default | + + ::= mountpoint = | fstype = | readahead = + +\fImountpoint\fR is the path in the system where the file system is mounted. + +\fIreadahead\fR is an integer to readahead. + +\fIfstype\fR is either \fInfs\fR or \fInfs4\fR. + +.SH SEE ALSO + +mount.nfs(8), nfs(5), udev(7), bcc-readahead(8) + +.SH BUGS + +No known bugs. + +.SH AUTHOR + +Thiago Rafael Becker diff --git a/tools/nfs-readahead-udev/readahead.conf b/tools/nfs-readahead-udev/readahead.conf index 988b30c7..bce830f1 100644 --- a/tools/nfs-readahead-udev/readahead.conf +++ b/tools/nfs-readahead-udev/readahead.conf @@ -1 +1,15 @@ +# nfs-readahead-udev configuration file. +# +# This file configures the readahead for nfs mounts when those are anounced by the kernel. +# The file is composed on lines that can contain either the default configuration (applied to +# any nfs mount that does not match any of the other lines) or a combination of +# mountpoint= where mountpoint is the mount point for the file system +# fstype= specifies that this configuration should only apply to a specific nfs +# version. +# Every line must contain a readahead option, with the expected readahead value. default readahead=128 + +# mountpoint=/mnt readahead=4194304 +# fstype=nfs readahead=4194304 +# fstype=nfs4 readahead=4194304 +# mountpoint=/mnt fstype=nfs4 readahead=4194304 -- 2.35.1