Re: [PATCH] sched: ensure a task has a non-normalized vruntime when returning back to cfs

From: Byungchul Park
Date: Mon Aug 10 2015 - 20:06:44 EST


On Tue, Aug 11, 2015 at 08:35:29AM +0900, Byungchul Park wrote:
> On Mon, Aug 10, 2015 at 02:14:07PM +0200, Peter Zijlstra wrote:
> > On Mon, Aug 10, 2015 at 06:02:55PM +0900, byungchul.park@xxxxxxx wrote:
> > > From: Byungchul Park <byungchul.park@xxxxxxx>
> > >
> > > current code ensures a task has a normalized vruntime when switching off
> > > from fair class, but it does not ensure the task has a non-normalized
> > > vruntime when switching back to the fair class.
> > >
> > > this is an example breaking this consistency.
> > >
> > > 1. a task is in fair class and !queue
> > > 2. change its class to rt class (still !queue)
> > > 3. change its class to fair class again (stll !queue)
> >
> > Just curious, did you manage to trigger this in practise or did you find
> > it through code inspection only?

i found it through code inspection, and then i checked it with debugger.

>
> hello,
>
> not only through code inspection, but also checked it through gdb debugger.
> when returning back to fair class (step 3), vruntime was still normalized.
> more exactly, it has a very large value which means negative value.
>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > 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@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/