lkml.org 
[lkml]   [2020]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 15/20] mm/swap: serialize memcg changes during pagevec_lru_move_fn
On Sat, Jul 04, 2020 at 07:34:59PM +0800, Alex Shi wrote:
> That's a great idea! Guess what the new struct we need would be like this?
> I like to try this. :)
>
>
> diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
> index 081d934eda64..d62778c8c184 100644
> --- a/include/linux/pagevec.h
> +++ b/include/linux/pagevec.h
> @@ -20,7 +20,7 @@
> struct pagevec {
> unsigned char nr;
> bool percpu_pvec_drained;
> - struct page *pages[PAGEVEC_SIZE];
> + struct list_head veclist;
> };

pagevecs are used not just for LRU. If you want to use a list_head for
LRU then define a new structure.

\
 
 \ /
  Last update: 2020-07-04 13:43    [W:0.110 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site