Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1033405ybe; Wed, 4 Sep 2019 11:28:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqymtkEQZNUbYPbWHbML95Qw9lUELbhrWWmg+5XNvKjuHlmnlkivkZMea/ZIg/cQtWRfzzT2 X-Received: by 2002:aa7:8498:: with SMTP id u24mr48537712pfn.61.1567621685908; Wed, 04 Sep 2019 11:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621685; cv=none; d=google.com; s=arc-20160816; b=dmpm9GYmqvLBnr6TnuQZWCyWwbBQ2w5cT0jM2RLL6W7YYHdwz98dRAR2DamC8R74hX i+VhgbWfnAtIDAmlnyumg93JOblhAfHn6bCtoUF9zL592/HTpbvaiWBNVbVjQkQ43k0u 2hALY9FXTYaQGuDOjUTriR7xOR9mg6jOBvxShtyn82+G9pgIVD8JXBla9cXOrmCVbUdZ vfi6kkcuMjNrkVHv0AWRH0TVRvMhTyRFuFCEdjB/cJRFU3SGp8UHvRpcLCkK6c213KTJ GjycaY1foezbpI0kakrqSWYwrFOVKPerdicD+oG0YrERo8JwrJum6QyN3lTg2n0TwZr9 2big== 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=ikZiJLdUgADLIG2VWC/w1YbotjcrZPuRSQOhKkqYHQU=; b=uJf5DJpZYTEoQlTG+wJ08FbHeUbDkQ3xmnd+R1YDBP9Z8nX2gE6TexH0BGrG5INzyN 4qO5SYvazpk6bSZGcRTfJgOZ5oH9DFDwXRrkhEzQM0Cn4ru+udDMG2bgXc3k3uFv8/UM omHYIq2wcxrWERlXwnroN0mAjp7Bx6T3m5h9kEigCu/L2Ymh60FW0jyHIdyXdpVt4nAw rhRqeq2X18zI8pmZcFMrsaatLKHWteF1qKw1tH81abYmTm6hdnb/S7Sm7U3547HrBqTG sEQaDr6FQGiIwvQkkPtQ2oimkh+FNIx+VYelOVuIWvM5nfzVqR+gw8OqVwLZnvg2w1aT ZE5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fmua2HsM; 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 j20si19927378pfr.101.2019.09.04.11.27.49; Wed, 04 Sep 2019 11:28:05 -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=fmua2HsM; 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 S2388012AbfIDSAR (ORCPT + 99 others); Wed, 4 Sep 2019 14:00:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:39382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388358AbfIDSAN (ORCPT ); Wed, 4 Sep 2019 14:00:13 -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 2240022CF7; Wed, 4 Sep 2019 18:00:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620012; bh=POVv77FAGLE3oY4C5hekS+tznimgFvbt1kJ+1AMw6nM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fmua2HsMQkTO4IcusoO7bXuyjnxgZYujgPoQP4YtPG/oKRcsxTpX4a5fnyRjqwceF g6zelQqGYrS6EgZW17wHx71+bjnR6TRb04uZcmvUQhhbLmg/2f4k7/tMYJUzToF3vH qnCpDiSLUYFmKT4LwdYD0AfXvkGj85CQzvGdCHG0= 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.9 41/83] mm, page_owner: handle THP splits correctly Date: Wed, 4 Sep 2019 19:53:33 +0200 Message-Id: <20190904175307.434935113@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175303.488266791@linuxfoundation.org> References: <20190904175303.488266791@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 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -1950,6 +1951,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)) { page_ref_inc(head);