lkml.org 
[lkml]   [2004]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] shows Active/Inactive on per-node meminfo
Date
On Saturday 21 August 2004 03:48, Jesse Barnes wrote:
> 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.

get_zone_counts() is used by max_sane_readahead(), and
max_sane_readahead() is often called in filemap_nopage().

If iterating over every node is going to be very slow, the following change
would have a little bit of improvement on a large machine?


--- linux-2.6.8.1-mm3/mm/readahead.c.orig 2004-08-21 15:18:08.924273720 +0900
+++ linux-2.6.8.1-mm3/mm/readahead.c 2004-08-21 15:22:31.123413392 +0900
@@ -572,6 +572,6 @@ unsigned long max_sane_readahead(unsigne
unsigned long inactive;
unsigned long free;

- get_zone_counts(&active, &inactive, &free);
+ __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
return min(nr, (inactive + free) / 2);
}


-
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.054 / U:6.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site