Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756892AbYFEUaK (ORCPT ); Thu, 5 Jun 2008 16:30:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752392AbYFEU35 (ORCPT ); Thu, 5 Jun 2008 16:29:57 -0400 Received: from relay1.sgi.com ([192.48.171.29]:48247 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752348AbYFEU34 (ORCPT ); Thu, 5 Jun 2008 16:29:56 -0400 Date: Thu, 5 Jun 2008 15:29:53 -0500 From: Paul Jackson To: David Rientjes Cc: mingo@elte.hu, peterz@infradead.org, menage@google.com, linux-kernel@vger.kernel.org Subject: Re: [patch] sched: prevent bound kthreads from changing cpus_allowed Message-Id: <20080605152953.dcfefa47.pj@sgi.com> In-Reply-To: References: Organization: SGI X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.12.0; i686-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: 1309 Lines: 29 A couple of questions on this: 1) Sometimes threads are bound to a set of CPUs, such as the CPUs on a particular node: drivers/pci/pci-driver.c: set_cpus_allowed_ptr(current, nodecpumask); net/sunrpc/svc.c: set_cpus_allowed_ptr(current, nodecpumask); Such cases can't invoke kthread_bind(), as that only binds to a single CPU. I only see one place in your patch that sets PF_THREAD_BOUND; would it make sense for such multi-CPU binds as above to be PF_THREAD_BOUND as well? 2) Sometimes calls to kthread_bind are binding to any online cpu, such as in: drivers/infiniband/hw/ehca/ehca_irq.c: kthread_bind(cct->task, any_online_cpu(cpu_online_map)); In such cases, the PF_THREAD_BOUND seems inappropriate. The caller of kthread_bind() really doesn't seem to care where that thread is bound; they just want it on a CPU that is still online. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.940.382.4214 -- 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/