[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.6.0-test7-mm1



Hi Andrew,

On Wednesday 15 October 2003 10:36, Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test7/2
>.6.0-test7-mm1
  ~~ snip ~~
> +scale-min_free_kbytes.patch
>
>  Scale min_free_kbytes according to machine size.

This patch actually doesn't work, as is uses nr_free_buffer_pages() before the 
zonelists are set up. So min_free_kbytes is always set to 128.

The attached fix works here without a problem, but I'm not sure it doesn't 
break anything...

Regards
   Thomas

P.S.: 1. I've got a ported memsetup-fix from the 2.4 tree, if you want I could 
send it to you.
2. Should we consider replacing the bogus int_sqrt() with the fb_sqrt() 
version? (btw. it is always exact) We could place it somewhere central, so it 
can be used from any place...
--- linux-2.6.0-test7-mm1/init/main.c.orig	Sat Oct 18 19:20:14 2003
+++ linux-2.6.0-test7-mm1/init/main.c	Sat Oct 18 18:58:26 2003
@@ -396,7 +396,6 @@
 	lock_kernel();
 	printk(linux_banner);
 	setup_arch(&command_line);
-	init_per_zone_pages_min();
 	setup_per_cpu_areas();
 
 	/*
@@ -406,6 +405,7 @@
 	smp_prepare_boot_cpu();
 
 	build_all_zonelists();
+	init_per_zone_pages_min();
 	page_alloc_init();
 	printk("Kernel command line: %s\n", saved_command_line);
 	parse_args("Booting kernel", command_line, __start___param,

signature