From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 962CFC3A5A4 for ; Tue, 27 Aug 2019 07:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BCD122CBB for ; Tue, 27 Aug 2019 07:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892712; bh=qweNfn9xllJ7oD+593DII3mEUdfXk4kWNQNKMz0gY/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eSJGNeCMhCb4UUgFhTZV2pdNIHMGM9i6R9xeDW9oAwUwr+tV6PKb/dvVjBzqI/ZW0 JC+5AGZdP53T4Eq3xcYPWfgn/0ZEEW4+6HovCHybiI0evIIkzp3/FXeNdYdW/yqU4j sxAYDgWw7DZb8GvCcH5aTbHdzEKg3l76w6vFKmQM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730348AbfH0H6b (ORCPT ); Tue, 27 Aug 2019 03:58:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:51314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730990AbfH0H6a (ORCPT ); Tue, 27 Aug 2019 03:58:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DDFE20828; Tue, 27 Aug 2019 07:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892709; bh=qweNfn9xllJ7oD+593DII3mEUdfXk4kWNQNKMz0gY/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cR+Thw2vPwSCCtSNScVi71f892pyV9F5oTuFpMv2WKrRrs9jgwBSoi142BlqxHr7i igk2jNWtxUs9eevfu29q9UGFXsCaEUJNCQ3se9CsmGQ31T+Sb1FyAfdSPsBCbVTZVG vmCHk/0emrLE/XtgebRUqGQTvDK48ha0EyXwlrMg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Kirill A. Shutemov" , Vlastimil Babka , Michal Hocko , Mel Gorman , Matthew Wilcox , Andrew Morton , Linus Torvalds Subject: [PATCH 4.19 85/98] mm, page_owner: handle THP splits correctly Date: Tue, 27 Aug 2019 09:51:04 +0200 Message-Id: <20190827072722.471482519@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072718.142728620@linuxfoundation.org> References: <20190827072718.142728620@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vlastimil Babka commit f7da677bc6e72033f0981b9d58b5c5d409fa641e upstream. THP splitting path is missing the split_page_owner() call that split_page() has. As a result, split THP pages are wrongly reported in the page_owner file as order-9 pages. Furthermore when the former head page is freed, the remaining former tail pages are not listed in the page_owner file at all. This patch fixes that by adding the split_page_owner() call into __split_huge_page(). Link: http://lkml.kernel.org/r/20190820131828.22684-2-vbabka@suse.cz Fixes: a9627bc5e34e ("mm/page_owner: introduce split_page_owner and replace manual handling") Reported-by: Kirill A. Shutemov Signed-off-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/huge_memory.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -2477,6 +2478,9 @@ static void __split_huge_page(struct pag } ClearPageCompound(head); + + split_page_owner(head, HPAGE_PMD_ORDER); + /* See comment in __split_huge_page_tail() */ if (PageAnon(head)) { /* Additional pin to radix tree of swap cache */