]> git.baikalelectronics.ru Git - kernel.git/commit
mm/damon: improve damon_new_region strategy
authorDawei Li <set_pte_at@outlook.com>
Mon, 12 Sep 2022 14:39:03 +0000 (22:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:09 +0000 (14:03 -0700)
commit937b0c0c90a969302b12c38866e21485bc5248e7
tree086535609d830a29750ec9190ba7229c1ed9ed6a
parent646b24beaa11d7512cb2922c7fd9213db8c4f6d9
mm/damon: improve damon_new_region strategy

Kdamond is implemented as a periodical split-merge pattern, which will
create and destroy regions possibly at high frequency (hundreds or even
thousands of per sec), depending on the number of regions and aggregation
period.  In that case, kmalloc and kfree could bring speed and space
overheads, which can be improved by using a private kmem cache.

[set_pte_at@outlook.com: creating kmem cache for damon regions by KMEM_CACHE()]
Link: https://lkml.kernel.org/r/Message-ID:
Link: https://lkml.kernel.org/r/TYCP286MB2323DA1894FA55BB9CF90978CA449@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Dawei Li <set_pte_at@outlook.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c