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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260114053629.85750-1-lianux.mm@gmail.com>
Date: Wed, 14 Jan 2026 13:36:28 +0800
From: wang lian <lianux.mm@...il.com>
To: sj@...nel.org
Cc: akpm@...ux-foundation.org,
	damon@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	wang lian <lianux.mm@...il.com>
Subject: Re: [PATCH 08/11] mm/damon/lru_sort: support active:inactive memory ratio based auto-tuning


> Doing DAMOS_LRU_[DE]PRIO with DAMOS_QUOTA_[IN]ACTIVE_MEM_BP based quota
> auto-tuning can be easy and intuitive, compared to the manual
> [de]prioritization target access pattern thresholds tuning.  For
> example, users can ask DAMON to "find hot/cold pages and
> activate/deactivate those aiming 50:50 active:inactive memory size." But
> DAMON_LRU_SORT has no interface to do that.  Add a module parameter for
> setting the target ratio.

> Signed-off-by: SeongJae Park <sj@...nel.org>

```
> +static int damon_lru_sort_add_quota_goals(struct damos *hot_scheme,
> +		struct damos *cold_scheme)
> +{
> 	struct damos_quota_goal *goal;
> +
> +	if (!active_mem_bp)
> +		return 0;
> +	goal = damos_new_quota_goal(DAMOS_QUOTA_ACTIVE_MEM_BP, active_mem_bp);
> +	if (!goal)
> +		return -ENOMEM;
> +	damos_add_quota_goal(&hot_scheme->quota, goal);
> +	/* aim 0.2 % goal conflict, to keep little ping pong */
> +	goal = damos_new_quota_goal(DAMOS_QUOTA_INACTIVE_MEM_BP,
> +			10000 - active_mem_bp + 2);
> +	if (!goal)
> +		return -ENOMEM;
> +	damos_add_quota_goal(&hot_scheme->quota, goal);
> +	return 0;
> +}

The second goal (Inactive ratio target) is added to hot_scheme again. 
Should this be cold_scheme? Currently the cold_scheme parameter appears to be unused.

--
Best Regards,
wang lian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ