From: Ingo Molnar <mingo@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mike Galbraith <efault@gmx.de>, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH 05/10] sched/core: Remove the tsk_cpus_allowed() wrapper
Date: Thu, 9 Feb 2017 21:28:39 +0100 [thread overview]
Message-ID: <20170209202839.GA30297@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1702091243200.3604@nanos>
* Thomas Gleixner <tglx@linutronix.de> wrote:
> On Thu, 9 Feb 2017, Ingo Molnar wrote:
> >
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > On Wed, Feb 08, 2017 at 07:34:18PM +0100, Ingo Molnar wrote:
> > >
> > > > So the original intention of tsk_cpus_allowed() was to 'future-proof' the
> > > > field - but it's pretty ineffectual at that, because half of the code uses
> > > > ->cpus_allowed directly ...
> > > >
> > > > Also, the wrapper makes the code longer than the original expression!
> > >
> > > I still object to taking this out without replacement.
> >
> > Yeah, that would have been my next suggestion.
> >
> > > This leaves RT stranded.
> >
> > Well, no, it leaves -rt with slightly more patching work than it already has...
> >
> > Because note how the wrappery is _already_ incomplete to a significant degree:
> >
> > triton:~/tip> git grep -Ee '->cpus_allowed' | grep -vE 'tsk_|cpuset|core.c' | wc -l
> > 27
> > triton:~/tip> git grep tsk_cpus_allowed | wc -l
> > 43
> >
> > I.e. around 40% of the places that use ->cpus_allowed in the upstream kernel are
> > not properly wrapped. That fact already 'wrecks' -rt.
>
> Nope it does not. The places which use cpumask directly are not interfering with
> the decisions which are made by the scheduler whether migration can happen or
> not. All decision code pathes use the wrapper and we make sure on every update
> that this is the case.
Indeed!
> I completely agree that your idea with the const *ptr is the better solution,
> but without that replacement RT is stranded and left alone with the mop up.
Ok, I'm convinced!
Thanks,
Ingo
next prev parent reply other threads:[~2017-02-09 20:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 18:34 [PATCH 00/10] sched.h modernization -v2, phase #1: "Pre-splitup cleanups" Ingo Molnar
2017-02-08 18:34 ` [PATCH 01/10] sched/headers: Make all include/linux/sched/*.h headers build standalone Ingo Molnar
2017-02-08 18:34 ` [PATCH 02/10] sched/core: Convert ___assert_task_state() link time assert to BUILD_BUG_ON() Ingo Molnar
2017-02-08 18:34 ` [PATCH 03/10] sched/headers: Make task_struct::wake_q an opaque pointer Ingo Molnar
2017-02-08 20:00 ` Linus Torvalds
2017-02-08 21:37 ` [PATCH] sched/wake_q: Restore task_struct::wake_q type safety Ingo Molnar
2017-02-08 18:34 ` [PATCH 04/10] sched/core: Move the get_preempt_disable_ip() inline to sched/core.c Ingo Molnar
2017-02-08 18:34 ` [PATCH 05/10] sched/core: Remove the tsk_cpus_allowed() wrapper Ingo Molnar
2017-02-09 8:53 ` Peter Zijlstra
2017-02-09 9:08 ` Ingo Molnar
2017-02-09 11:46 ` Thomas Gleixner
2017-02-09 20:28 ` Ingo Molnar [this message]
2017-02-08 18:34 ` [PATCH 06/10] sched/core: Remove the tsk_nr_cpus_allowed() wrapper Ingo Molnar
2017-02-08 18:34 ` [PATCH 07/10] rcu: Separate the RCU synchronization types and APIs into <linux/rcupdate_wait.h> Ingo Molnar
2017-02-11 19:17 ` Paul McKenney
2017-02-08 18:34 ` [PATCH 08/10] sched/headers, cgroups: Remove the threadgroup_change_*() wrappery Ingo Molnar
2017-02-08 18:34 ` [PATCH 09/10] mm/vmacache, sched/headers: Introduce 'struct vmacache' and move it from <linux/sched.h> to <linux/mm_types> Ingo Molnar
2017-02-08 18:34 ` [PATCH 10/10] kasan, sched/headers: Uninline kasan_enable/disable_current() Ingo Molnar
2017-02-08 20:23 ` [PATCH 00/10] sched.h modernization -v2, phase #1: "Pre-splitup cleanups" Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170209202839.GA30297@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.