> Here is the patch in question:>> diff --git a/mm/vmscan.c b/mm/vmscan.c> index 7592d8e..879d034 100644> --- a/mm/vmscan.c> +++ b/mm/vmscan.c> @@ -1570,7 +1570,7 @@ static void shrink_zone(int priority, struct zone *zone,> * Even if we did not try to evict anon pages at all, we want to> * rebalance the anon lru active/inactive ratio.> */> - if (inactive_anon_is_low(zone, sc))> + if (inactive_anon_is_low(zone, sc) && nr_swap_pages > 0)> shrink_active_list(SWAP_CLUSTER_MAX, zone, sc, priority, 0);>> throttle_vm_writeout(sc->gfp_mask);>> When this was discussed, I think we missed that nr_swap_pages can> actually get zero on swap systems as well and this should have been> total_swap_pages - otherwise we also stop balancing the two anon lists> when swap is _full_ which was not the intention of this change at all.>> [ There is another one hiding in shrink_zone() that does the same - it> was moved from get_scan_ratio() and is pretty old but we still kept> the inactive/active ratio halfway sane without MinChan's patch. ]>> This is from your OOM-run dmesg, David:>> Adding 32k swap on swapfile22. Priority:-21 extents:1 across:32k> Adding 32k swap on swapfile23. Priority:-22 extents:1 across:32k> Adding 32k swap on swapfile24. Priority:-23 extents:3 across:44k> Adding 32k swap on swapfile25. Priority:-24 extents:1 across:32k>> So we actually have swap? Or are those removed again before the OOM?

[grep to ltp source file]

ltp/testcases/kernel/syscalls/swapon/swapon03.c makes a lot of swap,but it was removed when the test exit.

Then, When OOM happed, David's system don't have any swap. I don't thinkyour patch strike the target, unfortunately.--To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at http://vger.kernel.org/majordomo-info.htmlPlease read the FAQ at http://www.tux.org/lkml/