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]
Message-ID: <2594acbf-f2d5-43fc-9967-f3660a9c2c54@quicinc.com>
Date: Wed, 10 Jul 2024 10:29:35 -0700
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        <linux-mm@...ck.org>, <cgroups@...r.kernel.org>,
        Andrew Morton
	<akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal
 Hocko <mhocko@...nel.org>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Shakeel
 Butt <shakeel.butt@...ux.dev>,
        Muchun Song <muchun.song@...ux.dev>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/page_counter: Move calculating protection values to
 page_counter

On 7/3/2024 4:25 AM, Maarten Lankhorst wrote:
> It's a lot of math, and there is nothing memcontrol specific about it.
> This makes it easier to use inside of the drm cgroup controller.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>
> Acked-by: Shakeel Butt <shakeel.butt@...ux.dev>
> ---
...
> +/**
> + * page_counter_calculate_protection - check if memory consumption is in the normal range
> + * @root: the top ancestor of the sub-tree being checked
> + * @memcg: the memory cgroup to check

need to document @counter instead

mm/page_counter.c:400: warning: Function parameter or struct member 'counter' not described in 'page_counter_calculate_protection'
mm/page_counter.c:400: warning: Excess function parameter 'memcg' description in 'page_counter_calculate_protection'

> + * @recursive_protection: Whether to use memory_recursiveprot behavior.
> + *
> + * Calculates elow/emin thresholds for given page_counter.
> + *
> + * WARNING: This function is not stateless! It can only be used as part
> + *          of a top-down tree iteration, not for isolated queries.
> + */
> +void page_counter_calculate_protection(struct page_counter *root,
> +				       struct page_counter *counter,
> +				       bool recursive_protection)
> +{


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ