linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	<linux-mm@kvack.org>, <cgroups@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Muchun Song <muchun.song@linux.dev>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/page_counter: Move calculating protection values to page_counter
Date: Wed, 10 Jul 2024 10:29:35 -0700	[thread overview]
Message-ID: <2594acbf-f2d5-43fc-9967-f3660a9c2c54@quicinc.com> (raw)
In-Reply-To: <20240703112510.36424-1-maarten.lankhorst@linux.intel.com>

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@linux.intel.com>
> Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> Acked-by: Shakeel Butt <shakeel.butt@linux.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)
> +{



      reply	other threads:[~2024-07-10 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03 11:25 Maarten Lankhorst
2024-07-10 17:29 ` Jeff Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2594acbf-f2d5-43fc-9967-f3660a9c2c54@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox