> If anybody as a good idea to make this code auto-balancing,
> please let me know.
(I haven't seen even one suggestion posted.. must be a real bugger)
I haven't found any silver bullets ;) but the one line bend-adjust
below does help the cache problem a little on my wimpy 128mb box.
Worth trying out on other boxen with other loads? It doesn't get
swap in/out to a 1:1 ratio, but does improve it considerably by
scanning a larger portion of active pages prior to swapout.
(the other two lines are there only because it seemed reasonable;)
-Mike
against 2.4.2-ac4
--- mm/vmscan.c.org Mon Feb 26 09:31:46 2001
+++ mm/vmscan.c Mon Feb 26 16:32:46 2001
@@ -278,6 +278,8 @@
/* Always start by trying to penalize the process that is allocating memory */
if (mm)
retval = swap_out_mm(mm, swap_amount(mm));
+ if (retval)
+ return retval;
/* Then, look at the other mm's */
counter = (mmlist_nr << SWAP_SHIFT) >> priority;
@@ -846,7 +848,7 @@
* continue with its real work sooner. It also helps balancing when we
* have multiple processes in try_to_free_pages simultaneously.
*/
-#define DEF_PRIORITY (6)
+#define DEF_PRIORITY (2)
static int refill_inactive(unsigned int gfp_mask, int user)
{
int count, start_count, maxtry;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/