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....@linux.alibaba.com>
> Reviewed-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com>
> Acked-by: Hugh Dickins <hu...@google.com>
> Cc: Kirill A. Shutemov <kir...@shutemov.name>
> Cc: Andrew Morton <a...@linux-foundation.org>
> Cc: Johannes Weiner <han...@cmpxchg.org>
> Cc: Matthew Wilcox <wi...@infradead.org>
> Cc: Hugh Dickins <hu...@google.com>
> Cc: Mika Penttilä <mika.pentt...@nextfour.com>
> Cc: linux...@kvack.org
> Cc: linux-kernel@vger.kernel.org

Acked-by: Johannes Weiner <han...@cmpxchg.org>

Reply via email to