From: Andrew Morton <akpm@linux-foundation.org>
To: Yu Zhao <yuzhao@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Dan Williams <dan.j.williams@intel.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>, Peng Fan <peng.fan@nxp.com>,
Ira Weiny <ira.weiny@intel.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm: replace list_move_tail() with add_page_to_lru_list_tail()
Date: Wed, 24 Jul 2019 19:32:49 -0700 [thread overview]
Message-ID: <20190724193249.00875235c4fa2495e0098451@linux-foundation.org> (raw)
In-Reply-To: <20190716212436.7137-1-yuzhao@google.com>
On Tue, 16 Jul 2019 15:24:36 -0600 Yu Zhao <yuzhao@google.com> wrote:
> This is a cleanup patch that replaces two historical uses of
> list_move_tail() with relatively recent add_page_to_lru_list_tail().
>
Looks OK to me.
> --- a/mm/swap.c
> +++ b/mm/swap.c
> @@ -515,7 +515,6 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec,
> del_page_from_lru_list(page, lruvec, lru + active);
> ClearPageActive(page);
> ClearPageReferenced(page);
> - add_page_to_lru_list(page, lruvec, lru);
>
> if (PageWriteback(page) || PageDirty(page)) {
> /*
> @@ -523,13 +522,14 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec,
> * It can make readahead confusing. But race window
> * is _really_ small and it's non-critical problem.
> */
> + add_page_to_lru_list(page, lruvec, lru);
> SetPageReclaim(page);
> } else {
> /*
> * The page's writeback ends up during pagevec
> * We moves tha page into tail of inactive.
> */
That comment is really hard to follow. Minchan, can you please explain
the first sentence?
The second sentence can simply be removed.
> - list_move_tail(&page->lru, &lruvec->lists[lru]);
> + add_page_to_lru_list_tail(page, lruvec, lru);
> __count_vm_event(PGROTATED);
> }
next prev parent reply other threads:[~2019-07-25 2:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 21:24 Yu Zhao
2019-07-25 2:32 ` Andrew Morton [this message]
2019-07-25 5:12 ` Minchan Kim
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=20190724193249.00875235c4fa2495e0098451@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mchehab+samsung@kernel.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=peng.fan@nxp.com \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yuzhao@google.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
all inboxes | Powered by JetHome®