Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246489
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class |
| Date | 2015-10-14 12:20 +0200 |
| Message-ID | <qjrk7-3Pc-17@gated-at.bofh.it> (permalink) |
| References | <qjpV0-1Es-9@gated-at.bofh.it> <qjpV0-1Es-15@gated-at.bofh.it> <qjqel-2hl-5@gated-at.bofh.it> <qjqxK-2DR-43@gated-at.bofh.it> <qjqHo-2OT-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Oct 14, 2015 at 11:30:24AM +0200, Peter Zijlstra wrote:
> On Wed, Oct 14, 2015 at 06:26:30PM +0900, Byungchul Park wrote:
> > On Wed, Oct 14, 2015 at 11:00:16AM +0200, Peter Zijlstra wrote:
> > > On Wed, Oct 14, 2015 at 05:42:09PM +0900, byungchul.park@lge.com wrote:
> > > > +static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
> > > > +{
> > > > + const struct sched_class *class;
> > > > +
> > > > + for_each_class(class) {
> > > > + if (class->set_task_rq)
> > > > + class->set_task_rq(p, cpu);
> > > > + }
> > > > +}
> > >
> > > So I worry about this, because the class structures are not all in the
> > > same translation unit, GCC cannot (without -fwhole-program) optimize
> > > that all away.
> >
> > i wondered if it was so, and it was.
>
> --combine might be enough, and might make sense for all the
> kernel/sched/ file, but that too is not something we currently do.
>
> > > This means we'll do 5 cacheline loads and 2 indirect calls, on _every_
> > > cpu migration.
> >
> > i agree with your this concern. to avoid this concern, it can be done by
> > hard coding as current code.. but we will lose code flexability. i thought
> > migration overhead was not so important since it hardly happens.
>
> It happens quite a lot, just not _as_ often as regular context
> switching.
ok, i will take the optimization into account in the migration case.
thanks,
byungchul
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/2] sched: account fair load avg consistently <byungchul.park@lge.com> - 2015-10-14 10:50 +0200
[PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class <byungchul.park@lge.com> - 2015-10-14 10:50 +0200
Re: [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class Peter Zijlstra <peterz@infradead.org> - 2015-10-14 11:10 +0200
Re: [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class Byungchul Park <byungchul.park@lge.com> - 2015-10-14 11:30 +0200
Re: [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class Peter Zijlstra <peterz@infradead.org> - 2015-10-14 11:40 +0200
Re: [PATCH v2 1/2] sched: make each sched class handle its rq assignment in their own class Byungchul Park <byungchul.park@lge.com> - 2015-10-14 12:20 +0200
csiph-web