linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Yu Zhao <yuzhao@google.com>, 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
Subject: Re: [PATCH] mm: replace list_move_tail() with add_page_to_lru_list_tail()
Date: Thu, 25 Jul 2019 14:12:00 +0900	[thread overview]
Message-ID: <20190725051200.GA65392@google.com> (raw)
In-Reply-To: <20190724193249.00875235c4fa2495e0098451@linux-foundation.org>

Hi Andrew,

On Wed, Jul 24, 2019 at 07:32:49PM -0700, Andrew Morton wrote:
> 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?

It meant "normal deactivation from the pagevec full". The sentence is
very odd to me, too. ;-( 
Let's remove the weird comment in this chance.

Thanks.


      reply	other threads:[~2019-07-25  5:12 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
2019-07-25  5:12   ` Minchan Kim [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=20190725051200.GA65392@google.com \
    --to=minchan@kernel.org \
    --cc=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=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