From: "Jan Beulich" <JBeulich@novell.com>
To: <netdev@vger.kernel.org>
Cc: <akpm@linux-foundation.org>
Subject: [PATCH] use total_highpages when calculating lowmem-only allocation sizes (decnet)
Date: Mon, 06 Dec 2010 16:43:04 +0000 [thread overview]
Message-ID: <4CFD20A8020000780002627E@vpn.id2.novell.com> (raw)
For those (large) table allocations that come only from lowmem, the
total amount of memory shouldn't really matter.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
net/decnet/dn_route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.37-rc4/net/decnet/dn_route.c
+++ 2.6.37-rc4-use-totalhigh_pages/net/decnet/dn_route.c
@@ -69,6 +69,7 @@
#include <linux/slab.h>
#include <net/sock.h>
#include <linux/mm.h>
+#include <linux/highmem.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/init.h>
@@ -1762,7 +1763,7 @@ void __init dn_route_init(void)
dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
add_timer(&dn_route_timer);
- goal = totalram_pages >> (26 - PAGE_SHIFT);
+ goal = (totalram_pages - totalhigh_pages) >> (26 - PAGE_SHIFT);
for(order = 0; (1UL << order) < goal; order++)
/* NOTHING */;
reply other threads:[~2010-12-06 16:43 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=4CFD20A8020000780002627E@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=akpm@linux-foundation.org \
--cc=netdev@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