From: David Hildenbrand Subject: Re: [PATCH v2 5/7] mm: thp: split huge page to any lower order pages. Date: Tue, 8 Aug 2023 11:01:19 +0200 Message-ID: References: <20230329011712.3242298-1-zi.yan@sent.com> <20230329011712.3242298-6-zi.yan@sent.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691510601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=shf77ttmFOuwEPRuUfK1N01vHtXf9AN1dtY0xeqDGqo=; b=cKSmuAPLhLy0qmt+d0sVjk6Pa+cyD0Y3TksVjrhUC3KnJOyLgTk2Ekjj3jJnnOJutSioJF uO2DO5CX6O7lR5hMBqUzN5XRngm0pvrRCsPEfcFgE8eXLT71CtIsb8g+/KVsLyd45Q4Lp0 pvMeBk8s7EJ+PamdoVjCfmZhQYfkb3I= Content-Language: en-US In-Reply-To: <20230329011712.3242298-6-zi.yan-vRdzynncJC4@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Zi Yan , "Matthew Wilcox (Oracle)" , Yang Shi , Yu Zhao , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org Cc: "Kirill A . Shutemov" , Ryan Roberts , =?UTF-8?Q?Michal_Koutn=c3=bd?= , Roman Gushchin , Zach O'Keefe , Andrew Morton , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 29.03.23 03:17, Zi Yan wrote: > From: Zi Yan > > To split a THP to any lower order pages, we need to reform THPs on > subpages at given order and add page refcount based on the new page > order. Also we need to reinitialize page_deferred_list after removing > the page from the split_queue, otherwise a subsequent split will see > list corruption when checking the page_deferred_list again. > > It has many uses, like minimizing the number of pages after > truncating a huge pagecache page. For anonymous THPs, we can only split > them to order-0 like before until we add support for any size anonymous > THPs. > Because I'm currently looking into something that would also not be compatible with order-1 for now: You should make it clear that order-1 is not supported, like: "mm: thp: split huge page to any lower order pages (except order 1)" And clarify in the subject why that is the case. -- Cheers, David / dhildenb