Re: [patch] sched: prevent bound kthreads from changing cpus_allowed

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Rientjes <rientjes@...>
Cc: <mingo@...>, <peterz@...>, <menage@...>, <linux-kernel@...>
Date: Thursday, June 5, 2008 - 4:29 pm

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 <pj@sgi.com> 1.940.382.4214
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch] sched: prevent bound kthreads from changing cpus..., Paul Jackson, (Thu Jun 5, 4:29 pm)
workqueue cpu affinity, Max Krasnyansky, (Tue Jun 10, 4:24 pm)
Re: workqueue cpu affinity, Oleg Nesterov, (Wed Jun 11, 12:08 pm)
Re: workqueue cpu affinity, Max Krasnyansky, (Wed Jun 11, 4:44 pm)
Re: workqueue cpu affinity, Max Krasnyansky, (Wed Jun 11, 3:21 pm)
Re: workqueue cpu affinity, Oleg Nesterov, (Thu Jun 12, 12:35 pm)
Re: workqueue cpu affinity, Max Krasnyansky, (Wed Jun 11, 3:21 pm)
Re: workqueue cpu affinity, Peter Zijlstra, (Wed Jun 11, 2:49 am)
Re: workqueue cpu affinity, Max Krasnyansky, (Wed Jun 11, 3:02 pm)
Re: workqueue cpu affinity, Peter Zijlstra, (Thu Jun 12, 2:44 pm)
Re: workqueue cpu affinity, Max Krasnyanskiy, (Thu Jun 12, 3:10 pm)
cpusets and kthreads, inconsistent behaviour, Max Krasnyansky, (Tue Jun 10, 12:30 pm)
Re: cpusets and kthreads, inconsistent behaviour, David Rientjes, (Tue Jun 10, 2:47 pm)
Re: cpusets and kthreads, inconsistent behaviour, Max Krasnyansky, (Tue Jun 10, 4:44 pm)
Re: cpusets and kthreads, inconsistent behaviour, David Rientjes, (Tue Jun 10, 4:54 pm)
Re: cpusets and kthreads, inconsistent behaviour, Max Krasnyansky, (Tue Jun 10, 5:15 pm)