public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: balance_pgdat(): where is total_scanned ever updated?
@ 2004-11-10  3:34 Chuck Ebbert
  0 siblings, 0 replies; 11+ messages in thread
From: Chuck Ebbert @ 2004-11-10  3:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: nickpiggin, linux-kernel

Andrew Morton <akpm@osdl.org> wrote:

> There's lots of useful info in /proc/vmstat.

 And the documentation on these fields is the source code itself, right? :)

 The nr_dirty field seems kind of useless -- why not have nr_dirtied
and nr_cleaned instead?  Analysis tools can subtract them to get nr_dirty.
Or is there some other field that shows the nr of pages being dirtied?


--Chuck Ebbert  09-Nov-04  22:13:44

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: balance_pgdat(): where is total_scanned ever updated?
@ 2004-11-07  5:02 Chuck Ebbert
  0 siblings, 0 replies; 11+ messages in thread
From: Chuck Ebbert @ 2004-11-07  5:02 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Andrew Morton wrote:

> I'm leaving this alone until it can be demonstrated that fixing it improves
> kernel behaviour in some manner.

How about applying this patch so nobody else will be confused?


diff -ur bk-current/mm/vmscan.c edited/mm/vmscan.c
--- bk-current/mm/vmscan.c      2004-11-06 23:02:48.691160680 -0500
+++ edited/mm/vmscan.c  2004-11-06 23:13:02.636826752 -0500
@@ -1071,10 +1071,13 @@
                        /*
                         * If we've done a decent amount of scanning and
                         * the reclaim ratio is low, start doing writepage
-                        * even in laptop mode
+                        * even in laptop mode.
+                        * NOTE: total_scanned is always zero; this code
+                        *       does nothing.  Reactivating it has not been
+                        *       shown to be helpful at the moment.
                         */
                        if (total_scanned > SWAP_CLUSTER_MAX * 2 &&
-                           total_scanned > total_reclaimed+total_reclaimed/2)
+                           total_scanned > total_reclaimed + total_reclaimed / 2)
                                sc.may_writepage = 1;
                }
                if (nr_pages && to_free > total_reclaimed)
@@ -1084,6 +1087,7 @@
                /*
                 * OK, kswapd is getting into trouble.  Take a nap, then take
                 * another pass across the zones.
+                * NOTE: total_scanned is always zero.  See above.
                 */
                if (total_scanned && priority < DEF_PRIORITY - 2)
                        blk_congestion_wait(WRITE, HZ/10);



--Chuck Ebbert  06-Nov-04  23:35:37

^ permalink raw reply	[flat|nested] 11+ messages in thread
* balance_pgdat(): where is total_scanned ever updated?
@ 2004-11-06 19:15 Chuck Ebbert
  2004-11-07  0:11 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Chuck Ebbert @ 2004-11-06 19:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Nick Piggin

Kernel version is 2.6.9, but I see no updates to this function in BK-current.
How is total_scanned ever updated?  AFAICT it is always zero.

In mm/vmscan.c:balance_pgdat(), there are these references to total_scanned
(missing whitepace indicated by "^"):


 977:        int total_scanned, total_reclaimed;

 983:        total_scanned = 0;

1076:                        if (total_scanned > SWAP_CLUSTER_MAX * 2 &&
1077:                            total_scanned > total_reclaimed+total_reclaimed/2)
                                                               ^ ^             ^ ^

1088:                if (total_scanned && priority < DEF_PRIORITY - 2)


Could this be part of the problems with reclaim?  Or have I missed something?


--Chuck Ebbert  06-Nov-04  14:15:21

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-11-10 13:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-10  3:34 balance_pgdat(): where is total_scanned ever updated? Chuck Ebbert
  -- strict thread matches above, loose matches on Subject: below --
2004-11-07  5:02 Chuck Ebbert
2004-11-06 19:15 Chuck Ebbert
2004-11-07  0:11 ` Andrew Morton
2004-11-09 10:42   ` Marcelo Tosatti
2004-11-09 19:36     ` Andrew Morton
2004-11-09 18:02       ` Marcelo Tosatti
2004-11-09 21:40         ` Andrew Morton
2004-11-09 18:52           ` Marcelo Tosatti
2004-11-09 22:40             ` Andrew Morton
2004-11-10 13:24             ` Nikita Danilov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox