[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141009145726.GA5604@redhat.com>
Date: Thu, 9 Oct 2014 16:57:26 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Kirill Tkhai <tkhai@...dex.ru>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] sched: schedule_tail() should disable preemption
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 <ktkhai@...allels.com>
Thanks!
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists