From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: [PATCH 02/13] cpuset: remove fast exit path from remove_tasks_in_empty_cpuset() Date: Wed, 28 Nov 2012 13:34:09 -0800 Message-ID: <1354138460-19286-3-git-send-email-tj@kernel.org> References: <1354138460-19286-1-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=8QivQQSzVYbjba7UOFkh3m3k6UVRUhE/V5apfi/lNZA=; b=ZJCr1wccgc5NJJr+OrZCXeOJkC61spa3XKKt4vS+yUGGhc0YXEQ2e5jNcWnIquvzI2 PwlMByooIkjuaEwRuGpQxCXiYWv6ahcjTSO/uO/lWHyBnNbdQfrI0SL46rLDcD9cergl gfqsxa6TTDce7e5H+goZ3vWv5nIFgMuYHUGWXuK9k/MapCkdQn3IPCiSKB8s4itKsJsO pe6AQBl6c5X79m//EGMQtMgXiH3rspHLN49swvy4+9zxF4auinfpz9KJF7/Cy3TW82fS kI9mewh2lmDVkt/jbmum7tRAaP0YzdIqKTe6ll7hlpv9++7b8kBKvyK/STgSSUC9Dqm4 dTEA== In-Reply-To: <1354138460-19286-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org, glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mhocko-AlSwsSmVLrQ@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, Tejun Heo , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org The function isn't that hot, the overhead of missing the fast exit is low, the test itself depends heavily on cgroup internals, and it's gonna be a hindrance when trying to decouple cpuset locking from cgroup core. Remove the fast exit path. Signed-off-by: Tejun Heo --- kernel/cpuset.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a423774..54b2b73 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1968,14 +1968,6 @@ static void remove_tasks_in_empty_cpuset(struct cpuset *cs) struct cpuset *parent; /* - * The cgroup's css_sets list is in use if there are tasks - * in the cpuset; the list is empty if there are none; - * the cs->css.refcnt seems always 0. - */ - if (list_empty(&cs->css.cgroup->css_sets)) - return; - - /* * Find its next-highest non-empty parent, (top cpuset * has online cpus, so can't be empty). */ -- 1.7.11.7 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx106.postini.com [74.125.245.106]) by kanga.kvack.org (Postfix) with SMTP id 6965C6B0072 for ; Wed, 28 Nov 2012 16:34:34 -0500 (EST) Received: by mail-pb0-f41.google.com with SMTP id xa7so10587559pbc.14 for ; Wed, 28 Nov 2012 13:34:33 -0800 (PST) From: Tejun Heo Subject: [PATCH 02/13] cpuset: remove fast exit path from remove_tasks_in_empty_cpuset() Date: Wed, 28 Nov 2012 13:34:09 -0800 Message-Id: <1354138460-19286-3-git-send-email-tj@kernel.org> In-Reply-To: <1354138460-19286-1-git-send-email-tj@kernel.org> References: <1354138460-19286-1-git-send-email-tj@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: lizefan@huawei.com, paul@paulmenage.org, glommer@parallels.com Cc: containers@lists.linux-foundation.org, cgroups@vger.kernel.org, peterz@infradead.org, mhocko@suse.cz, bsingharora@gmail.com, hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Tejun Heo The function isn't that hot, the overhead of missing the fast exit is low, the test itself depends heavily on cgroup internals, and it's gonna be a hindrance when trying to decouple cpuset locking from cgroup core. Remove the fast exit path. Signed-off-by: Tejun Heo --- kernel/cpuset.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a423774..54b2b73 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1968,14 +1968,6 @@ static void remove_tasks_in_empty_cpuset(struct cpuset *cs) struct cpuset *parent; /* - * The cgroup's css_sets list is in use if there are tasks - * in the cpuset; the list is empty if there are none; - * the cs->css.refcnt seems always 0. - */ - if (list_empty(&cs->css.cgroup->css_sets)) - return; - - /* * Find its next-highest non-empty parent, (top cpuset * has online cpus, so can't be empty). */ -- 1.7.11.7 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932546Ab2K1Vei (ORCPT ); Wed, 28 Nov 2012 16:34:38 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:47858 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932461Ab2K1Ved (ORCPT ); Wed, 28 Nov 2012 16:34:33 -0500 From: Tejun Heo To: lizefan@huawei.com, paul@paulmenage.org, glommer@parallels.com Cc: containers@lists.linux-foundation.org, cgroups@vger.kernel.org, peterz@infradead.org, mhocko@suse.cz, bsingharora@gmail.com, hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Tejun Heo Subject: [PATCH 02/13] cpuset: remove fast exit path from remove_tasks_in_empty_cpuset() Date: Wed, 28 Nov 2012 13:34:09 -0800 Message-Id: <1354138460-19286-3-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1354138460-19286-1-git-send-email-tj@kernel.org> References: <1354138460-19286-1-git-send-email-tj@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function isn't that hot, the overhead of missing the fast exit is low, the test itself depends heavily on cgroup internals, and it's gonna be a hindrance when trying to decouple cpuset locking from cgroup core. Remove the fast exit path. Signed-off-by: Tejun Heo --- kernel/cpuset.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a423774..54b2b73 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1968,14 +1968,6 @@ static void remove_tasks_in_empty_cpuset(struct cpuset *cs) struct cpuset *parent; /* - * The cgroup's css_sets list is in use if there are tasks - * in the cpuset; the list is empty if there are none; - * the cs->css.refcnt seems always 0. - */ - if (list_empty(&cs->css.cgroup->css_sets)) - return; - - /* * Find its next-highest non-empty parent, (top cpuset * has online cpus, so can't be empty). */ -- 1.7.11.7