Re: [PATCH 8/8] af_unix: charge buffers to kmemcg

2016-05-24 Thread Vladimir Davydov
[adding netdev to Cc] On Mon, May 23, 2016 at 01:20:29PM +0300, Vladimir Davydov wrote: > Unix sockets can consume a significant amount of system memory, hence > they should be accounted to kmemcg. > > Since unix socket buffers are always allocated from process context, > all we need to do to cha

Re: [PATCH 8/8] af_unix: charge buffers to kmemcg

2016-05-23 Thread David Miller
Networking changes should be CC:'d net...@vger.kernel.org

[PATCH 8/8] af_unix: charge buffers to kmemcg

2016-05-23 Thread Vladimir Davydov
Unix sockets can consume a significant amount of system memory, hence they should be accounted to kmemcg. Since unix socket buffers are always allocated from process context, all we need to do to charge them to kmemcg is set __GFP_ACCOUNT in sock->sk_allocation mask. Signed-off-by: Vladimir Davyd