lkml.org 
[lkml]   [2000]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: A different metric for scheduler optimisation
Davide Libenzi wrote:

> On Sat, 29 Jan 2000, Horst von Brand wrote:
> > In case your application switches rapidly, it is thrashing the cache, which
> > is crucial for performance with current CPUs. You simply don't want to do
> > that, ever. You get best performance by _never_ switching unless forced to
> > do so, but that isn't realistic.
>
> If You switch fast You have more cache reloads of probably less cache lines (
> or pages ).
> Since a task that run a short time has a lower probability to "touch" RAM
> locations.

On what type of application mix to you base that hypothesis?

Programs which reschedule at a high rate seem usually to be those shunting large
blocks of data around, without doing an awful lot of processing on them. They
can touch a great deal of data in a very short time.

Programs which reschedule less often generally fall into one of two categories.
One class of program rapidly shifts large blocks of data, with lightweight
processing, using select (or some other event handling scheme, like SIGIO). The
other class is doing some heavyweight number crunching, and progresses through
the data comparatively slowly.

I draw almost the opposite conclusion from this mix - fast rescheduling programs
flush the cache rapidly. "Ah!", you may say, "but they only flush the cache when
they have finished with the data, because sending out the results from
processing that data is the very reason for the reschedule". This is true. If
its a genuinely lightweight activity, such as "read some stuff from disk and
throw a section of it at a network connection", one could not do better (unless
you can use busmasting to completely avoid the processor ever seeing the data,
which would be extremely lightweight processing). It certainly doesn't point to
the pattern of cache behaviour which you hypothesise, though.

Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.069 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site