From 3904a8357d945b32daf2ea555f7d1fbd57a35e7f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 2 Aug 2013 17:52:51 +0200 Subject: [PATCH] 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. --- sys/src/9/pc/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/src/9/pc/main.c b/sys/src/9/pc/main.c index ae78ed153..c85c4f23a 100644 --- a/sys/src/9/pc/main.c +++ b/sys/src/9/pc/main.c @@ -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;