lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Sep 2022 12:26:39 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Dawei Li <set_pte_at@...look.com>
Cc:     sj@...nel.org, damon@...ts.linux.dev, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/damon: improve damon_new_region strategy

On Mon, 12 Sep 2022 22:39:03 +0800 Dawei Li <set_pte_at@...look.com> wrote:

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

A dedicated slab cache should be faster and will also consume less
memory, due to better packing into the underlying pages.  So I redid
the changelog thusly:

: 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.

> +static int __init damon_init(void)
> +{
> +	damon_region_cache = kmem_cache_create("damon_region_cache", sizeof(struct damon_region),

Should be able to use just

	damon_region_cache = KMEM_CACHE(damon_region, 0);

here.  Please test that and send along a fixup patch?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ