lkml.org 
[lkml]   [2009]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [tip:sched/urgent] sched: Hide runqueues from direct refer at source code level
From
From: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Subject: Re: [tip:sched/urgent] sched: Hide runqueues from direct refer at source code level
Date: Tue, 23 Jun 2009 13:29:20 +0900 (JST)

> From: Ingo Molnar <mingo@elte.hu>
> Subject: Re: [tip:sched/urgent] sched: Hide runqueues from direct refer at source code level
> Date: Mon, 22 Jun 2009 17:35:22 +0200
>
> > >
> > > Thanks for your fix, I didn't notice...
> > > I wrote a patch to fix these two points.
> > >
> > > After applying this patch,
> > > all direct reference to runqueues is in macros. How is this?
> > >
> > > Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
> > >
> > > diff --git a/kernel/sched.c b/kernel/sched.c
> > > index 8ec9d13..e2ca8c1 100644
> > > --- a/kernel/sched.c
> > > +++ b/kernel/sched.c
> > > @@ -692,6 +692,7 @@ static inline int cpu_of(struct rq *rq)
> > > #define this_rq() (&__get_cpu_var(runqueues))
> > > #define task_rq(p) cpu_rq(task_cpu(p))
> > > #define cpu_curr(cpu) (cpu_rq(cpu)->curr)
> > > +#define raw_rq() (&__raw_get_cpu_var(runqueues))
> > >
> > > inline void update_rq_clock(struct rq *rq)
> > > {
> > > @@ -6625,7 +6626,7 @@ EXPORT_SYMBOL(yield);
> > > */
> > > void __sched io_schedule(void)
> > > {
> > > - struct rq *rq = &__raw_get_cpu_var(runqueues);
> > > + struct rq *rq = raw_rq();
> > >
> > > delayacct_blkio_start();
> > > atomic_inc(&rq->nr_iowait);
> > > @@ -6637,7 +6638,7 @@ EXPORT_SYMBOL(io_schedule);
> > >
> > > long __sched io_schedule_timeout(long timeout)
> > > {
> > > - struct rq *rq = &__raw_get_cpu_var(runqueues);
> > > + struct rq *rq = raw_rq();
> > > long ret;
> > >
> > > delayacct_blkio_start();
> >
> > Looks good - mind submitting a separate patch with a changelog, etc?
> >
> > Ingo
> >
>
> No, I have no fix to post now. Thanks.
>

I felt that I misunderstood what you said.
Are you requiring me a content for changelog?
Sorry for my poor English skill...


\
 
 \ /
  Last update: 2009-06-29 06:01    [W:0.046 / U:9.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site