Messages in this thread | | | Date | Thu, 29 Oct 2020 10:00:20 -0400 | From | Johannes Weiner <> | Subject | Re: [PATCH v20 05/20] mm/thp: Simplify lru_add_page_tail() |
| |
On Thu, Oct 29, 2020 at 06:44:50PM +0800, Alex Shi wrote: > Simplify lru_add_page_tail(), there are actually only two cases possible: > split_huge_page_to_list(), with list supplied and head isolated from lru > by its caller; or split_huge_page(), with NULL list and head on lru - > because when head is racily isolated from lru, the isolator's reference > will stop the split from getting any further than its page_ref_freeze(). > > So decide between the two cases by "list", but add VM_WARN_ON()s to > verify that they match our lru expectations. > > [Hugh Dickins: rewrite commit log] > Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com> > Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > Acked-by: Hugh Dickins <hughd@google.com> > Cc: Kirill A. Shutemov <kirill@shutemov.name> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Johannes Weiner <hannes@cmpxchg.org> > Cc: Matthew Wilcox <willy@infradead.org> > Cc: Hugh Dickins <hughd@google.com> > Cc: Mika Penttilä <mika.penttila@nextfour.com> > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
| |