[lkml]   [2018]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 3/3] fs: fsnotify: account fsnotify metadata to kmemcg
On Wed 14-02-18 10:08:31, Amir Goldstein wrote:
> On Wed, Feb 14, 2018 at 4:56 AM, Shakeel Butt <> wrote:
> > This is RFC patch and the discussion on the API is still happening at
> > the following link but I am sending the early draft for feedback.
> > [link]
> >
> > A lot of memory can be consumed by the events generated for the huge or
> > unlimited queues if there is either no or slow listener. This can cause
> > system level memory pressure or OOMs. So, it's better to account the
> > fsnotify kmem caches to the memcg of the listener.
> >
> > There are seven fsnotify kmem caches and among them allocations from
> > dnotify_struct_cache, dnotify_mark_cache, fanotify_mark_cache and
> > inotify_inode_mark_cachep happens in the context of syscall from the
> fsnotify_mark_connector_cachep as well.

Yes, but for the purposes of memcg accounting, I'd just ignore this cache
and not account fsnotify_mark_connector objects at all. They are small
compared to the notification mark or events and it is unclear whom to
account connector to since it is shared by all events attached to the

Jan Kara <>

 \ /
  Last update: 2018-02-19 15:34    [W:0.069 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site