From patchwork Thu Sep 17 20:27:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 11783533 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 884FA92C 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 363992085B for ; Thu, 17 Sep 2020 20:28:01 +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 363992085B 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 50F8A6B005A; Thu, 17 Sep 2020 16:28:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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-Spam-Summary: 1,0,0,1794da624d23fe02,d41d8cd98f00b204,zi.yan@sent.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1311:1314:1345:1431:1437:1515:1534:1540:1711:1730:1747:1777:1792:1963:2393:2559:2562:2892:3138:3139:3140:3141:3142:3352:3868:3874:4250:4321:5007:6119:6120:6261:6653:7576:7901:7903:8957:10004:11026:11658:11914:12296:12555:12679:12895:13069:13141:13230:13311:13357:13894:14096:14181:14384:14394:14721:21080:21451:21627:21809:21990:30054:30064:30075,0,RBL:66.111.4.26:@sent.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yfdtpcb19bnspbhffwbmnt9n8rfopf7wnao53xrxb8jg9idjwqc1nyge5of3y.qyqk5b77n6kok9g75kxoagopeh89yttm8a3amoac1heyf3acusbm756dofes1t7.w-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:32,LUA_SUMMARY:none 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 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 split") Signed-off-by: Zi Yan Cc: Daniel Jordan Cc: Anshuman Khandual Reviewed-by: Daniel Jordan --- 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 = PageTransHuge(page); + is_thp = PageTransHuge(page) && !PageHuge(page); nr_subpages = thp_nr_pages(page); cond_resched();