From: Dave Chinner <david@fromorbit.com>
To: Waiman Long <longman@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Jan Kara <jack@suse.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
Miklos Szeredi <mszeredi@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Larry Woodman <lwoodman@redhat.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
"Wangkai (Kevin C)" <wangkai86@huawei.com>
Subject: Re: [PATCH v4 0/6] fs/dcache: Limit # of negative dentries
Date: Thu, 12 Oct 2017 07:56:49 +1100 [thread overview]
Message-ID: <20171011205649.GL15067@dastard> (raw)
In-Reply-To: <41d8db7e-4538-aaaf-6d65-574b5c0ffd7a@redhat.com>
On Wed, Oct 11, 2017 at 04:47:05PM -0400, Waiman Long wrote:
> On 10/10/2017 06:54 PM, Andrew Morton wrote:
> > On Mon, 18 Sep 2017 14:20:28 -0400 Waiman Long <longman@redhat.com> wrote:
> >
> >> A rogue application can potentially create a large number of negative
> >> dentries in the system consuming most of the memory available even if
> >> memory controller is enabled to limit memory usage. This can impact
> >> performance of other applications running on the system.
> > It does seem that under these circumstances it is pretty silly of us to
> > reclaim useful things in order to instantiate zillions of -ve dentries.
>
> I am talking about a misbehaving program due to bug or an intentional
> rogue program.
>
> >
> > Dentries are subject to kmemcg handling. Does this not help avoid
> > "impacting performance of other applications"?
>
> AFAIK, the dentry kmem_cache isn't memcg aware.
The dentry cache is most definitely is memcg aware. It (and teh
inode cache) were the primary targets for the memcg slab reclaim
infrastructure.
#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
# define SLAB_ACCOUNT 0x04000000UL /* Account to memcg */
#else
# define SLAB_ACCOUNT 0x00000000UL
#endif
dcache_init():
dentry_cache = KMEM_CACHE(dentry,
SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD|SLAB_ACCOUNT);
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-10-11 20:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 18:20 [PATCH v4 0/6] fs/dcache: Limit # of negative dentries Waiman Long
2017-09-18 18:20 ` [PATCH v4 1/6] fs/dcache: Relocate dentry_kill() after lock_parent() Waiman Long
2017-09-18 18:20 ` [PATCH v4 2/6] fs/dcache: Track & report number of negative dentries Waiman Long
2017-09-18 18:20 ` [PATCH v4 3/6] fs/dcache: Limit numbers " Waiman Long
2017-09-18 18:20 ` [PATCH v4 4/6] fs/dcache: Enable automatic pruning " Waiman Long
2017-09-18 18:20 ` [PATCH v4 5/6] fs/dcache: Track count of negative dentries forcibly killed Waiman Long
2017-09-18 18:20 ` [PATCH v4 6/6] fs/dcache: Autotuning of negative dentry limit Waiman Long
2017-10-05 15:41 ` [PATCH v4 0/6] fs/dcache: Limit # of negative dentries Waiman Long
2017-10-10 22:54 ` Andrew Morton
2017-10-11 20:47 ` Waiman Long
2017-10-11 20:56 ` Dave Chinner [this message]
2017-10-11 21:08 ` Waiman Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171011205649.GL15067@dastard \
--to=david@fromorbit.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=lwoodman@redhat.com \
--cc=mingo@kernel.org \
--cc=mszeredi@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wangkai86@huawei.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).