lkml.org 
[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [STACK] >3k call path in ide
From
Date
On Fri, 2004-06-11 at 09:10, Andrew Morton wrote:
> Jörn Engel <joern@wohnheim.fh-wedel.de> wrote:
> >
> > read_page_state doesn't exist in 2.6.7-rc3 or 2.6.6-mm5. How is it
> > defined?
>
> It was in 2.6.7-rc3-mm1.
>
>
>
> struct page_state is large (148 bytes) and we put them on the stack in awkward
> code paths (page reclaim...)
>
> So implement a simple read_page_state() which can be used to pluck out a
> single member from the all-cpus page_state accumulators.
>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
...
> +unsigned long __read_page_state(unsigned offset)
> +{
> + unsigned long ret = 0;
> + int cpu;
> +
> + for (cpu = 0; cpu < NR_CPUS; cpu++) {
> + unsigned long in;
> +
> + if (!cpu_possible(cpu))
> + continue;

for_each_cpu(cpu) here perhaps?

Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell

-
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: 2005-03-22 14:07    [W:0.041 / U:12.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site