Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5227218ybl; Tue, 27 Aug 2019 01:08:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqp0TlaJXO9NRp1sJScCh3Bp+B7tt3cJdkuRqw2KZrxWJnnyQ1mogtNYWi03GVIrkOid40 X-Received: by 2002:a17:90a:3847:: with SMTP id l7mr23011166pjf.99.1566893299923; Tue, 27 Aug 2019 01:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893299; cv=none; d=google.com; s=arc-20160816; b=BP4oJJwRcsjJtDmranObzc6pjvJetL/rlc92r58rqemN9QJ+x4w2BbsvEb3GyFMsjD VJ67N8hnDpJP8lDa8ANTytO1g4GhS/sje1R+A3382k6tfbzXucdpGhHqIM+0LL0XlvZE WXKACeWi7ZEZNBCsIhUmzKRJgYyzPhFF6jVr8Mw8B0wmsQETbe/bvEKnV9nZTMyJKH+D c7C1Pe9uv4sjAdDHKtRetj9sCX2AIiFlBpXoPNpzC03DlRqOY7osFhesiISpfsxbx1EM IZQTzp8CXCNZR6X+j5nFcxF+y9tTnE7Tipbi/+kvxmjWgCiOG5MqhlWsBVDJrl6R+Ym6 EStg== 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=tqh8wI3Z4SyRNUG0saMkJNny7SXjXHUGdJqyseNLedA=; b=SCF7GFbndaaYGKAhStlu+YJ0FlGlrKx6b/nDOpsU2ZQijG5Qu/rzsly9+hcrvaSiuI DfZ1UHg/D0fEu/CWMEDzvuZSt5uvv4CLFGqoDwFgI/TqIbgwNEB4AnLuopieZgFVaahX rhiBXIrDuMRCw4YQtX+aZNih5wzhOI/WDPgOj9Oeb+8QhsbQj9UyoZQOtm+smrONdVQm TN5mEjsaSLFdXwR/ciNtp8Tfbux8gMSIjtmdtl5o2KxLdaXyXg37tFRC36ijeyb9UXXw XI3pM2DH2RGT36qBGlaD9W6Czr48skaaCrhbRa8063BBc+ZFudVDtkj/qs4eD6k0dSzj HA2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Jcw9oHl2; 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 r16si11212431pgv.466.2019.08.27.01.08.04; Tue, 27 Aug 2019 01:08:19 -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=Jcw9oHl2; 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 S1732814AbfH0IHF (ORCPT + 99 others); Tue, 27 Aug 2019 04:07:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:37054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732788AbfH0IHC (ORCPT ); Tue, 27 Aug 2019 04:07:02 -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 AF90C206BF; Tue, 27 Aug 2019 08:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566893221; bh=kj2PdIXh/Pvjdu3KfU2tNLKn0qocFrwkV3h5G9JzMoU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jcw9oHl2B1w3sT7M5XuB2P0M1w1mWS/5bmdbyyhwB7w3TGaUKN9zPas7QODurGWxR iob9zJbtfU3TiEog2w4h2qwpVuD37yh441dGaRHgDSAZ6jzt3hcRAo0AMZUZ9EBhG3 vchi16H73sHYbobeLmn7KqxAMR0wcZnLtt5HJ6WA= 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 5.2 150/162] mm, page_owner: handle THP splits correctly Date: Tue, 27 Aug 2019 09:51:18 +0200 Message-Id: <20190827072743.975240891@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072738.093683223@linuxfoundation.org> References: <20190827072738.093683223@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 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -2500,6 +2501,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 swap cache */