lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC patch 1/2] sched: dynamically adapt granularity with nr_running
From
Date
On Mon, 2010-09-13 at 11:25 -0400, Mathieu Desnoyers wrote:

> > > The more divs we put it, the more expensive it all becomes.
> > >
> >
> > What about:
> >
> > if (delta_exec < sysctl_sched_min_granularity ||
> > delta_exec < __sched_gran(cfs_rq->nr_running))
> >
> > This way we avoid the div when delta_exec is less than the
> > min_granularity, and then we can do the div to perhaps avoid a needless
> > resched?
>
> Please note that my patch does not even take the 32-bit div when there are less
> than 4 threads running on the system.
>
> So I'm not at all sure we're trying to optimize an important case here.

If we have 5 threads running and hit this where delta_exec is <
sched_min_granularity, then we do have that div, right? Question is, how
often do we hit this condition where delta_exec is less while running
more that 4 threads?

-- Steve




\
 
 \ /
  Last update: 2010-09-13 17:41    [W:0.087 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site