From: Andy Whitcroft <apw@shadowen.org>
To: apkm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] vm_dirty_ration goes to zero
Date: Mon, 18 Oct 2004 21:37:59 +0100 [thread overview]
Message-ID: <E1CJeGV-0000f4-LB@ladymac.shadowen.org> (raw)
When a 32 system has a very large imbalance of overall memory size
to ZONE_NORMAL (for example when large amounts of numa remap space
are in use) page_writeback_init() may incorrectly set vm_dirty_ratio
and dirty_background_ratio to zero; leading to divide by zero errors
elsewhere. This patch bounds these at 1%.
Revision: $Rev: 721 $
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
diffstat 500-vm_dirty_ratio-goes-to-zero
---
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/mm/page-writeback.c current/mm/page-writeback.c
--- reference/mm/page-writeback.c
+++ current/mm/page-writeback.c
@@ -506,6 +506,11 @@ void __init page_writeback_init(void)
dirty_background_ratio /= 100;
vm_dirty_ratio *= correction;
vm_dirty_ratio /= 100;
+
+ if (dirty_background_ratio <= 0)
+ dirty_background_ratio = 1;
+ if (vm_dirty_ratio <= 0)
+ vm_dirty_ratio = 1;
}
mod_timer(&wb_timer, jiffies + (dirty_writeback_centisecs * HZ) / 100);
set_ratelimit();
reply other threads:[~2004-10-18 20:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1CJeGV-0000f4-LB@ladymac.shadowen.org \
--to=apw@shadowen.org \
--cc=apkm@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
all inboxes | Powered by JetHome®