From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Paul Turner" <pjt@google.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Mike Galbraith" <efault@gmx.de>
Subject: Re: [PATCH v6] sched: fix init NOHZ_IDLE flag
Date: Mon, 22 Apr 2013 13:39:19 +0200 [thread overview]
Message-ID: <1366630759.4077.6.camel@laptop> (raw)
In-Reply-To: <CAKfTPtBMG6KPSZsMFnJqEAajg2qjRXowKSfrWHED-EhUCLB2+Q@mail.gmail.com>
On Mon, 2013-04-22 at 13:01 +0200, Vincent Guittot wrote:
> > I'm not quite getting things.. what's wrong with adding this flags
> > thing to sched_domain itself? That's already RCU destroyed so why
> add a
> > second RCU layer?
>
> We need one flags for all sched_domain so if we add it into
> sched_domain struct, we have to define which one will handle the flags
> for all other and find it in the sched_domain tree when we need it.
Just pick rq->sd -- if the root_domain thing doesn't work out.
> In
> addition, the flags in other sched_domain will be a waste of space.
> The RCU in sched_domain might become useless as it is protected by the
> one that is in sched_domain_rq
I'm all for wasting space instead over adding extra pointer chasing all
over the place. But also, look at pahole -C sched_domain, there's
plenty of 4 byte holes in there where we can stuff a single bit.
> > We also have the root_domain for things that don't need to go in a
> > hierarchy but are once per cpu -- it sounds like this is one of
> those
> > things; iirc the root_domain life-time is the same as the entire
> > sched_domain tree so adding it to the root_domain is also an option.
>
> AFAICT, it doesn't share the same RCU object and as a result the same
> lifecycle than sched_domain so there is a time window where
> sched_domain and flags could lost their synchronization.
> Nevertheless, i'm going to have a look at root_domain
They're set under the same write side lock at the same time rq->sd it
set, but yes I suppose that since its a separate pointer there might be
a tiny window where we could go wrong.
next prev parent reply other threads:[~2013-04-22 11:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 13:10 Vincent Guittot
2013-04-22 9:30 ` Peter Zijlstra
2013-04-22 11:01 ` Vincent Guittot
2013-04-22 11:39 ` Peter Zijlstra [this message]
2013-04-22 12:05 ` Vincent Guittot
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=1366630759.4077.6.camel@laptop \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pjt@google.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®