@@ -4271,7 +4271,7 @@ static bool inc_min_seq(struct lruvec *lruvec, int type, bool can_swap)
4271
4271
4272
4272
/* prevent cold/hot inversion if force_scan is true */
4273
4273
for (zone = 0 ; zone < MAX_NR_ZONES ; zone ++ ) {
4274
- struct list_head * head = & lrugen -> lists [old_gen ][type ][zone ];
4274
+ struct list_head * head = & lrugen -> folios [old_gen ][type ][zone ];
4275
4275
4276
4276
while (!list_empty (head )) {
4277
4277
struct folio * folio = lru_to_folio (head );
@@ -4282,7 +4282,7 @@ static bool inc_min_seq(struct lruvec *lruvec, int type, bool can_swap)
4282
4282
VM_WARN_ON_ONCE_FOLIO (folio_zonenum (folio ) != zone , folio );
4283
4283
4284
4284
new_gen = folio_inc_gen (lruvec , folio , false);
4285
- list_move_tail (& folio -> lru , & lrugen -> lists [new_gen ][type ][zone ]);
4285
+ list_move_tail (& folio -> lru , & lrugen -> folios [new_gen ][type ][zone ]);
4286
4286
4287
4287
if (!-- remaining )
4288
4288
return false;
@@ -4310,7 +4310,7 @@ static bool try_to_inc_min_seq(struct lruvec *lruvec, bool can_swap)
4310
4310
gen = lru_gen_from_seq (min_seq [type ]);
4311
4311
4312
4312
for (zone = 0 ; zone < MAX_NR_ZONES ; zone ++ ) {
4313
- if (!list_empty (& lrugen -> lists [gen ][type ][zone ]))
4313
+ if (!list_empty (& lrugen -> folios [gen ][type ][zone ]))
4314
4314
goto next ;
4315
4315
}
4316
4316
@@ -4775,7 +4775,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, int tier_idx)
4775
4775
4776
4776
/* promoted */
4777
4777
if (gen != lru_gen_from_seq (lrugen -> min_seq [type ])) {
4778
- list_move (& folio -> lru , & lrugen -> lists [gen ][type ][zone ]);
4778
+ list_move (& folio -> lru , & lrugen -> folios [gen ][type ][zone ]);
4779
4779
return true;
4780
4780
}
4781
4781
@@ -4784,7 +4784,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, int tier_idx)
4784
4784
int hist = lru_hist_from_seq (lrugen -> min_seq [type ]);
4785
4785
4786
4786
gen = folio_inc_gen (lruvec , folio , false);
4787
- list_move_tail (& folio -> lru , & lrugen -> lists [gen ][type ][zone ]);
4787
+ list_move_tail (& folio -> lru , & lrugen -> folios [gen ][type ][zone ]);
4788
4788
4789
4789
WRITE_ONCE (lrugen -> protected [hist ][type ][tier - 1 ],
4790
4790
lrugen -> protected [hist ][type ][tier - 1 ] + delta );
@@ -4796,7 +4796,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, int tier_idx)
4796
4796
if (folio_test_locked (folio ) || folio_test_writeback (folio ) ||
4797
4797
(type == LRU_GEN_FILE && folio_test_dirty (folio ))) {
4798
4798
gen = folio_inc_gen (lruvec , folio , true);
4799
- list_move (& folio -> lru , & lrugen -> lists [gen ][type ][zone ]);
4799
+ list_move (& folio -> lru , & lrugen -> folios [gen ][type ][zone ]);
4800
4800
return true;
4801
4801
}
4802
4802
@@ -4863,7 +4863,7 @@ static int scan_folios(struct lruvec *lruvec, struct scan_control *sc,
4863
4863
for (zone = sc -> reclaim_idx ; zone >= 0 ; zone -- ) {
4864
4864
LIST_HEAD (moved );
4865
4865
int skipped = 0 ;
4866
- struct list_head * head = & lrugen -> lists [gen ][type ][zone ];
4866
+ struct list_head * head = & lrugen -> folios [gen ][type ][zone ];
4867
4867
4868
4868
while (!list_empty (head )) {
4869
4869
struct folio * folio = lru_to_folio (head );
@@ -5264,7 +5264,7 @@ static bool __maybe_unused state_is_valid(struct lruvec *lruvec)
5264
5264
int gen , type , zone ;
5265
5265
5266
5266
for_each_gen_type_zone (gen , type , zone ) {
5267
- if (!list_empty (& lrugen -> lists [gen ][type ][zone ]))
5267
+ if (!list_empty (& lrugen -> folios [gen ][type ][zone ]))
5268
5268
return false;
5269
5269
}
5270
5270
}
@@ -5309,7 +5309,7 @@ static bool drain_evictable(struct lruvec *lruvec)
5309
5309
int remaining = MAX_LRU_BATCH ;
5310
5310
5311
5311
for_each_gen_type_zone (gen , type , zone ) {
5312
- struct list_head * head = & lruvec -> lrugen .lists [gen ][type ][zone ];
5312
+ struct list_head * head = & lruvec -> lrugen .folios [gen ][type ][zone ];
5313
5313
5314
5314
while (!list_empty (head )) {
5315
5315
bool success ;
@@ -5843,7 +5843,7 @@ void lru_gen_init_lruvec(struct lruvec *lruvec)
5843
5843
lrugen -> timestamps [i ] = jiffies ;
5844
5844
5845
5845
for_each_gen_type_zone (gen , type , zone )
5846
- INIT_LIST_HEAD (& lrugen -> lists [gen ][type ][zone ]);
5846
+ INIT_LIST_HEAD (& lrugen -> folios [gen ][type ][zone ]);
5847
5847
5848
5848
lruvec -> mm_state .seq = MIN_NR_GENS ;
5849
5849
init_waitqueue_head (& lruvec -> mm_state .wait );
0 commit comments