aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorZhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>2021-09-02 15:00:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-03 09:58:18 -0700
commit924a11bd1623787c6604590202e0920eb572fa42 (patch)
tree22fa646cde0be26e23cea6fe713d7840a26d1419 /mm
parentselftests: vm: add KSM merging time test (diff)
downloadlinux-dev-924a11bd1623787c6604590202e0920eb572fa42.tar.xz
linux-dev-924a11bd1623787c6604590202e0920eb572fa42.zip
selftests: vm: add COW time test for KSM pages
Since merged pages are copied every time they need to be modified, the write access time is different between shared and non-shared pages. Add ksm_cow_time() function which evaluates latency of these COW breaks. First, 4000 pages are allocated and the time, required to modify 1 byte in every other page, is measured. After this, the pages are merged into 2000 pairs and in each pair, 1 page is modified (i.e. they are decoupled) to detect COW breaks. The time needed to break COW of merged pages is then compared with performance of non-shared pages. The test is run as follows: ./ksm_tests -C The output: Total size: 15 MiB Not merged pages: Total time: 0.002185489 s Average speed: 3202.945 MiB/s Merged pages: Total time: 0.004386872 s Average speed: 1595.670 MiB/s Link: https://lkml.kernel.org/r/1d03ee0d1b341959d4b61672c6401d498bff5652.1629386192.git.zhansayabagdaulet@gmail.com Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com> Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions