From patchwork Thu May 21 13:49:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 11563009 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 AF00D1391 for ; Thu, 21 May 2020 13:50:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AE9F20721 for ; Thu, 21 May 2020 13:50:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kRdZ04hI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AE9F20721 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 83BAC80008; Thu, 21 May 2020 09:50:12 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7EC2580007; Thu, 21 May 2020 09:50:12 -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 6DBB280008; Thu, 21 May 2020 09:50:12 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 5554C80007 for ; Thu, 21 May 2020 09:50:12 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 217674DC4 for ; Thu, 21 May 2020 13:50:12 +0000 (UTC) X-FDA: 76840860264.23.class40_1b6b8a428e0d X-Spam-Summary: 30,2,0,73519dfe40a4fba4,d41d8cd98f00b204,hughd@google.com,,RULES_HIT:41:355:379:800:960:966:973:988:989:1260:1277:1313:1314:1345:1437:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3867:3868:3870:3871:3872:3874:4250:4321:4385:5007:6119:6120:6261:6653:7901:8957:10010:10400:11026:11232:11473:11658:11914:12043:12297:12438:12517:12519:12555:12740:12895:12986:13069:13255:13311:13357:13439:14096:14097:14181:14394:14659:14721:21080:21444:21627:30054,0,RBL:209.85.167.193:@google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.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:1:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: class40_1b6b8a428e0d X-Filterd-Recvd-Size: 3841 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 May 2020 13:50:11 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id r25so6261626oij.4 for ; Thu, 21 May 2020 06:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=+rx34frGAhxyFDztnsG4UwVe/jVB01cbcYcfehMFKm8=; b=kRdZ04hIwcg5sBPK4ZhOUKQ/+STfLXkTdU84uMqlC08Tc2YPDWygXEH7X+YlXQLiJ1 9gvo9hHQo1liVi1sL/9l5aWnHUTFJo9laFK227tXIyQva+USV1GWzP5eDF0LeZ73cX1b rxUshQh//HagrZkGxp/e7RIGnDHRl/jDvkMN1G3P3uhAKYLTT9e2QXK29XMFV8FrOhoD 4d/ULAkAXoPNkDKJCyr8489YH3miJ5sAOeQUs4iLLxQDWbA+ltkCQDTItEN0GaUSWzS5 gawh9LukYIKnqmGkntX3ShtKxhORzdJVDObLxpu/VffC2Z3L1gKBxmX+LS0erxSK5BaR BX4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=+rx34frGAhxyFDztnsG4UwVe/jVB01cbcYcfehMFKm8=; b=WKwVpGbfo0ExIqEYBkFjjERXBieVj13NXG6nHswcCg9Kglpd9afVyjrlhnuc0ra5zG Lq+HnqNYuXGWP4StpM2tyxyLURMUizCooRoKgnWNfbVq0jukKjnJUrlXmgDr4jgtpXKw omQgcX81GpLcRgNFtFPv7sft5mVEpGBgAZcvUrFz9w2L0wjwK1uBpGQmUTE1ZR3eeHwT LuepwkM0PAwczNM8laSzmxOfGW7ngr3bp8W3P3as8wHlh2OXoX8UjWwka1FzJAqrI7Od PCWxC6OPzbP47hIcjatcOfBeLqpxVsnsoz94gAawP6am3ejdjCFuwDE9wTPSrweHPgTP WsOg== X-Gm-Message-State: AOAM533wZFGl5i4PfAKQpEkUK1RR08BBx29L34UGZisu9Oq7s+CqaMCL oAPzii173RkphYqRZks3yG2oag== X-Google-Smtp-Source: ABdhPJyhaSNhjeHFlsDhzLGECwTxxbYZQS3ikIOsP8AocLiNXEM3A1jjJtyElbPfeZXokR8Vgsc16w== X-Received: by 2002:a54:4512:: with SMTP id l18mr6970406oil.81.1590069010565; Thu, 21 May 2020 06:50:10 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id q16sm1599162ota.3.2020.05.21.06.50.08 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Thu, 21 May 2020 06:50:09 -0700 (PDT) Date: Thu, 21 May 2020 06:49:51 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: Anshuman Khandual , Naoya Horiguchi , Zi Yan , John Hubbard , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) 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: Fix 5.7-rc6-mm1 page migration crash in unmap_and_move(): when the page to be migrated has been freed from under us, that is considered a MIGRATEPAGE_SUCCESS, but no newpage has been allocated (and I don't think it would ever need to be counted as a successful THP migration). Signed-off-by: Hugh Dickins --- Fix to mm-vmstat-add-events-for-pmd-based-thp-migration-without-split.patch mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 5.7-rc6-mm1/mm/migrate.c 2020-05-20 12:21:56.117693827 -0700 +++ linux/mm/migrate.c 2020-05-20 15:08:12.319476978 -0700 @@ -1248,7 +1248,7 @@ out: * we want to retry. */ if (rc == MIGRATEPAGE_SUCCESS) { - if (PageTransHuge(newpage)) + if (newpage && PageTransHuge(newpage)) thp_migration_success(true); put_page(page); if (reason == MR_MEMORY_FAILURE) {