[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200302141144.b30abe0d89306fd387e13a92@linux-foundation.org>
Date: Mon, 2 Mar 2020 14:11:44 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: cgroups@...r.kernel.org, mgorman@...hsingularity.net,
tj@...nel.org, hughd@...gle.com, khlebnikov@...dex-team.ru,
daniel.m.jordan@...cle.com, yang.shi@...ux.alibaba.com,
willy@...radead.org, hannes@...xchg.org, lkp@...el.com,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v9 07/20] mm/lru: introduce TestClearPageLRU
On Mon, 2 Mar 2020 19:00:17 +0800 Alex Shi <alex.shi@...ux.alibaba.com> wrote:
> Combined PageLRU check and ClearPageLRU into one function by new
> introduced func TestClearPageLRU. This function will be used as page
> isolation precondition.
>
> No functional change yet.
>
> ...
>
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2588,9 +2588,8 @@ static void commit_charge(struct page *page, struct mem_cgroup *memcg,
> pgdat = page_pgdat(page);
> spin_lock_irq(&pgdat->lru_lock);
>
> - if (PageLRU(page)) {
> + if (TestClearPageLRU(page)) {
> lruvec = mem_cgroup_page_lruvec(page, pgdat);
> - ClearPageLRU(page);
> del_page_from_lru_list(page, lruvec, page_lru(page));
> } else
The code will now get exclusive access of the page->flags cacheline and
will dirty that cacheline, even for !PageLRU() pages. What is the
performance impact of this?
Powered by blists - more mailing lists