lkml.org 
[lkml]   [2006]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][2/4] sched: add discrete weighted cpu load function
Date
On Wednesday 15 March 2006 09:45, Peter Williams wrote:
> Con Kolivas wrote:
> > I haven't checked but gcc may well inline weighted_cpuload anyway?
>
> It may be doing so for internal uses inside sched.c but I'm pretty sure
> that it won't for external calls.

Hmm I investigated briefly and only C99 inlining (whatever that means) will
allow me to locally inline and export as well. It would do so if I specified
-finline-functions which is not our default at all in the kernel (we only
recently disable -fnoinline-functions I believe). Anyway checking positively
shows me this on gcc 4.1.0:

0xc0111283 <find_busiest_queue+83>: call 0xc0110dc0 <weighted_cpuload>

So no, it doesn't get inlined.

> > The way you're suggesting adds a function that is never used by anything
> > but swap prefetch which would then need to be 'ifdef'ed out to not be
> > needlessly built on every system. Adding ifdefs is frowned upon already,
> > and to have an mm/ specific ifdef in sched.c would be rather ugly.
>
> Sometimes ugliness is the best option.

I spent quite some time trying to find the least cost way to do this without
uglifying code. I don't feel strongly about just how to do it though.
Comments from Andrew and Ingo would be most welcome on this matter.

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

\
 
 \ /
  Last update: 2006-03-14 23:53    [W:0.099 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site