lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] I3 sched tweaks...
From
Date
On Wed, 2002-01-16 at 16:10, Robert Love wrote:
> On Wed, 2002-01-16 at 17:46, Ingo Molnar wrote:
>
> > we pass pointers across functions regularly, even if the pointer could be
> > calculated within the function. We do this in the timer code too. It's
> > slightly cheaper to pass an already existing (calculated) 'current'
> > pointer over to another function, instead of calculating it once more in
> > that function. This will be especially true once we make 'current' a tiny
> > bit more expensive (Alan's kernel stack coloring rewrite will do that i
> > think, it will be one more instruction to get 'current'.)
>
> Maybe we should benchmark it? It is very easy to calculate current.
>
> Certainly I see the benefit if we start coloring the pointer (it adds 2
> instructions I believe) but let's make sure it is worth passing another
> 32-bit argument. It could very well be, schedule_tick is called
> enough...

Don't forget that, in non-x86 land, current tends to be just kept in a
register. No computations required. Certainly passing it around on,
e.g. mips is a clear loss.

-Justin

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.120 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site