--- c6325fad406d895b67e783666ccb4d48d8a0855d +++ c731b7d6bd7e2116660adfd772e62728f4721dd3 @@ -50,7 +50,7 @@ #include #include -#define MIN_FREESWAP_PAGES 2048 /* 8MB */ +#define MIN_FREESWAP_PAGES 8192 /* 32MB */ #define MIN_RECLAIM_PAGES 512 /* 2MB */ #define MIN_CSWAP_INTERVAL (10*HZ) /* 10 senconds */ @@ -395,6 +395,14 @@ inline void cancel_soft_reclaim(void) atomic_set(&s_reclaim.need_to_reclaim, 0); } +int get_soft_reclaim_status(void) +{ + int kcompcache_running = atomic_read(&s_reclaim.kcompcached_running); + if(kcompcache_running) + set_user_nice(s_reclaim.kcompcached, 0); + return kcompcache_running; +} + static int soft_reclaim(void) { int nid; @@ -444,6 +452,7 @@ static int do_compcache(void * nothing) atomic_set(&s_reclaim.kcompcached_running, 0); set_current_state(TASK_INTERRUPTIBLE); + set_user_nice(s_reclaim.kcompcached, 15); schedule(); }