From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Gushchin Subject: Re: [PATCH net] net: memcontrol: charge allocated memory after mem_cgroup_sk_alloc() Date: Thu, 1 Feb 2018 23:42:33 +0000 Message-ID: <20180201234226.GA14400@castle> References: <20180125001911.15597-1-guro@fb.com> <20180125.120302.1117695034222616751.davem@davemloft.net> <20180131215401.GA8956@castle> <20180201.101655.1316424669256047119.davem@davemloft.net> <20180201202158.GA11477@castle.DHCP.thefacebook.com> <20180201225542.GA13072@castle> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "David S. Miller" , netdev , LKML , kernel-team , Johannes Weiner , Tejun Heo To: Eric Dumazet Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, Feb 01, 2018 at 03:27:14PM -0800, Eric Dumazet wrote: > Well, this memcg stuff is so confusing. > > My recollection is that we had : > > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=d979a39d7242e0601bf9b60e89628fb8ac577179 > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=75cb070960ade40fba5de32138390f3c85c90941 > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=c0576e3975084d4699b7bfef578613fb8e1144f6 > > And commit a590b90d472f2c176c140576ee3ab44df7f67839 as well > > Honestly bug was closed months ago for us, based on stack traces on the wild. > > No C repro or whatever, but reproducing it would be a matter of > having a TCP listener constantly doing a > socket()/setsockopt(REUSEADDR)/bind()/listen()/close() in a loop, > while connections are attempted to the listening port. Oh, I see... Then I think that we should return memcg_sk_alloc() back to the bh context, where cgroup_sk_alloc() is, and repeat all the tricks to avoid copying dead cgroups/memcg pointers. Do you agree? I'll try to master a patch and reproduce the issue. Thanks!