Why is default value of NKPT so small? mfsroot

View: New views
3 Messages — Rating Filter:   Alert me  

Why is default value of NKPT so small? mfsroot

by Travis Daygale :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anyone know what the thinking is behind the default value of NKTP in /usr/src/sys/i386/include/pmap.h?

It seems to me that it's too small, though I'm wondering if there are some considerations in changing it's value that I should know about.

Too small because: making it a little more than twice as large (so you can get about a 300MB mfsroot to boot) means you can (by default) boot a standard FreeBSD system into memory, and I know I can't be the only one who would value that a great deal for many reasons.  As it stands you have to ax things out (like depenguinator does, for example).  Or you have to recompile the kernel.  

Does it have to be like this?

Which leads me to two more questions:
- is it possible to change the NKTP value without recompiling the kernel?  I think there isn't but I'll ask.
- is it possible to change the NKTP value without editing pmap.h (can I pass a variable into the kernel build process)?


Thanks,

Trever


     
_______________________________________________
freebsd-hackers@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@..."

Re: Why is default value of NKPT so small? mfsroot

by Gary Jennejohn-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 6 Nov 2009 11:19:51 -0800 (PST)
Trever <anti_spamsys@...> wrote:

> Does anyone know what the thinking is behind the default value of NKTP in /usr/src/sys/i386/include/pmap.h?
>

Seems to be based on the maximum amount of usable memory.  If you define
PAE then it's set to 240.

For AMD64 it's set to 32.

> Which leads me to two more questions:
> - is it possible to change the NKTP value without recompiling the kernel?  I think there isn't but I'll ask.

No.

> - is it possible to change the NKTP value without editing pmap.h (can I pass a variable into the kernel build process)?
>

Well, the header files all semm to have "#ifndef NKPT" in them.  Try doing
"NKPT=xxx;export NKPT" before compiling the kernel and see what happens.

---
Gary Jennejohn
_______________________________________________
freebsd-hackers@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@..."

Re: Why is default value of NKPT so small? mfsroot

by John Baldwin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 06 November 2009 2:19:51 pm Trever wrote:

> Does anyone know what the thinking is behind the default value of NKTP in /usr/src/sys/i386/include/pmap.h?
>
> It seems to me that it's too small, though I'm wondering if there are some considerations in changing it's value that I should know about.
>
> Too small because: making it a little more than twice as large (so you can get about a 300MB mfsroot to boot) means you can (by default) boot a standard FreeBSD system into memory, and I know I can't be the only one who would value that a great deal for many reasons.  As it stands you have to ax things out (like depenguinator does, for example).  Or you have to recompile the kernel.  
>
> Does it have to be like this?
>
> Which leads me to two more questions:
> - is it possible to change the NKTP value without recompiling the kernel?  I think there isn't but I'll ask.
> - is it possible to change the NKTP value without editing pmap.h (can I pass a variable into the kernel build process)?

I keep meaning to make NKPT a kernel option for i386.  Try this patch, it
should let you add 'options NKPT=xxx' to your kernel config.

Index: conf/options.i386
===================================================================
--- conf/options.i386 (revision 198997)
+++ conf/options.i386 (working copy)
@@ -12,6 +12,7 @@
 MAXMEM
 MPTABLE_FORCE_HTT
 MP_WATCHDOG
+NKPT opt_pmap.h
 PERFMON
 PMAP_SHPGPERPROC opt_pmap.h
 POWERFAIL_NMI opt_trap.h
Index: i386/i386/mp_machdep.c
===================================================================
--- i386/i386/mp_machdep.c (revision 198997)
+++ i386/i386/mp_machdep.c (working copy)
@@ -30,6 +30,7 @@
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
 #include "opt_mp_watchdog.h"
+#include "opt_pmap.h"
 #include "opt_sched.h"
 #include "opt_smp.h"
 
Index: i386/xen/mp_machdep.c
===================================================================
--- i386/xen/mp_machdep.c (revision 198997)
+++ i386/xen/mp_machdep.c (working copy)
@@ -31,6 +31,7 @@
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
 #include "opt_mp_watchdog.h"
+#include "opt_pmap.h"
 #include "opt_sched.h"
 #include "opt_smp.h"
 

--
John Baldwin
_______________________________________________
freebsd-hackers@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@..."