pc kernel: give cpu servers as many image cache strctures as processes
This commit is contained in:
parent
5104934135
commit
a7f8ebca2f
|
@ -426,6 +426,7 @@ confinit(void)
|
||||||
if(userpcnt < 10)
|
if(userpcnt < 10)
|
||||||
userpcnt = 70;
|
userpcnt = 70;
|
||||||
kpages = conf.npage - (conf.npage*userpcnt)/100;
|
kpages = conf.npage - (conf.npage*userpcnt)/100;
|
||||||
|
conf.nimage = conf.nproc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hack for the big boys. Only good while physmem < 4GB.
|
* Hack for the big boys. Only good while physmem < 4GB.
|
||||||
|
@ -438,7 +439,6 @@ confinit(void)
|
||||||
if(getconf("*imagemaxmb") == 0)
|
if(getconf("*imagemaxmb") == 0)
|
||||||
if(kpages > (64*MB + conf.npage*sizeof(Page))/BY2PG){
|
if(kpages > (64*MB + conf.npage*sizeof(Page))/BY2PG){
|
||||||
kpages = (64*MB + conf.npage*sizeof(Page))/BY2PG;
|
kpages = (64*MB + conf.npage*sizeof(Page))/BY2PG;
|
||||||
conf.nimage = 2000;
|
|
||||||
kpages += (conf.nproc*KSTACK)/BY2PG;
|
kpages += (conf.nproc*KSTACK)/BY2PG;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -200,6 +200,7 @@ confinit(void)
|
||||||
if(userpcnt < 10)
|
if(userpcnt < 10)
|
||||||
userpcnt = 70;
|
userpcnt = 70;
|
||||||
kpages = conf.npage - (conf.npage*userpcnt)/100;
|
kpages = conf.npage - (conf.npage*userpcnt)/100;
|
||||||
|
conf.nimage = conf.nproc;
|
||||||
} else {
|
} else {
|
||||||
if(userpcnt < 10) {
|
if(userpcnt < 10) {
|
||||||
if(conf.npage*BY2PG < 16*MB)
|
if(conf.npage*BY2PG < 16*MB)
|
||||||
|
|
Loading…
Reference in a new issue