* [PATCH] use total_highpages when calculating lowmem-only allocation sizes (decnet)
@ 2010-12-06 16:43 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2010-12-06 16:43 UTC (permalink / raw)
To: netdev; +Cc: akpm
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 */;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-06 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 16:43 [PATCH] use total_highpages when calculating lowmem-only allocation sizes (decnet) Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox