On 10/09, Kirill Tkhai wrote:
>
> В Ср, 08/10/2014 в 21:36 +0200, Oleg Nesterov пишет:
> > @@ -2277,15 +2277,14 @@ static inline void post_schedule(struct rq *rq)
> >  asmlinkage __visible void schedule_tail(struct task_struct *prev)
> >     __releases(rq->lock)
> >  {
> > -   struct rq *rq = this_rq();
> > +   struct rq *rq;
> >  
> > +   /* finish_task_switch() drops rq->lock and enables preemtion */
> > +   preempt_disable();
> 
> Maybe, the code would look simpler if we change
> init_task_preempt_count() and create new tasks
> with preempt_count() == 2, so this preempt_disable()
> won't be necessary. But it's more or less subjectively.

Yes, yes, I thought about the same.

Except I think we should kill init_task_preempt_count() and change
schedule_tail()

        -       preempt_disable();
        +       preempt_count_set(PREEMPT_DISABLED + 1);

but first we need to remove ->saved_preempt_count.

> Reviewed-by: Kirill Tkhai <[email protected]>

Thanks!

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to