Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1988615imm; Thu, 12 Jul 2018 11:07:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcpBkCCOE66s5Mqtzb9Xmy2dclRFT83DT8VHJ3Pypifxa32jk0+KuTtFUg0laPTWu83eD0q X-Received: by 2002:a63:4e5f:: with SMTP id o31-v6mr3123404pgl.256.1531418862913; Thu, 12 Jul 2018 11:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531418862; cv=none; d=google.com; s=arc-20160816; b=EeWJusX2CjLKi+3rTVsE+EESu+QJyq/RTWjTxRmV7IdfvbMrTSyCfGkhJI2IzRoi8P ZX3SBk1zDqo2V0y2HlaOkuRFEvwsWPoYfWr1oDdWttXT9AZ1sP2q7k3GZjFRYbme+9Ph lbh0Kx7WrnAYKFWwxMv8YIzPMP80S4c4MKnp2MWEcPww6EMhALLrrZF4Lcn06KaTy/ax 3bNeGGolb/DYmoor3Yc6yAourR1I0+3UktArffef/xXOUIl/RttXH0pQ88lJKzctOPEB PYJ6IHeF5ros/Dnqb8Va+1BOJfTVlpgb2pSfVS0vTWOodhgjORI0YkuOI19/zzq2zx9O Mshw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=gH/7xbbvaNGX9vSnYeWTYXoV+8anNYt8k/9JV13LWrA=; b=QDXiBL7IDlECJVSOjiYO+WFmU9WGtm5q9lvu49DG3mHMeFYszY4KcekPAGOX5sOmbB 8S9X65FtdEg8nHnUivzeSaw91ssiu7ir3ZaTji6OFGv1o8aA8wH1/EKy7XudzS+TrCqr EAZOwcoo4K6CSS5lO79QxviuPBPQTiJFcp9vaTRS+iKEgmM2N6bScPlxuq+W2XB4JLPA 6kbuyIGwaJigiIqGW9hdIWwB4OvLhyE2mDmCr/9K1rIBops/daoZown/Ws5a2yaVbT+o vuMJ4vJyyGwJk3Lwp8A8wjVJ38OjPB83TX6iQQaZc9pgSHIJKyw+7jNO4t8qiJfm/Jwm vOiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=aP3OnuFx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5-v6si23983407pfd.112.2018.07.12.11.07.28; Thu, 12 Jul 2018 11:07:42 -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=@linux-foundation.org header.s=google header.b=aP3OnuFx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732218AbeGLSRA (ORCPT + 99 others); Thu, 12 Jul 2018 14:17:00 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:54842 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732208AbeGLSQ7 (ORCPT ); Thu, 12 Jul 2018 14:16:59 -0400 Received: by mail-it0-f68.google.com with SMTP id s7-v6so8063801itb.4; Thu, 12 Jul 2018 11:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gH/7xbbvaNGX9vSnYeWTYXoV+8anNYt8k/9JV13LWrA=; b=aP3OnuFxtS8gQffe2pC3eqiZ7z0eItch81qDVpZjg9/UPfW9K2D3O/sfV0ezG0v1oW udfMJQfxoVRcASmTyJSkk0Eq5kamfClANPjGXyxnlvMpECwZuT1H9FmkrJhvRgc1Wxuj Qc9lnyN7u3B6T/pZ/pg/fLlO41M63sDiZabW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gH/7xbbvaNGX9vSnYeWTYXoV+8anNYt8k/9JV13LWrA=; b=pilxRdtSiFbU+2o25PmRlaqOOzJsf27Sl4dEPnRgCjvO9k4N5aPHZEfx59sg2bpoBv TWZoyIfnLm4hB4OhAew/9NciUKDLN1YI9kugJz3oXIKN/iaQdhwgtGm9YAXOcuqKiRe3 g0rWWm+oeaXIHy0VSAUYueCwu13R2D2SMIny73GeGALYVdY1QIMtKIlGLZYzijhvJX5J c3eLXpFX0dQXUd/GgoYMdwQmouPmQdpxbC7Bo+WdO6YYqsXGCG7+9WOaB44nQhgAfKUN OENxSmfdi2+8p52Z57qV0RQRYoagqZ8uH6Ss+vi7ntLNB5N9a6xWw0HEkTm/rINW6o7f V1dA== X-Gm-Message-State: AOUpUlGAZ/uzPeEAAadHs0Sp+MtWOytU5FcOdL3tXCOt4L4C4P8AYB8c 38enULhEAT9YoCMD0dfODAzp59LwIrxVKZXNxXU= X-Received: by 2002:a24:5002:: with SMTP id m2-v6mr2172832itb.16.1531418779203; Thu, 12 Jul 2018 11:06:19 -0700 (PDT) MIME-Version: 1.0 References: <62275711-e01d-7dbe-06f1-bf094b618195@redhat.com> <20180710142740.GQ14284@dhcp22.suse.cz> <20180711102139.GG20050@dhcp22.suse.cz> <9f24c043-1fca-ee86-d609-873a7a8f7a64@redhat.com> <1531330947.3260.13.camel@HansenPartnership.com> <18c5cbfe-403b-bb2b-1d11-19d324ec6234@redhat.com> <1531336913.3260.18.camel@HansenPartnership.com> <4d49a270-23c9-529f-f544-65508b6b53cc@redhat.com> <1531411494.18255.6.camel@HansenPartnership.com> <20180712164932.GA3475@bombadil.infradead.org> <1531416080.18255.8.camel@HansenPartnership.com> In-Reply-To: <1531416080.18255.8.camel@HansenPartnership.com> From: Linus Torvalds Date: Thu, 12 Jul 2018 11:06:08 -0700 Message-ID: Subject: Re: [PATCH v6 0/7] fs/dcache: Track & limit # of negative dentries To: James Bottomley Cc: Matthew Wilcox , Waiman Long , Michal Hocko , Al Viro , Jonathan Corbet , "Luis R. Rodriguez" , Kees Cook , Linux Kernel Mailing List , linux-fsdevel , linux-mm , "open list:DOCUMENTATION" , Jan Kara , Paul McKenney , Andrew Morton , Ingo Molnar , Miklos Szeredi , Larry Woodman , "Wangkai (Kevin,C)" Content-Type: multipart/mixed; boundary="00000000000056798e0570d138d2" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000056798e0570d138d2 Content-Type: text/plain; charset="UTF-8" On Thu, Jul 12, 2018 at 10:21 AM James Bottomley wrote: > > On Thu, 2018-07-12 at 09:49 -0700, Matthew Wilcox wrote: > > > > I don't know that it does work. Or that it works well. > > I'm not claiming the general heuristics are perfect (in fact I know we > still have a lot of problems with dirty reclaim and writeback). I think this whole "this is about running out of memory" approach is wrong. We *should* handle that well. Or well enough in practice, at least. Do we? Maybe not. Should the dcache be the one area to be policed and worked around? Probably not. But there may be other reasons to just limit negative dentries. What does the attached program do to people? It's written to be intentionally annoying to the dcache. Linus --00000000000056798e0570d138d2 Content-Type: text/x-csrc; charset="US-ASCII"; name="t.c" Content-Disposition: attachment; filename="t.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jjiv6g8e0 I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHVuaXN0ZC5o PgojaW5jbHVkZSA8ZmNudGwuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKc3RhdGljIHZvaWQgZGll KGNvbnN0IGNoYXIgKm1zZykKewoJZnB1dHMobXNnLCBzdGRlcnIpOwoJZXhpdCgxKTsKfQoKLyoK ICogVXNlIGEgImxvbmdpc2giIGZpbGVuYW1lIHRvIG1ha2UgbW9yZSB0cm91YmxlIGZvciB0aGUg ZGNhY2hlLgogKgogKiBUaGUgaW5saW5lIGxlbmd0aCBpcyAzMi00MCBieXRlcyBkZXBlbmRpbmcg b24ga2VybmVsIGNvbmZpZywKICogc28gbWFrZSBpdCBsYXJnZXIgdGhhbiB0aGF0LgogKi8KaW50 IG1haW4odm9pZCkKewoJaW50IGk7CgljaGFyIGJ1ZmZlcls2NF07CgoJbWVtc2V0KGJ1ZmZlciwg J2EnLCBzaXplb2YoYnVmZmVyKSk7CglidWZmZXJbNjNdID0gMDsKCglmb3IgKGkgPSAwOyBpIDwg MTAwMDAwMDAwOyBpKyspIHsKCQlzbnByaW50ZihidWZmZXIrNDAsIHNpemVvZihidWZmZXIpLTQw LCAiLSUwOGQiLCBpKTsKCQlpZiAob3BlbihidWZmZXIsIE9fUkRPTkxZKSA+PSAwKQoJCQlkaWUo IllvdSdyZSBtaXNzaW5nIHRoZSBwb2ludFxuIik7Cgl9CglyZXR1cm4gMDsKfQo= --00000000000056798e0570d138d2--