On Fri, Nov 06, 2020 at 09:17:43AM -0800, Tim Chen wrote: > > > > > +static inline unsigned pagevec_size(struct pagevec *pvec) > > +{ > > + return pvec->sz; > > +} > > + > > static inline unsigned pagevec_count(struct pagevec *pvec) > > { > > Willy, > > I was expecting pagevec_size to be used in pagevec_lookup_range* > where we hardcoded the pagevec's top range to look for pages > as PAGEVEC_SIZE. You define pagevec_size but seems like it is not used. > Or am I missing something? I have a number of changes already in that area that are currently in-flight. https://lore.kernel.org/linux-mm/20201026041408.25230-1-willy@xxxxxxxxxxxxx/ (although I should modify patch 9/12 to not use PAGEVEC_SIZE directly) I have some patches that I haven't bothered sending yet since I have so many other outstanding patches to do something similar to find_get_pages() / find_get_pages_range() / pagevec_lookup() / pagevec_lookup_range(). The trace you sent showed the problem being with the lru_add pagevec, and that's never used with the pagevec_lookup_* APIs (afaik), so I didn't see it as urgent to fix those.