[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130318094140.GB25045@gmail.com>
Date: Mon, 18 Mar 2013 10:41:40 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Tejun Heo <tj@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH REPOST v3.9-rc1] sched: replace PF_THREAD_BOUND with
PF_NO_SETAFFINITY
* Tejun Heo <tj@...nel.org> wrote:
> PF_THREAD_BOUND was originally used to mark kernel threads which were
> bound to a specific CPU using kthread_bind() and a task with the flag
> set allows cpus_allowed modifications only to itself. Workqueue is
> currently abusing it to prevent userland from meddling with
> cpus_allowed of workqueue workers.
>
> What we need is a flag to prevent userland from messing with
> cpus_allowed of certain kernel tasks. In kernel, anyone can
> (incorrectly) squash the flag, and, for worker-type usages,
> restricting cpus_allowed modification to the task itself doesn't
> provide meaningful extra proection as other tasks can inject work
> items to the task anyway.
>
> This patch replaces PF_THREAD_BOUND with PF_NO_SETAFFINITY.
> sched_setaffinity() checks the flag and return -EINVAL if set.
> set_cpus_allowed_ptr() is no longer affected by the flag.
>
> This will allow simplifying workqueue worker CPU affinity management.
Acked-by: Ingo Molnar <mingo@...nel.org>
I suspect you want to carry this in the workqueue tree, to enable those
extra simplifications?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists