[Devel] [PATCH] target: pass a device name to an alua user helper

2018-01-29 Thread Andrei Vagin
Now the helper is executed with this list of arguments: TG_PT_Group ID prev_state new_state {explicit/implicit} dev_name For exmaple: default_tg_pt_gp 0 Active/Optimized Standby explicit iqn.2014-06.com.vstorage:test-2 Signed-off-by: Andrei Vagin ---

[Devel] [PATCH RH7 RFC] mm/softdirty: reset soft-dirty tracking on fork

2018-01-29 Thread Pavel Tikhomirov
When a new task forked we leave soft-dirty bits on vmas and ptes unchanged, so if we do iterative checkpoint-restore we will see soft-clean memory for a process forked in target subtree between two iterative checkpoints. Imagine situation: 1. We have a task P and it has local variable V which

[Devel] [PATCH rh7 3/7] ms/mm, vmscan: enhance mm_vmscan_lru_shrink_inactive tracepoint

2018-01-29 Thread Andrey Ryabinin
From: Michal Hocko mm_vmscan_lru_shrink_inactive will currently report the number of scanned and reclaimed pages. This doesn't give us an idea how the reclaim went except for the overall effectiveness though. Export and show other counters which will tell us why we couldn't

[Devel] [PATCH] target: pass a device name to an alua user helper

2018-01-29 Thread Andrei Vagin
Now the helper is executed with this list of arguments: TG_PT_Group ID prev_state new_state {explicit/implicit} dev_name For exmaple: default_tg_pt_gp 0 Active/Optimized Standby explicit iqn.2014-06.com.vstorage:test-2 Signed-off-by: Andrei Vagin ---

[Devel] [PATCH rh7 4/7] ms/mm: throttle on IO only when there are too many dirty and writeback pages

2018-01-29 Thread Andrey Ryabinin
From: Michal Hocko wait_iff_congested has been used to throttle allocator before it retried another round of direct reclaim to allow the writeback to make some progress and prevent reclaim from looping over dirty/writeback pages without making any progress. We used to do

[Devel] [PATCH rh7 2/7] ms/mm, vmscan: extract shrink_page_list reclaim counters into a struct

2018-01-29 Thread Andrey Ryabinin
From: Michal Hocko shrink_page_list returns quite some counters back to its caller. Extract the existing 5 into struct reclaim_stat because this makes the code easier to follow and also allows further counters to be returned. While we are at it, make all of them unsigned rather

[Devel] [PATCH rh7 1/7] ms/mm, vmscan: add active list aging tracepoint

2018-01-29 Thread Andrey Ryabinin
From: Michal Hocko Our reclaim process has several tracepoints to tell us more about how things are progressing. We are, however, missing a tracepoint to track active list aging. Introduce mm_vmscan_lru_shrink_active which reports the number of - nr_taken is number of

[Devel] [PATCH rh7 6/7] mm/vmscan: Use per-zone sum of reclaim_stat to change zone state.

2018-01-29 Thread Andrey Ryabinin
Currently we collect reclaim stats per-lru list and set zone flags based on these stats. This seems wrong, as lrus a per-memcg thus one zone could have hundreds of them. Move all that zone-related logic from shrink_inactive_list() to shrink_zone, and make decisions based on per-zone sum of

[Devel] [PATCH rh7 5/7] mm/vmscan: collect reclaim stats across zone

2018-01-29 Thread Andrey Ryabinin
Currently we collect reclaim stats per-lru list and set zone flags based on these stats. This seems wrong, as lrus a per-memcg thus one zone could have hundreds of them. So add reclaim_stats pointer into shrink_control struct and sum counters we need while iterating lrus in zone. Don't use them

[Devel] [PATCH rh7 7/7] mm/vmscan: call wait_iff_congested() only if we have troubles in recaliming

2018-01-29 Thread Andrey Ryabinin
Even if zone congested it might be better to continue reclaim as we may allocate memory from another zone. So call in wait_iff_congested() only if we have troubles in reclaiming memory. https://jira.sw.ru/browse/PSBM-61409 Signed-off-by: Andrey Ryabinin --- mm/vmscan.c