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=-12.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,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 747E6C43463 for ; Thu, 17 Sep 2020 20:28:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D51E02075B for ; Thu, 17 Sep 2020 20:28:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sent.com header.i=@sent.com header.b="fcyv2HJL"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="CzR8aukL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D51E02075B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 586966B0003; Thu, 17 Sep 2020 16:28:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50F8A6B005A; Thu, 17 Sep 2020 16:28:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FE806B005C; Thu, 17 Sep 2020 16:28:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id 22D7C6B0003 for ; Thu, 17 Sep 2020 16:28:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DA7B11EFD for ; Thu, 17 Sep 2020 20:27:59 +0000 (UTC) X-FDA: 77273689878.04.robin26_621146227125 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id B8904800CE74 for ; Thu, 17 Sep 2020 20:27:59 +0000 (UTC) X-HE-Tag: robin26_621146227125 X-Filterd-Recvd-Size: 4456 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 20:27:59 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 06AF95C01B6; Thu, 17 Sep 2020 16:27:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 17 Sep 2020 16:27:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; s=fm1; bh=OgM+VF1MUscTM176XDGGZc3l3g r9Nz8gshk7U7FB/5c=; b=fcyv2HJLCiceEQXgNvAJS/jvaz6H2AFqYnzMSADXyB k0r8QYAbCvRhAVaFcZAq7NbLQTlNJwTMaJNZOictdMPi4uuUFT+O8QyGSx4ryjyc 6TdMGoxwYVk3opHKOHkBBtBVsf6mkcZbLDg+7pojFqjm+371rMWNKKOkEEpyBfEJ cHUzJl/GRhtdVxSyPdBHjI8eKUEUZtJ+IG/hcDkWg2XNBfEL0xi6U75PO5DtBsx/ Bp+/a0kUG1w/XjxDjS+IXeHwg5azTC+nrnZCjzaYu1Tz3LeIo8TzfMtZS2jLNkAj sQvWMPsorKSBbLBTwAtVQhwSkONW+KbUvlW4gRXDiCSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:reply-to:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=OgM+VF 1MUscTM176XDGGZc3l3gr9Nz8gshk7U7FB/5c=; b=CzR8aukLuvb1RHmYqBsg7R Fgp0yw4zZ5OQdujDFdzTSGcwOFg9Lzt3EbV3NXsZvBxUPSZy2Yl1hZ8apSdpVeUE geIYvzrfV7gscwCO96PEfTRIQeCXl17q16Kd9rsy4hxSxSK6SFZQa+IDlQN1kVWv SsX/q7MbnHZS9vujaoynJ4GGHCTRudSK6QXNTYlRmE+8DzReymcc7EoyKY+LNWyq TRX+B+fv3EkpK5O3uzVcffr4K99YqaslMTkpA/nkDPt1xaHqIfO6z5vCi3EjLu7Z Mj4Yz/wysXnG/hK2b03FRBx3tvT4DyOVTvv/DGh6Ui0+06q8Or7CNjgW9rxw9ZZQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtdeggdduheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfforhgggfestdekredtredttdenucfhrhhomhepkghiucgjrghn uceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepgfellefhvd eitdehffejheelgfehtdevheejhffgledtieehtdejffefveeijeehnecukfhppeduvddr geeirddutdeirdduieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepiihirdihrghnsehsvghnthdrtghomh X-ME-Proxy: Received: from nvrsysarch6.NVidia.COM (unknown [12.46.106.164]) by mail.messagingengine.com (Postfix) with ESMTPA id E9CF53064683; Thu, 17 Sep 2020 16:27:57 -0400 (EDT) From: Zi Yan To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zi Yan , Daniel Jordan , Anshuman Khandual Subject: [PATCH] mm/migrate: correct thp migration stats. Date: Thu, 17 Sep 2020 16:27:29 -0400 Message-Id: <20200917202729.1460743-1-zi.yan@sent.com> X-Mailer: git-send-email 2.28.0 Reply-To: Zi Yan MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Zi Yan PageTransHuge returns true for both thp and hugetlb, so thp stats was counting both thp and hugetlb migrations. Exclude hugetlb migration by setting is_thp variable right. Fixes: 1a5bae25e3cf ("mm/vmstat: add events for THP migration without spl= it") Signed-off-by: Zi Yan Cc: Daniel Jordan Cc: Anshuman Khandual --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index 941b89383cf3..d1ad964165e5 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1445,7 +1445,7 @@ int migrate_pages(struct list_head *from, new_page_= t get_new_page, * Capture required information that might get lost * during migration. */ - is_thp =3D PageTransHuge(page); + is_thp =3D PageTransHuge(page) && !PageHuge(page); nr_subpages =3D thp_nr_pages(page); cond_resched(); =20 --=20 2.28.0