Re: [PATCH 2/2] cpusets: update tasks' cpus_allowed and mems_allowed after CPU/NODE offline/online

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Jackson <pj@...>
Cc: <menage@...>, <miaox@...>, <akpm@...>, <linux-kernel@...>
Date: Wednesday, June 4, 2008 - 4:02 pm

On Wed, 4 Jun 2008, Paul Jackson wrote:


Yes, an alterative to the PF_CPU_BIND flag is to prevent calls to 
set_cpus_allowed() for kthreads that should not change affinity.


I think we both agree that in terms of the code itself, adding the flag 
and doing the check in set_cpus_allowed() is the optimal solution.  It can 
simply return -EINVAL for PF_CPU_BIND threads and the threads don't get 
moved.

It's debatable whether allocating an additional PF_* flag for this purpose 
is worthwhile.

I usually don't advocate against adding such bits that have a clear and 
defined purpose for the sole reason that perhaps later we will need 
additional bits that can't be worked around so easily as this one.  It's 
helpful to be conservative in allocating new flags but not at the expense 
of the code itself, especially when loopholes can easily be introduced 
that would have been otherwise prevented.

So I'll repost the patch and see where it goes.

		David
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/2] cpusets: update tasks' cpus_allowed and mems..., David Rientjes, (Wed Jun 4, 4:02 pm)