From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757647AbXJCImz (ORCPT ); Wed, 3 Oct 2007 04:42:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753945AbXJCIms (ORCPT ); Wed, 3 Oct 2007 04:42:48 -0400 Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:57202 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753936AbXJCImr (ORCPT ); Wed, 3 Oct 2007 04:42:47 -0400 From: Paul Jackson To: Andrew Morton Cc: Nick Piggin , Peter Zijlstra , "Serge E. Hallyn" , Cedric Le Goater , Paul Menage , linux-kernel@vger.kernel.org, "Eric W. Biederman" , David Rientjes , Vaidyanathan Srinivasan , Pavel Emelianov , containers@lists.osdl.org, Paul Jackson , balbir@linux.vnet.ibm.com Date: Wed, 03 Oct 2007 01:42:41 -0700 Message-Id: <20071003084241.24279.62099.sendpatchset@jackhammer.engr.sgi.com> Subject: [PATCH] task containersv11 add tasks file interface fix for cpusets Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Jackson The code in kernel/cgroup.c attach_task() which skips the attachment of a task to the group it is already in has to be removed. Cpusets depends on reattaching a task to its current cpuset, in order to trigger updating the cpus_allowed mask in the task struct. The dependency of cpusets on this is a hack, granted, but an important one. It lets us avoid checking for a changed cpuset 'cpus' setting in critical scheduler code paths. Signed-off-by: Paul Jackson Cc: Paul Menage --- Andrew - this patch applies directly following the patch: task-containersv11-add-tasks-file-interface.patch kernel/cgroup.c | 3 --- 1 file changed, 3 deletions(-) --- 2.6.23-rc8-mm1.orig/kernel/cgroup.c 2007-10-02 20:24:11.078925442 -0700 +++ 2.6.23-rc8-mm1/kernel/cgroup.c 2007-10-02 20:25:41.352279374 -0700 @@ -739,10 +739,7 @@ static int attach_task(struct cgroup *co get_first_subsys(cont, NULL, &subsys_id); - /* Nothing to do if the task is already in that cgroup */ oldcont = task_cgroup(tsk, subsys_id); - if (cont == oldcont) - return 0; for_each_subsys(root, ss) { if (ss->can_attach) { -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373