Repository navigation
Commit d2ebd0f
kswapd: avoid unnecessary rebalance after an unsuccessful balancing
In commit 215ddd6 ("mm: vmscan: only read new_classzone_idx from pgdat
when reclaiming successfully") , Mel Gorman said kswapd is better to sleep
after a unsuccessful balancing if there is tighter reclaim request pending
in the balancing. But in the following scenario, kswapd do something that
is not matched our expectation. The patch fixes this issue.
1, Read pgdat request A (classzone_idx, order = 3)
2, balance_pgdat()
3, During pgdat, a new pgdat request B (classzone_idx, order = 5) is placed
4, balance_pgdat() returns but failed since returned order = 0
5, pgdat of request A assigned to balance_pgdat(), and do balancing again.
While the expectation behavior of kswapd should try to sleep.
Signed-off-by: Alex Shi <alex.shi@intel.com>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Tested-by: Pádraig Brady <P@draigBrady.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 64212ec commit d2ebd0f
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2823 | 2823 | | |
2824 | 2824 | | |
2825 | 2825 | | |
| 2826 | + | |
2826 | 2827 | | |
| 2828 | + | |
2827 | 2829 | | |
2828 | 2830 | | |
2829 | 2831 | | |
| |||
2854 | 2856 | | |
2855 | 2857 | | |
2856 | 2858 | | |
| 2859 | + | |
2857 | 2860 | | |
| 2861 | + | |
2858 | 2862 | | |
2859 | 2863 | | |
2860 | 2864 | | |
| |||
2863 | 2867 | | |
2864 | 2868 | | |
2865 | 2869 | | |
2866 | | - | |
| 2870 | + | |
| 2871 | + | |
2867 | 2872 | | |
2868 | 2873 | | |
2869 | 2874 | | |
| |||
2878 | 2883 | | |
2879 | 2884 | | |
2880 | 2885 | | |
2881 | | - | |
| 2886 | + | |
| 2887 | + | |
2882 | 2888 | | |
2883 | 2889 | | |
2884 | 2890 | | |
| |||
2895 | 2901 | | |
2896 | 2902 | | |
2897 | 2903 | | |
2898 | | - | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
2899 | 2907 | | |
2900 | 2908 | | |
2901 | 2909 | | |
| |||
0 commit comments