Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2103500imm; Mon, 16 Jul 2018 02:10:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdmr9tTLPpJzagqpNBRDI910SOB9CmXJeNHbNeJ0gSbQ7SXnjVUqLBFxaJyJaSZznsFk+Ez X-Received: by 2002:a63:5421:: with SMTP id i33-v6mr15042033pgb.417.1531732202643; Mon, 16 Jul 2018 02:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531732202; cv=none; d=google.com; s=arc-20160816; b=RYHbrkXm9Ho4NYzoMKkeEdTEsitYU+T2qcd0Ujw1cdKUb64/hupDrrD5D4QzQlYwrt Oy/oD5D8u5yvccktTTcG04hyjXK1K2xxH1IY5saFyp4RYnlsQt8La2zSIMQ7JX9TfRYH i8VLI9plzLQTQsMQKgOBLMnCn4G2PnRLNZIhZtWsNLugLPwEZ+Vh5qQeFtTJLGGWsvR5 Skl9c77tqrz1InsEdiuetfTBAkZwzsIQOSdowjhy+9eEXTyDsuSptkJovVv1ag9diefJ jw87eiE0iUzdqWYkRMV3amx9+ED6fzhHF7thgAt9cYykD0WJOVKZznkGW/LZhCaqz2/1 l24Q== 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:arc-authentication-results; bh=URZm6PjBTdF1dseHzJWzoVw+RG9xAYAv15BVtEgYu0I=; b=fzD1NIXNQXKI9clvj2z2ZO+Xit91rIXSa5wPDeMpKSeTfNAZExpWRNQ8NuUZLbHbpL XyUJa2i0feum6+45Kss6ZVyVkchAqfNIH76JAZRygz4fL5aD+eWxSoKwT2SrLmEE88bx JWnmuu9f7h7YBO7nbUcpMknb2dtv6JxErsSyV0W4VnlTjlrBA/0uuVsyxUcvkeLyisYj b0K+RR396zHHZJa1JRihd5j+XShzzIEj8MA5ea1p5CoWhRE6vXfr3WER7fLhWB3CwuQD EaOxwKyQ7wwSywaqMq39JKgIjPr3u1JIXZ/oH5LxSBpG79D8UuNTvIMrQn3VvzhLufhB X81g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q74-v6si30546467pfa.272.2018.07.16.02.09.47; Mon, 16 Jul 2018 02:10:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730043AbeGPJfd (ORCPT + 99 others); Mon, 16 Jul 2018 05:35:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:59092 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727182AbeGPJfc (ORCPT ); Mon, 16 Jul 2018 05:35:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B1394AD36; Mon, 16 Jul 2018 09:09:04 +0000 (UTC) Date: Mon, 16 Jul 2018 11:09:01 +0200 From: Michal Hocko To: Dave Chinner Cc: James Bottomley , Linus Torvalds , Matthew Wilcox , Waiman Long , 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)" Subject: Re: [PATCH v6 0/7] fs/dcache: Track & limit # of negative dentries Message-ID: <20180716090901.GG17280@dhcp22.suse.cz> References: <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> <1531425435.18255.17.camel@HansenPartnership.com> <20180713003614.GW2234@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180713003614.GW2234@dastard> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 13-07-18 10:36:14, Dave Chinner wrote: [...] > By limiting the number of negative dentries in this case, internal > slab fragmentation is reduced such that reclaim cost never gets out > of control. While it appears to "fix" the symptoms, it doesn't > address the underlying problem. It is a partial solution at best but > at worst it's another opaque knob that nobody knows how or when to > tune. Would it help to put all the negative dentries into its own slab cache? > Very few microbenchmarks expose this internal slab fragmentation > problem because they either don't run long enough, don't create > memory pressure, or don't have access patterns that mix long and > short term slab objects together in a way that causes slab > fragmentation. Run some cold cache directory traversals (git > status?) at the same time you are creating negative dentries so you > create pinned partial pages in the slab cache and see how the > behaviour changes.... Agreed! Slab fragmentation is a real problem we are seeing for quite some time. We should try to address it rather than paper over it with weird knobs. -- Michal Hocko SUSE Labs