page reclaim throttle v8
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | introduce get_vm_event()include/ mm/ | +22 | 0 replies | |
| 2/3 | change return type of shrink_zone()mm/ | +44 | 0 replies | |
| 3/3 | add throttle to shrink_zone()Documentation/ include/ include/ +4 more | +90 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Rik van Riel |
|---|---|
| 1/3 | A-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] page reclaim throttle v8
Signature · 108 lines
Hi,
This patch is latest page reclaim throttle patch.
changelog
========================================
v7 -> v8
o remove Kconfig parameter.
o merge throtte patch and sysctl parameter adding patch.
o add some patch description.
v6 -> v7
o rebase to 2.6.26-rc2-mm1
o get_vm_stat: make cpu-unplug safety.
o mark vm_max_nr_task_per_zone __read_mostly.
o add check __GFP_FS, __GFP_IO for avoid deadlock.
o fixed compile error on x86_64.
v5 -> v6
o rebase to 2.6.25-mm1
o use PGFREE statics instead wall time.
o separate function type change patch and introduce throttle patch.
v4 -> v5
o rebase to 2.6.25-rc8-mm1
v3 -> v4:
o fixed recursive shrink_zone problem.
o add last_checked variable in shrink_zone for
prevent corner case regression.
v2 -> v3:
o use wake_up() instead wake_up_all()
o max reclaimers can be changed Kconfig option and sysctl.
o some cleanups
v1 -> v2:
o make per zone throttle
background
=====================================
current VM implementation doesn't has limit of # of parallel reclaim.
when heavy workload, it bring to 2 bad things
- heavy lock contention
- unnecessary swap out
at end of last year, KAMEZAWA Hiroyuki proposed the patch of page
reclaim throttle and explain it improve reclaim time.
http://marc.info/?l=linux-mm&m=119667465917215&w=2
but unfortunately it works only memcgroup reclaim.
since, I implement it again for support global reclaim and mesure it.
benefit
=====================================
<<1. fixed a bug of incorrect OOM killer>>
if do following command, sometimes OOM killer happened.
(OOM happend about 10%)
$ ./hackbench 125 process 1000
because following bad scenario is happend.
1. memory shortage happend.
2. many task call shrink_zone() at the same time.
3. thus, All page are isolated from LRU at the same time.
4. if another task call shrink_zone(), it can't isolate any page from LRU.
5. Then, it cause reclaim failure and OOM killer.
my patch is solution for that problem directly.
<<2. performance improvement>>
I mesured performance by hackbench.
result number mean seconds (i.e. smaller is better)
improvement
num_group 2.6.26-rc8-mm1 + throttle ratio
-----------------------------------------------------------------
100 39.262 39.035
110 42.051 46.697
120 45.153 45.685
130 73.325 57.183
140 87.830 63.791
150 947.493 113.231 >800%
Why this patch imrove performance?
vanilla kernel get unstable performance at swap happend because
unnecessary swap out happend freqently.
this patch doesn't improvement best case, but be able to prevent worst case.
thus, The average performance of hackbench increase largely.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>