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=unavailable 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 A778DC3A5A3 for ; Tue, 27 Aug 2019 07:54:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F793206BA for ; Tue, 27 Aug 2019 07:54:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892473; bh=XGeWsTHypIog1MFp1MGZXbXhUXamoFqtKZtU0EC+ofE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TZ6Ad3Ai0vcX+St8dwynjyGguMB1jcYrXvR/sg3o9VD18DI3mijKNWChlwj1EqzUK QSUQOY3SkCCPtW1aXkb6vwY8Lx5IvEYRLWPVZmOmDfRYWt4z71UvE31IS7bWG7RS7I JIucflLnmMrOfMy4fAjHS1UdtfKh80qjmUIIitJg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729445AbfH0Hyc (ORCPT ); Tue, 27 Aug 2019 03:54:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730055AbfH0Hy1 (ORCPT ); Tue, 27 Aug 2019 03:54:27 -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 43F2A217F5; Tue, 27 Aug 2019 07:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892466; bh=XGeWsTHypIog1MFp1MGZXbXhUXamoFqtKZtU0EC+ofE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YZBFgHnXukj7ZgKSCca70o6EE+rGhTHOSZ0dkiLV/BjJiqvcREP7spk384HjdAfCl 6PCD6mUigjqNs6I4apb2a3Qb4bxPDm1qlYkYH1yIyf5PcsonzGiz68ObFCU+PMFHt+ BJLigzBdPJbuKkNm3JKLXi9Vkg9Js5jvmlff4b3s= 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.14 57/62] mm, page_owner: handle THP splits correctly Date: Tue, 27 Aug 2019 09:51:02 +0200 Message-Id: <20190827072703.769817581@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072659.803647352@linuxfoundation.org> References: <20190827072659.803647352@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 @@ -2387,6 +2388,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 */