On Thu, Oct 29, 2020 at 06:44:52PM +0800, Alex Shi wrote: > We don't have to add a freeable page into lru and then remove from it. > This change saves a couple of actions and makes the moving more clear. > > The SetPageLRU needs to be kept before put_page_testzero for list > integrity, otherwise: > > #0 move_pages_to_lru #1 release_pages > if !put_page_testzero > if (put_page_testzero()) > !PageLRU //skip lru_lock > SetPageLRU() > list_add(&page->lru,) > list_add(&page->lru,) > > [[email protected]: coding style fixes] > Signed-off-by: Alex Shi <[email protected]> > Acked-by: Hugh Dickins <[email protected]> > Cc: Andrew Morton <[email protected]> > Cc: Johannes Weiner <[email protected]> > Cc: Tejun Heo <[email protected]> > Cc: Matthew Wilcox <[email protected]> > Cc: Hugh Dickins <[email protected]> > Cc: [email protected] > Cc: [email protected]
Acked-by: Johannes Weiner <[email protected]>

