Re: [PATCH] epoll: account epitem and eppoll_entry to kmemcg

2017-10-06 Thread Michal Hocko
On Thu 05-10-17 10:21:18, Michal Hocko wrote: > On Wed 04-10-17 12:33:14, Shakeel Butt wrote: > > > > > > I am not objecting to the patch I would just like to understand the > > > runaway case. ep_insert seems to limit the maximum number of watches to > > > max_user_watches which should be ~4% of l

Re: [PATCH] epoll: account epitem and eppoll_entry to kmemcg

2017-10-05 Thread Michal Hocko
On Wed 04-10-17 12:33:14, Shakeel Butt wrote: > > > > I am not objecting to the patch I would just like to understand the > > runaway case. ep_insert seems to limit the maximum number of watches to > > max_user_watches which should be ~4% of lowmem if I am following the > > code properly. pwq_cache

Re: [PATCH] epoll: account epitem and eppoll_entry to kmemcg

2017-10-04 Thread Shakeel Butt
> > I am not objecting to the patch I would just like to understand the > runaway case. ep_insert seems to limit the maximum number of watches to > max_user_watches which should be ~4% of lowmem if I am following the > code properly. pwq_cache should be bound by the number of watches as > well, or

Re: [PATCH] epoll: account epitem and eppoll_entry to kmemcg

2017-10-04 Thread Michal Hocko
On Mon 02-10-17 19:15:19, Shakeel Butt wrote: > The user space application can directly trigger the allocations > from eventpoll_epi and eventpoll_pwq slabs. A buggy or malicious > application can consume a significant amount of system memory by > triggering such allocations. Indeed we have seen in

[PATCH] epoll: account epitem and eppoll_entry to kmemcg

2017-10-02 Thread Shakeel Butt
The user space application can directly trigger the allocations from eventpoll_epi and eventpoll_pwq slabs. A buggy or malicious application can consume a significant amount of system memory by triggering such allocations. Indeed we have seen in production where a buggy application was leaking the