pc kernel: give cpu servers as many image cache strctures as processes

This commit is contained in:
cinap_lenrek 2017-03-11 16:28:11 +01:00
parent 5104934135
commit a7f8ebca2f
2 changed files with 2 additions and 1 deletions

View file

@ -426,6 +426,7 @@ confinit(void)
if(userpcnt < 10)
userpcnt = 70;
kpages = conf.npage - (conf.npage*userpcnt)/100;
conf.nimage = conf.nproc;
/*
* Hack for the big boys. Only good while physmem < 4GB.
@ -438,7 +439,6 @@ confinit(void)
if(getconf("*imagemaxmb") == 0)
if(kpages > (64*MB + conf.npage*sizeof(Page))/BY2PG){
kpages = (64*MB + conf.npage*sizeof(Page))/BY2PG;
conf.nimage = 2000;
kpages += (conf.nproc*KSTACK)/BY2PG;
}
} else {

View file

@ -200,6 +200,7 @@ confinit(void)
if(userpcnt < 10)
userpcnt = 70;
kpages = conf.npage - (conf.npage*userpcnt)/100;
conf.nimage = conf.nproc;
} else {
if(userpcnt < 10) {
if(conf.npage*BY2PG < 16*MB)