Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp101013imm; Fri, 6 Jul 2018 14:55:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe2syo6jYjo0ALWlzWXR33LO/YGCjBoUPLnViX662owDaSY9N6TjxhMv98fTow2ZK3d/wXd X-Received: by 2002:a62:2c46:: with SMTP id s67-v6mr11873072pfs.153.1530914143160; Fri, 06 Jul 2018 14:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530914143; cv=none; d=google.com; s=arc-20160816; b=hxtmESMfE0cYvCPmJcMZiEQvZGYS6e5U/aPd4z6joyX7wf3CFjZsqNj7xB1M8YajyN Sj1WlSE6VotkipGx+r66oN1brqoFJNvmJBA/Ky+Tlar5zsAruckxcc0DdtRfCnx216O4 MEnzorRD8M21Vw+P61E+eAD77CyFYIataiHehAyp0lUxCatbLeXYAQmAa0hbBUfXzCVg IJYT2IukU+rdJviykQd07WRa7IRnrTuoKB1nfEKB7/TV+JUZFYrEssSeV+8k16H2JMaF +nLBcM5KXPyI1bg4WkR65jAmw6eNqE7brZ+aGr0tt/vRc+QGbZ4WvW8Y/ebJQyvQ6rQJ qn8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ZubZKwa42cdMZZc4gyk5NXOPI4XXCTQ81VX7+8UJ+Uc=; b=Lo0LpDXZ37bID0TGHOixQrhibW6WW4SNGt8gELWxN6xn5zsZCzsmEWz9e/EsDFlyCj hteXPH0J3BKCOOLXd+XD4ZpY7x05qXIs6YFEmB5O+H9kHO8htq5wCN/0wpinIFa3bGl0 buvkReGOB80/XS7nDsGqXiuvOLS0KUEGGan5ZoyQrV0QZaI/tc3hy/OxhNNj64uLnQeJ V0BpyU8zCJ/P3kWJtvRzKRRfMH/88dSiKJXQKN8g7iqxeMBlvMkL47f+qVU1tZW+Jj2R OnRjNsMIx54wsRjzNmuAD0TzVZ06gOvOJSmdTaaQbOgaf7tFJfaI7+OY07YfhF3MTgIt 8pRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dzvo2WWS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si8941273plh.387.2018.07.06.14.55.28; Fri, 06 Jul 2018 14:55:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dzvo2WWS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S932562AbeGFVyq (ORCPT + 99 others); Fri, 6 Jul 2018 17:54:46 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46649 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753631AbeGFVyl (ORCPT ); Fri, 6 Jul 2018 17:54:41 -0400 Received: by mail-pf0-f193.google.com with SMTP id l123-v6so9403462pfl.13; Fri, 06 Jul 2018 14:54:40 -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:user-agent; bh=ZubZKwa42cdMZZc4gyk5NXOPI4XXCTQ81VX7+8UJ+Uc=; b=dzvo2WWS5CWboTtc/G1ojw+V+csP8H5oV79uEL6ei/80FpcpHR7+19lMQb6Bf3jaFH 8unjQjrSDLygT3ihRr/DTbotH0EucuBfaWMqUaDcOL72NQ9ZLZqULp2Y1YzRrMTqXfLW Udh/SDInHirg48YdArpB/MfzzVOwxzzY2FrzpzxNx2XSjUNZfgBSBlK76pGCGTD51LYh EKcbaYxG9VnBQ5Zk0UqhW7wmohwsvnp6AnftmZuVeJy2S06Za7DjnxbT0HCYse05FPld bBYftFgczJhHONq9VcWkTYWMHUbPUwhQgaDEWh/7eSreKAK21uDUvWNBcwHdJbTGKUub ZztA== 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:user-agent; bh=ZubZKwa42cdMZZc4gyk5NXOPI4XXCTQ81VX7+8UJ+Uc=; b=p3Fq2ImgD8k6nPUbG2XvuYA2RgXu3sko737/MVEvNvBdAj3AtKutHqt2GYMn4AZ+LS L+hdPyzktowx6ttMpmu5DG5V83I/5NYiuV006M87fxmFcNFFNRPPdEqljv4pn8PEz8S4 OwrcacYq85AV6xd39Q+wCYFiYqojp5Rj48XX6VUe+QZDQoBhvbEPUJrwt/sGkWIexlGM awieQz8le4vXpQEPXjfPy/Unmj2FRAV1UJOAWAHeMsg1OyishpqKNLioGTU8jpPhWW6p ocniqsrqXEh38tFs9fnoFW3qZ5vi8YuoOjVhXRDVGFBr0Xv7kbYfnFatzJbEHtnNlyV1 YeEg== X-Gm-Message-State: APt69E3Wj7dvd/eZHmFIw6IK9xVzdMOHwryHJ38cSIU8xsqB2SQ6a/6T n1j9Tpml+kS+fDBv6PWc7qY= X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr10975197pgp.334.1530914080279; Fri, 06 Jul 2018 14:54:40 -0700 (PDT) Received: from gmail.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id d9-v6sm14214804pge.68.2018.07.06.14.54.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jul 2018 14:54:39 -0700 (PDT) Date: Fri, 6 Jul 2018 14:54:37 -0700 From: Eric Biggers To: Waiman Long Cc: Alexander Viro , Jonathan Corbet , "Luis R. Rodriguez" , Kees Cook , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, Linus Torvalds , Jan Kara , "Paul E. McKenney" , Andrew Morton , Ingo Molnar , Miklos Szeredi , Matthew Wilcox , Larry Woodman , James Bottomley , "Wangkai (Kevin C)" Subject: Re: [PATCH v6 7/7] fs/dcache: Allow deconfiguration of negative dentry code to reduce kernel size Message-ID: <20180706215437.GA109361@gmail.com> References: <1530905572-817-1-git-send-email-longman@redhat.com> <1530905572-817-8-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530905572-817-8-git-send-email-longman@redhat.com> User-Agent: Mutt/1.10+35 (c786a508) (2018-06-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 03:32:52PM -0400, Waiman Long wrote: > The tracking and limit of negative dentries in a filesystem is a useful > addition. However, for users who want to reduce the kernel size as much > as possible, this feature will probably be on the chopping block. To > suit those users, a default-y config option DCACHE_LIMIT_NEG_ENTRY is > added so that the negative dentry tracking and limiting code can be > configured out, if necessary. > > Signed-off-by: Waiman Long > --- > fs/Kconfig | 10 ++++++++++ > fs/dcache.c | 33 ++++++++++++++++++++++++++++++++- > include/linux/dcache.h | 2 ++ > kernel/sysctl.c | 2 ++ > 4 files changed, 46 insertions(+), 1 deletion(-) > > diff --git a/fs/Kconfig b/fs/Kconfig > index ac474a6..b521941 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -113,6 +113,16 @@ source "fs/autofs/Kconfig" > source "fs/fuse/Kconfig" > source "fs/overlayfs/Kconfig" > > +# > +# Track and limit the number of negative dentries allowed in the system. > +# > +config DCACHE_LIMIT_NEG_ENTRY > + bool "Track & limit negative dcache entries" > + default y > + help > + This option enables the tracking and limiting of the total > + number of negative dcache entries allowable in the filesystem. > + If there's going to be a config option for this, it should be documented properly. I.e., why would someone want to turn this on, or turn it off? What are the tradeoffs? If unsure, should the user say y or n? I think there are way too many config options that were meaningful to the person writing the code but aren't meaningful to people configuring the kernel. - Eric