lkml.org 
[lkml]   [2007]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 04/14] readahead: thrashing recovery method: check unbalanced aging
Always check for unbalanced aging in thrashing_recovery_readahead(), and
account RA_EVENT_READAHEAD_MUTILATE/RA_EVENT_READAHEAD_THRASHING events.

Unbalanced zone/node aging can come from abnormal system loads, or
misconfigured NUMA policies.

Thrashings are rare events, hence the cost of probe_page() is not a concern.

Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
mm/readahead.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- linux-2.6.21-rc3-mm2.orig/mm/readahead.c
+++ linux-2.6.21-rc3-mm2/mm/readahead.c
@@ -1546,14 +1546,11 @@ thrashing_recovery_readahead(struct addr
pgoff_t offset, unsigned long ra_max)
{
unsigned long ra_size;
+ int unbalanced_aging = probe_page(mapping, offset - 1);

-#ifdef CONFIG_DEBUG_READAHEAD
- if (probe_page(mapping, offset - 1))
- ra_account(ra, RA_EVENT_READAHEAD_MUTILATE,
- ra->readahead_index - offset);
- ra_account(ra, RA_EVENT_READAHEAD_THRASHING,
- ra->readahead_index - offset);
-#endif
+ ra_account(ra, unbalanced_aging ? RA_EVENT_READAHEAD_MUTILATE :
+ RA_EVENT_READAHEAD_THRASHING,
+ ra->readahead_index - offset);

if (offset < ra->ra_index) {
/*
--
-
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: 2007-03-16 09:59    [from the cache]
©2003-2011 Jasper Spaans