Re: swapping and the value of /proc/sys/vm/swappiness
From: Ray Bryant <hidden>
Date: 2004-09-29 04:19:27
Also in:
lkml
Nick Piggin wrote:
Nick Piggin wrote:quoted
Thanks Ray. From looking over your old results, it appears that -kswapdfix probably has the nicest swappiness ramp, which is probably to be expected, as the problem that is being fixed did exist in all other kernels you tested, but the later ones just had other aggrivating changes. The swappiness=60 weirdness might just be some obscure interaction with the workload. If that is the case, it is probably not too important, however it could be due to a possible oversight in my patch....Here is a patch on top of the last one - if you can give it a test some time, that would be great. Thanks Nick
Nick, I'll put it on my list of TODO's. FYI, a full test like the ones I have been running, at 6 swappiness levels, takes around 5 hours of machine time, so it sometimes we have to wait for a slot that big to open up. :-) Ray
quoted hunk ↗ jump to hunk
------------------------------------------------------------------------ --- linux-2.6-npiggin/mm/vmscan.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff -puN mm/vmscan.c~vm-no-wild-kswapd2 mm/vmscan.c--- linux-2.6/mm/vmscan.c~vm-no-wild-kswapd2 2004-09-29 10:30:49.000000000 +1000 +++ linux-2.6-npiggin/mm/vmscan.c 2004-09-29 10:34:00.000000000 +1000@@ -991,6 +991,7 @@ out: static int balance_pgdat(pg_data_t *pgdat, int nr_pages) { int to_free = nr_pages; + int all_zones_ok; int priority; int i; int total_scanned, total_reclaimed;@@ -1013,10 +1014,11 @@ loop_again: } for (priority = DEF_PRIORITY; priority >= 0; priority--) { - int all_zones_ok = 1; int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ unsigned long lru_pages = 0; + all_zones_ok = 1; + if (nr_pages == 0) { /* * Scan in the highmem->dma direction for the highest@@ -1106,7 +1108,7 @@ scan: * on zone->*_priority. */ if (total_reclaimed >= SWAP_CLUSTER_MAX) - goto loop_again; + break; } out: for (i = 0; i < pgdat->nr_zones; i++) {@@ -1114,6 +1116,9 @@ out: zone->prev_priority = zone->temp_priority; } + if (!all_zones_ok) + goto loop_again; + return total_reclaimed; }_
--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@sgi.com raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>