Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249AbbGTLtS (ORCPT ); Mon, 20 Jul 2015 07:49:18 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:34188 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbbGTLtR (ORCPT ); Mon, 20 Jul 2015 07:49:17 -0400 Date: Mon, 20 Jul 2015 13:49:13 +0200 From: Michal Hocko To: Andrew Morton Cc: Tejun Heo , Johannes Weiner , Vladimir Davydov , linux-mm@kvack.org, LKML Subject: Re: [PATCH 1/5] memcg: export struct mem_cgroup Message-ID: <20150720114913.GG1211@dhcp22.suse.cz> References: <1436958885-18754-1-git-send-email-mhocko@kernel.org> <1436958885-18754-2-git-send-email-mhocko@kernel.org> <20150715135711.1778a8c08f2ea9560a7c1f6f@linux-foundation.org> <20150716071948.GC3077@dhcp22.suse.cz> <20150716143433.e43554a19b1c89a8524020cb@linux-foundation.org> <20150716225639.GA11131@cmpxchg.org> <20150716160358.de3404c44ba29dc132032bbc@linux-foundation.org> <20150717122819.GA14895@cmpxchg.org> <20150717151827.GB15934@mtj.duckdns.org> <20150717131900.5b0b5d91597d207c474be7a5@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717131900.5b0b5d91597d207c474be7a5@linux-foundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 37 On Fri 17-07-15 13:19:00, Andrew Morton wrote: > On Fri, 17 Jul 2015 11:18:27 -0400 Tejun Heo wrote: > > > Maybe there are details to be improved but I think > > it's about time mem_cgroup definition gets published. > > grumble. I am open to other cleanups but keeping mem_cgroup private sounds like we will face more issues long term. > enum mem_cgroup_events_target can remain private to memcontrol.c. It's > only used by mem_cgroup_event_ratelimit() and that function is static. Except it is needed by mem_cgroup_stat_cpu. More below... > Why were cg_proto_flags and cg_proto moved from include/net/sock.h? Because they naturally belong to memcg header file. We can keep it there if you prefer but I felt like sock.h is quite heavy already. Now that I am looking into other MEMCG_KMEM related stuff there, memcg_proto_active sounds like a good one to move to memcontrol.h as well. > struct mem_cgroup_stat_cpu can remain private to memcontrol.c. Forward > declare the struct in memcontrol.h. And we cannot hide this one because of mem_cgroup_events which dereferences stat. There are some hot code paths doing statistics and it would be better if they can inline this trivial code. -- Michal Hocko SUSE Labs -- 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/