lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] mm: deactivations shouldn't bias the LRU balance
On Tue, May 26, 2020 at 11:55:49AM -0400, Johannes Weiner wrote:
> > mm/swap.c: In function 'lru_deactivate_file_fn':
> > mm/swap.c:504:11: warning: variable 'file' set but not used
> > [-Wunused-but-set-variable]
> > int lru, file;
> > ^~~~
>
> Oops, my gcc doesn't warn about that, but yes, it's clearly dead code.

You will probably need W=1 to see that.

>
> $ make mm/swap.o
> GEN Makefile
> CALL /home/hannes/src/linux/linux/scripts/checksyscalls.sh
> CALL /home/hannes/src/linux/linux/scripts/atomic/check-atomics.sh
> DESCEND objtool
> CC mm/swap.o
> $
>
> > This?
> >
> > diff --git a/mm/swap.c b/mm/swap.c
> > index fedf5847dfdb..9c38c1b545af 100644
> > --- a/mm/swap.c
> > +++ b/mm/swap.c
> > @@ -501,7 +501,7 @@ void lru_cache_add_active_or_unevictable(struct page *page,
> > static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec,
> > void *arg)
> > {
> > - int lru, file;
> > + int lru;
> > bool active;
> >
> > if (!PageLRU(page))
> > @@ -515,7 +515,6 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec,
> > return;
> >
> > active = PageActive(page);
> > - file = page_is_file_lru(page);
> > lru = page_lru_base_type(page);
> >
> > del_page_from_lru_list(page, lruvec, lru + active);
>
> Looks good, and it appears Andrew has already queued it. Would you
> mind providing the Signed-off-by: for it?

Don't worry about that. I believe Andrew will squash it when sending to
Linus.

\
 
 \ /
  Last update: 2020-05-27 02:55    [W:0.050 / U:6.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site