lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] shows Active/Inactive on per-node meminfo
Date
On Friday, August 20, 2004 2:02 pm, mita akinobu wrote:
> + for (i = 0; i < MAX_NR_ZONES; i++) {
> + *active += zones[i].nr_active;
> + *inactive += zones[i].nr_inactive;
> + *free += zones[i].free_pages;
> + }
> +}
> +
> - *free += zone->free_pages;
> + for_each_pgdat(pgdat) {
> + unsigned long l, m, n;
> + __get_zone_counts(&l, &m, &n, pgdat);
> + *active += l;
> + *inactive += m;
> + *free += n;
> }

Just FYI, loops like this are going to be very slow on a large machine.
Iterating over every node in the system involves a TLB miss on every
iteration along with an offnode reference and possibly cacheline demotion.

Jesse
-
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:05    [W:0.093 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site