Re: [PATCH] mm: replace list_move_tail() with add_page_to_lru_list_tail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux