Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5215515ybl; Tue, 27 Aug 2019 00:56:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWvj6Lja1ljq7R6J1DuHsmHIWpqUV9XO0rHmIjbx8JOLvD+XNGTpJyqy6S2rMSaXdVPrQa X-Received: by 2002:a62:f247:: with SMTP id y7mr24735279pfl.236.1566892593317; Tue, 27 Aug 2019 00:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566892593; cv=none; d=google.com; s=arc-20160816; b=XQDpZKI8MhHRUOYUluRpuECdBUaLIzt7hTqy8mdl40M39+k+yPHju9DiVtbncHBbUM rAs9V7UWkJv7PWuS8nxeJ9QhXJn89UwZxv6hRxu7rqPHIE+lEB2goAFHzwk0Z/qp9o05 kJCi5cvhI42SLSXiIKMgIRq2BQrV1wVwTxAIo9XTPiovSSmWzrwabk/0OYwSh3FWFKjs gazEjkXi6qP/8MaXYLNJ94WqIsIZLL+eK/xq1Vb3aPeDCP5y32DUCtB7w6bDAr6qQh65 zZChL8/ZNw7KdgeEUMqoWYzHux1PJib1DHy14HtUOkXvKb7WFVa0OEQ8IPHqBO3hXLGD LWRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W6ZVWL3W7pZ6ymRonnC+e3n7n6V8jPj3MOU7JV1r4r0=; b=ceJ793xnEj/d67WpHtXPUxzKKYJaAL0so78C71T53E1swpv4YYT93DcP/Tc67DIl7T XtiuzWGtwla8tuuxTmMmV/ho7bqnfQSrVYPIVrBl3/lluR9WGecYvHe4Z0MusMlbKl6n pIUz1xGHgKnIV8e9oVpMowmVQuMyycHyPsuJjN6RPvXOeoeZfQSspJhADDf62xYO2btp ZkhD8f+9098DbHyO+chxVn+R3WLsCdQBIPaEXzdd5/TsLvffn8Pzz8y7LXYbH0supaIy EOMV8AEHUGsHDtWG7XfkPnL+Ce8llzVTWpSZSyJUSNty2okU13hJ3qZZTBpvja91VfpI ODzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YZBFgHnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i64si10550322pli.252.2019.08.27.00.56.18; Tue, 27 Aug 2019 00:56:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YZBFgHnX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730075AbfH0Hyb (ORCPT + 99 others); Tue, 27 Aug 2019 03:54:31 -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 */