Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp254856pxt; Wed, 4 Aug 2021 10:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZQ6z7NDDD5MqXWUsOFosGAhvk4AdTUZt69EOMlRsY6cOqYJWJeH+R778Dohn1Vy+Z7xPu X-Received: by 2002:aa7:c857:: with SMTP id g23mr973011edt.100.1628097330736; Wed, 04 Aug 2021 10:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628097330; cv=none; d=google.com; s=arc-20160816; b=HdUUv8JuV9GozOsPqjM48F6znKKu1EXTo4ABmv+wqMqLUNFYE1HGFkjaxLEUg3XdN6 Xcvs2TlKSKrmM0wLkpHzykCFcJggic/oF0YIvfOCNwX7wTtkatzNpPA/JxhS0Hzw7NZg 4kGsFKKVBfQlJANzZ1k85vKnhyHLls5Ys6XwfC3x/ck0YrWvI6u5hhXrwGSV6+zluee4 sD36JJbAVfsSOFbA/eML6DLSxZPI0jJFUIAw6GsrI3GUiU5RG2QlAyEIROCU7TcrGE+Q yDFrHN9JajLhL/tzCjYwZXZcD/ReUUD1UUT+m03A6U50FpP2Udh4odohBjhmLW32plkW /GYw== 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=WIXr6iFNMcCaiUA+Z5JVlQf134eZgEHptHFpQyVcMnM=; b=a5Z4avoElNB1BdGjyorGqCslP+Z+b7PLhlDeYgEsOdt7ed+wc8cY6MKg20Q+EhFUKe tZEah1RYTn6dt0NEkVuGW3sr5phtIXTNdPRLnX89Ry+9Vf4ZGjjKKqBtuNUmv5NjzJql y2shOt1F6eeU/tQCNF01l7c7XGdXVAyL5BzxywTc3db3U6LRgfE775awz6qh8N2N6h1E zg42uuVht+Ki6qXVyH2YHwCCxU24qaiRfr9otf4MBsoHEWwvUrZyzhu9hMDxJ4bgk+li P1Jd2ji5Zk1nW1GIxvGDPi3e5D7bkHW3M3nYTL5NcmKL3Tj73tm7p7WeATQjodznuCr8 Wg/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cffQLeYX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx15si2505848ejc.725.2021.08.04.10.14.53; Wed, 04 Aug 2021 10:15:30 -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=@gmail.com header.s=20161025 header.b=cffQLeYX; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239793AbhHDROQ (ORCPT + 99 others); Wed, 4 Aug 2021 13:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239695AbhHDROQ (ORCPT ); Wed, 4 Aug 2021 13:14:16 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EAE6C0613D5 for ; Wed, 4 Aug 2021 10:14:02 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id z3so3697612plg.8 for ; Wed, 04 Aug 2021 10:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WIXr6iFNMcCaiUA+Z5JVlQf134eZgEHptHFpQyVcMnM=; b=cffQLeYXs0+24iGfCDYTk5BJactqXTmawIf0vxBw8gM2WO96BjE803r0i4jVNbe0sI YbslLfmEzQjSt8KaLmZeK3D6Y/NYSEtkqN7BvkGRbiK9o+1OaGyZzJhaZtYv7TqE8pIV rvnqaemVTNLlbOIcJA6rjeBIlOzgGzO58DGqzfhCeMlqb23D1IpsUTQInyt4uhvxyVP8 JKCaIx6jC79doK3lWb7Fb8SEbtsI9MNPbXE4ZoKuzmr3zi9x4bNK1biPgsZWJAUi75Ml XozpGfZydniQ61CQ5CAzcK0d+FFJDyV8NuHZtjY2uLGJYBl2afAg+FlA203+azMIEeqU Z/Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WIXr6iFNMcCaiUA+Z5JVlQf134eZgEHptHFpQyVcMnM=; b=Lk2fm0wRJrjBUCewc0wXvdnBQdurGNuUBDrCdrWjSZEH3EwIo943rOrKw0Z4+Eh8jY AghnCUTPeU+X0JmaQ+fbDi8TXXZet+mOwttz36q63KVY5+GSZXH1lBdgJs8Wzlryx7Qh X1T0xpT+hZrmxAjk2taw5ys9RN61WEsKldw9ilhvlPxtp7n2DUDGBmeGxLfbCHtEGgM2 bZqBvhopUB+A1oB8i+IBFMc4isAko2fgLWBTe0qM5TsvoYODKXZUqkvsNgs3UqIoiN0h E1RCa2ja1yJs/V1ECvZti+bsbnjmj0z8hGqLhyS8RifbM+hMmwjIei32jP07sN5rHVVg A98g== X-Gm-Message-State: AOAM532JUcXdZmZU5sQXz4734Q3leTrs+uXTuC0F8I0k8XsDGCHBxKJv u1HVlu2iGc6e+LSNXo45F+xNzva6mLU= X-Received: by 2002:aa7:8c56:0:b029:3c2:ca37:800 with SMTP id e22-20020aa78c560000b02903c2ca370800mr592014pfd.54.1628097241829; Wed, 04 Aug 2021 10:14:01 -0700 (PDT) Received: from nyarly.rlyeh.local ([179.233.244.167]) by smtp.gmail.com with ESMTPSA id b26sm3634489pfo.47.2021.08.04.10.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 10:14:01 -0700 (PDT) Date: Wed, 4 Aug 2021 14:13:55 -0300 From: Thiago Rafael Becker To: Trond Myklebust Cc: "steved@redhat.com" , "tbecker@redhat.com" , "linux-nfs@vger.kernel.org" Subject: Re: [RFC PATCH] mount.nfs: Add readahead option Message-ID: References: <20210803130717.2890565-1-trbecker@gmail.com> <6b627dc6ebc9ee1cbd37a62b48d08b1a031f0f08.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b627dc6ebc9ee1cbd37a62b48d08b1a031f0f08.camel@hammerspace.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Aug 03, 2021 at 03:15:54PM +0000, Trond Myklebust wrote: > There is already a method for doing this: you set up an appropriate > entry in /etc/udev/rules.d/. Adding a mount option, particularly one > that is NFS only and is handled in userspace rather than by the kernel > parser, just causes fragmentation and confusion. > > If you want to help users configure readahead, I'd suggest focussing on > a utility to help them set up the udev rule correctly. I prototyped a tool that runs on udev when a new bdi is added, you can see it at https://github.com/trbecker/readahead-utils. If this is good enough, it can have a user friendly tool that can be used to set the read ahead, check current values and manipulate the configuration file. I have a few limitations I see in this approach. This creates a different place to look into when debugging systems. Having the mount options would be more "in the face" of the engineer doing the debugging. This complicates configurations on clusters, and I find having the option better. I'm not sure how this would interact with containers, if this would create issues between the container and the host system. Advantages of this approach are the possibility to have defaults by fs type, device type, server (in case of a networked filesysem), wildcards. Some are good because they allow the user to improve memory usage (reducing the readahead for random access devices, increasing it for spinning devices and network devices, ...), some allow a set and forget configuration for directories that are used for hosting filesystems (automount, container directories, ...), which can't be achieved by a mount option. I agree with the fragmentation. Having this go into the kernel parser as a mount option seems to be a better way. Again, this is more granular and easier to find than having a separate application that runs on udev. I want opinions on these different approaches. Best, Thiago