Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755916AbbHDKki (ORCPT ); Tue, 4 Aug 2015 06:40:38 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:39557 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755405AbbHDKkg (ORCPT ); Tue, 4 Aug 2015 06:40:36 -0400 X-AuditID: cbfee691-f79ca6d00000456a-01-55c096a239ab From: Jaewon Kim To: akpm@linux-foundation.org Cc: mgorman@suse.de, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com, Jaewon Kim Subject: [PATCH v2] vmscan: fix increasing nr_isolated incurred by putback unevictable pages Date: Tue, 04 Aug 2015 19:40:08 +0900 Message-id: <1438684808-12707-1-git-send-email-jaewon31.kim@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLLMWRmVeSWpSXmKPExsVy+t8zHd1F0w6EGix/KWUxZ/0aNovuzTMZ LXrfv2KyuLxrDpvFvTX/WS0mv3vGaLHs63t2B3aPnbPusntsWtXJ5rHp0yR2jxMzfrN49G1Z xeix+XS1x+dNcgHsUVw2Kak5mWWpRfp2CVwZay7eZyrYz1Ex6dBy5gbGdvYuRk4OCQETiYaZ 9xkhbDGJC/fWs3UxcnEICaxklJiwex4rTNGXqTuYIRJLGSWOPL3DAuF8Z5R4P2M6G0gVm4C2 xPsFk8A6RARkJab+PQ9WxCwwh1FiwenTQDs4OIQF4iSmzDcDqWERUJU4d+Y4M4jNK+Ah8fHo a6gz5CROHpvMCtIrITCdXeLenB9MEA0CEt8mH2IBmSMBtGDTAWaIekmJgytusExgFFzAyLCK UTS1ILmgOCm9yFSvODG3uDQvXS85P3cTIySUJ+5gvH/A+hCjAAejEg+vwMv9oUKsiWXFlbmH GE2BNkxklhJNzgdGTF5JvKGxmZGFqYmpsZG5pZmSOK+O9M9gIYH0xJLU7NTUgtS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pyRaKjFXFScCABowUDXrQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1299 Lines: 38 reclaim_clean_pages_from_list() assumes that shrink_page_list() returns number of pages removed from the candidate list. But shrink_page_list() puts back mlocked pages without passing it to caller and without counting as nr_reclaimed. This incurrs increasing nr_isolated. To fix this, this patch changes shrink_page_list() to pass unevictable pages back to caller. Caller will take care those pages. Signed-off-by: Jaewon Kim --- Changes since v1 1/ changed subject from vmscan: reclaim_clean_pages_from_list() must count mlocked pages 2/ changed to return unevictable pages rather than returning the number of unevictable pages mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 5e8eadd..a4b2d07 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1157,7 +1157,7 @@ cull_mlocked: if (PageSwapCache(page)) try_to_free_swap(page); unlock_page(page); - putback_lru_page(page); + list_add(&page->lru, &ret_pages); continue; activate_locked: -- 1.9.1 -- 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/