Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935153AbbKTJsl (ORCPT ); Fri, 20 Nov 2015 04:48:41 -0500 Received: from mx2.parallels.com ([199.115.105.18]:48847 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933885AbbKTJsi (ORCPT ); Fri, 20 Nov 2015 04:48:38 -0500 Date: Fri, 20 Nov 2015 12:48:23 +0300 From: Vladimir Davydov To: Johannes Weiner CC: David Miller , Andrew Morton , Tejun Heo , Michal Hocko , , , , , Subject: Re: [PATCH 06/14] net: tcp_memcontrol: remove dead per-memcg count of allocated sockets Message-ID: <20151120094823.GY31308@esperanza> References: <1447371693-25143-1-git-send-email-hannes@cmpxchg.org> <1447371693-25143-7-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1447371693-25143-7-git-send-email-hannes@cmpxchg.org> X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To US-EXCH2.sw.swsoft.com (10.255.249.46) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 984 Lines: 22 On Thu, Nov 12, 2015 at 06:41:25PM -0500, Johannes Weiner wrote: > The number of allocated sockets is used for calculations in the soft > limit phase, where packets are accepted but the socket is under memory > pressure. Since there is no soft limit phase in tcp_memcontrol, and > memory pressure is only entered when packets are already dropped, this > is actually dead code. Remove it. Actually, we can get into the soft limit phase due to the global limit (tcp_memory_pressure is set), but then using per-memcg sockets_allocated counter is just wrong. > > As this is the last user of parent_cg_proto(), remove that too. > > Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/