a serious error in sched_ule.c?

Wes Peters wes at softweyr.com
Tue Mar 9 12:01:44 PST 2004


On Tuesday 09 March 2004 08:41 am, Robert Watson wrote:
> On 9 Mar 2004, Bin Ren wrote:
> >
> > I've been reading sched_ule.c and seem to find a serious error:
> >
> > in 'sched_slice()':
> >
> >          * Rationale:
> >          * KSEs in interactive ksegs get the minimum slice so that we
> >          * quickly notice if it abuses its advantage.
> >                 .....
> > #define SCHED_SLICE_INTERACTIVE         (slice_max)
> >
> > (slice_max) for interactive KSEs???? Either this is a serious mistake
> > or I'm seriously missing sth here.
>
> I believe this is a synchronization error in the comment and the code.
> The code was changed to provide a maximum slice to interactive
> applications because non-CPU intensive X11 applications will be marked as
> interactive, but redraws get interrupted in a short slice.  When the
> change went in to increase the time slice I saw an observable improvement
> in the redraws of X11 apps under load.

One of the classic trade-offs in making a 'server' vs. 'workstation' 
operating system.  Workstations require a strong preference for interactive 
over background tasks so the interactive tasks will remain responsive, 
especially in terms of heavily event-driven tasks like graphical UIs.  For 
a true server, where interactive tasks are not the norm, this preference 
may be counter-productive.

Is there some way (boot hint?) we could change SCHED_SLICE_INTERACTIVE 
between slice_max and something approaching slice_min?

-- 
         "Where am I, and what am I doing in this handbasket?"

Wes Peters                                              wes at softweyr.com




More information about the freebsd-hackers mailing list