Subject: + mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop.patch added to -mm tree To: jamieliu@xxxxxxxxxx,akinobu.mita@xxxxxxxxx,hughd@xxxxxxxxxx,minchan@xxxxxxxxxx,shli@xxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 22 Jan 2014 13:22:20 -0800 The patch titled Subject: mm/swapfile.c: do not skip lowest_bit in scan_swap_map() scan loop has been added to the -mm tree. Its filename is mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jamie Liu <jamieliu@xxxxxxxxxx> Subject: mm/swapfile.c: do not skip lowest_bit in scan_swap_map() scan loop In the second half of scan_swap_map()'s scan loop, offset is set to si->lowest_bit and then incremented before entering the loop for the first time, causing si->swap_map[si->lowest_bit] to be skipped. Signed-off-by: Jamie Liu <jamieliu@xxxxxxxxxx> Cc: Shaohua Li <shli@xxxxxxxxxxxx> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Akinobu Mita <akinobu.mita@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swapfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN mm/swapfile.c~mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop mm/swapfile.c --- a/mm/swapfile.c~mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop +++ a/mm/swapfile.c @@ -616,7 +616,7 @@ scan: } } offset = si->lowest_bit; - while (++offset < scan_base) { + while (offset < scan_base) { if (!si->swap_map[offset]) { spin_lock(&si->lock); goto checks; @@ -629,6 +629,7 @@ scan: cond_resched(); latency_ration = LATENCY_LIMIT; } + offset++; } spin_lock(&si->lock); _ Patches currently in -mm which might be from jamieliu@xxxxxxxxxx are mm-swapfilec-do-not-skip-lowest_bit-in-scan_swap_map-scan-loop.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html