public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: balance_pgdat(): where is total_scanned ever updated?
Date: Sun, 7 Nov 2004 00:02:06 -0500	[thread overview]
Message-ID: <200411070004_MC3-1-8E11-3F5D@compuserve.com> (raw)

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

             reply	other threads:[~2004-11-07  5:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-07  5:02 Chuck Ebbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-10  3:34 balance_pgdat(): where is total_scanned ever updated? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411070004_MC3-1-8E11-3F5D@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox