From: Johannes Weiner <hannes@cmpxchg.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: guro@fb.com, mhocko@kernel.org, akpm@linux-foundation.org,
shakeelb@google.com, vdavydov.dev@gmail.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
duanxiongchun@bytedance.com
Subject: Re: [PATCH v2 5/8] mm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec
Date: Fri, 16 Apr 2021 11:20:49 -0400 [thread overview]
Message-ID: <YHmrUaho1SLSCfk7@cmpxchg.org> (raw)
In-Reply-To: <20210416051407.54878-6-songmuchun@bytedance.com>
On Fri, Apr 16, 2021 at 01:14:04PM +0800, Muchun Song wrote:
> lruvec_holds_page_lru_lock() doesn't check anything about locking and is
> used to check whether the page belongs to the lruvec. So rename it to
> page_matches_lruvec().
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
The rename makes sense, since the previous name was defined by a
specific use case rather than what it does. That said, it did imply a
lock context that makes the test result stable. Without that the
function could use a short comment, IMO. How about:
/* Test requires a stable page->memcg binding, see page_memcg() */
With that,
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2021-04-16 15:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 5:13 [PATCH v2 0/8] memcontrol code cleanup and simplification Muchun Song
2021-04-16 5:14 ` [PATCH v2 1/8] mm: memcontrol: fix page charging in page replacement Muchun Song
2021-04-16 5:14 ` [PATCH v2 2/8] mm: memcontrol: bail out early when !mm in get_mem_cgroup_from_mm Muchun Song
2021-04-16 5:14 ` [PATCH v2 3/8] mm: memcontrol: remove the pgdata parameter of mem_cgroup_page_lruvec Muchun Song
2021-04-16 5:14 ` [PATCH v2 4/8] mm: memcontrol: simplify lruvec_holds_page_lru_lock Muchun Song
2021-04-16 5:14 ` [PATCH v2 5/8] mm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec Muchun Song
2021-04-16 6:01 ` Michal Hocko
2021-04-16 15:20 ` Johannes Weiner [this message]
2021-04-17 2:52 ` [External] " Muchun Song
2021-04-16 15:34 ` Shakeel Butt
2021-04-16 5:14 ` [PATCH v2 6/8] mm: memcontrol: simplify the logic of objcg pinning memcg Muchun Song
2021-04-16 5:14 ` [PATCH v2 7/8] mm: memcontrol: move obj_cgroup_uncharge_pages() out of css_set_lock Muchun Song
2021-04-16 5:14 ` [PATCH v2 8/8] mm: vmscan: remove noinline_for_stack Muchun Song
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=YHmrUaho1SLSCfk7@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=duanxiongchun@bytedance.com \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shakeelb@google.com \
--cc=songmuchun@bytedance.com \
--cc=vdavydov.dev@gmail.com \
/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