Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754289AbbLVXPa (ORCPT ); Tue, 22 Dec 2015 18:15:30 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33409 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753048AbbLVXP2 (ORCPT ); Tue, 22 Dec 2015 18:15:28 -0500 Date: Tue, 22 Dec 2015 15:15:27 -0800 From: Andrew Morton To: Johannes Weiner , Vladimir Davydov , Michal Hocko , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/4] mm: memcontrol: reign in the CONFIG space madness Message-Id: <20151222151527.b4fd06da45d5c86d193c773d@linux-foundation.org> In-Reply-To: <20151222151138.0c35816e53b0f0ad940568bb@linux-foundation.org> References: <1449863653-6546-1-git-send-email-hannes@cmpxchg.org> <1449863653-6546-2-git-send-email-hannes@cmpxchg.org> <20151212163332.GC28521@esperanza> <20151212172057.GA7997@cmpxchg.org> <20151222151138.0c35816e53b0f0ad940568bb@linux-foundation.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1115 Lines: 35 On Tue, 22 Dec 2015 15:11:38 -0800 Andrew Morton wrote: > What I have is And after a bit of reject resolution in mm-memcontrol-clean-up-alloc-online-offline-free-functions.patch we have static void mem_cgroup_css_free(struct cgroup_subsys_state *css) { struct mem_cgroup *memcg = mem_cgroup_from_css(css); if (cgroup_subsys_on_dfl(memory_cgrp_subsys) && !cgroup_memory_nosocket) static_branch_dec(&memcg_sockets_enabled_key); vmpressure_cleanup(&memcg->vmpressure); cancel_work_sync(&memcg->high_work); mem_cgroup_remove_from_trees(memcg); memcg_free_kmem(memcg); if (!cgroup_subsys_on_dfl(memory_cgrp_subsys) && memcg->tcpmem_active) static_branch_dec(&memcg_sockets_enabled_key); mem_cgroup_free(memcg); } code looks a bit strange. Can we move the static_branch_dec's together and run cgroup_subsys_on_dfl just once? -- 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/