]> 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)
commitc60dd0ec5c816dc402ecd03dc944d0ae4815f8b0
tree086535609d830a29750ec9190ba7229c1ed9ed6a
parentfaff7b2be3d8f5918684260b672b020decaf8254
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