在 2020/7/4 下午7:39, Matthew Wilcox 写道:
> 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.
>
yes, there are much page don't use page->lru, like slab etc. we need a new
struct.
Thanks!
Alex
- [PATCH v14 18/20] mm/vmscan: use relock for move_pag... Alex Shi
- [PATCH v14 19/20] mm/pgdat: remove pgdat lru_lock Alex Shi
- [PATCH v14 14/20] mm/mlock: reorder isolation sequen... Alex Shi
- [PATCH v14 04/20] mm/compaction: rename compact_defe... Alex Shi
- [PATCH v14 09/20] mm/swap: fold vm event PGROTATED i... Alex Shi
- [PATCH v14 11/20] mm/lru: move lock into lru_note_co... Alex Shi
- [PATCH v14 15/20] mm/swap: serialize memcg changes d... Alex Shi
- Re: [PATCH v14 15/20] mm/swap: serialize memcg ... Konstantin Khlebnikov
- Re: [PATCH v14 15/20] mm/swap: serialize me... Alex Shi
- Re: [PATCH v14 15/20] mm/swap: serializ... Matthew Wilcox
- Re: [PATCH v14 15/20] mm/swap: seri... Alex Shi
- Re: [PATCH v14 15/20] mm/swap:... Matthew Wilcox
- Re: [PATCH v14 15/20] mm/s... Alex Shi
- [PATCH v14 16/20] mm/lru: replace pgdat lru_lock wit... Alex Shi
- [PATCH v14 20/20] mm/lru: revise the comments of lru... Alex Shi
- [PATCH v14 02/20] mm/page_idle: no unlikely double c... Alex Shi

