lkml.org 
[lkml]   [2019]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] sched/core: Preempt current task in favour of bound kthread
* Peter Zijlstra <peterz@infradead.org> [2019-12-10 10:33:38]:

> On Tue, Dec 10, 2019 at 10:26:01AM +0100, Peter Zijlstra wrote:
>
> > > @@ -6716,7 +6737,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
> > > find_matching_se(&se, &pse);
> > > update_curr(cfs_rq_of(se));
> > > BUG_ON(!pse);
> > > - if (wakeup_preempt_entity(se, pse) == 1) {
> > > + if (wakeup_preempt_entity(se, pse) == 1 || kthread_wakeup_preempt(rq, p, wake_flags)) {
> > > /*
> > > * Bias pick_next to pick the sched entity that is
> > > * triggering this preemption.
> >
> > How about something like:
> >
> if (wakeup_preempt_entity(se, pse) >= !(wake_flags & WF_KTHREAD))
>
> That's a slightly less convoluted expression for the same value :-)

Yes, this should work, let me try and get back to you.

--
Thanks and Regards
Srikar Dronamraju

\
 
 \ /
  Last update: 2019-12-10 11:19    [W:0.083 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site