do not limit kernelpercent IFF *imagemaxmb= is used on a cpu server

the heuristics that limits kernel memory on a cpu server to
a fixed amout (64MB + size for page tables) makes using devdraw
impractical.

if *imagemaxmb= is specified, we can assume that the draw device
will be used so we want to get a reasonable amount (30% default)
of kernel memory.
This commit is contained in:
cinap_lenrek 2013-08-02 17:52:51 +02:00
parent 1c379c1667
commit 3904a8357d

View file

@ -412,6 +412,7 @@ confinit(void)
* The patch of nimage is a band-aid, scanning the whole
* page list in imagereclaim just takes too long.
*/
if(getconf("*imagemaxmb") == 0)
if(kpages > (64*MB + conf.npage*sizeof(Page))/BY2PG){
kpages = (64*MB + conf.npage*sizeof(Page))/BY2PG;
conf.nimage = 2000;