Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1435686ybk; Thu, 21 May 2020 06:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxajpIqW0zZuYUxahfLVePjm/ZD3WOPC6xyP41b1vho4nfWIfy2ufiS9HQ9bhIJOHKqClYE X-Received: by 2002:aa7:ca11:: with SMTP id y17mr7449062eds.87.1590069255142; Thu, 21 May 2020 06:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590069255; cv=none; d=google.com; s=arc-20160816; b=gOgOp+qE81ZO7mh3W5KsQp/qN3ilz12WdMXKPVHyInFTdb/g0tgxSTpT+Rf2v4qL22 Y7F3wLo3s94icoZNPJvBG5nTSocGZqGlZjWiZrnKE815/U5SZpnVR4Vx4Mav4UBpR9a6 lMxRhoWNzvfHl8CQRGaW4BU7Kwij5eqsgW48IL5yhU86Rdoes9NRUNkGyrmJHL78egAe IGs7i/Sl3eItRwydbPLpph0tN9KBaFb/bP8u5coVeWlE331u4mtP0Nc7bWr9YxJC2HJ7 WgS8XyfKyYBu68uex1MSLIzHilJHhrYw//PYL3GwOFk9qeg7S8bpEsJFxSn6z6udQjCC +FBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:dkim-signature; bh=+rx34frGAhxyFDztnsG4UwVe/jVB01cbcYcfehMFKm8=; b=Tmp/jwdVwQJFnlg2IU8M7XEzfoeWAqNOwnGWO/Z9PZlPaAj5lzByoMwd37s20eAVdM CKBR0usHSuUzcsOOXNhR7Fsqqp2ey87L++zYLG5hSljgRbojDGeeL/cswPD54wTThtnP tIu6re3t62BFeV8AdQKAyK4XZmg65OmUKX1N26PqwZJNhoss+xSQR+7zNjlgTwQp1YGg zZI00wJCLKwoWYH2Oc4vWhUX9pOt/LKxn8Cn+XcNeZro9BrL11HMqyqBaqo8h+UcvTap CULofXd2xQns0FGagf+F+V/AZPE1BXtXfCskoeh3Gj9HaXEZHVjrUSqfiiZslLMDHMKr Xxkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kRdZ04hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si3724888ejr.391.2020.05.21.06.53.51; Thu, 21 May 2020 06:54:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kRdZ04hI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729570AbgEUNuM (ORCPT + 99 others); Thu, 21 May 2020 09:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgEUNuL (ORCPT ); Thu, 21 May 2020 09:50:11 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CFDC061A0E for ; Thu, 21 May 2020 06:50:11 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id y85so6205845oie.11 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=iXWFFyKHoX/eepsFES/UK+KRXLwhyxhILEB9wb2bgSiQXj0Ur3kmAoKLYfJ78gWzOK ohZZ2T8xEMYTsufQeFUIzSKFsI7HAftxf0Ae1aSy6B8WbU1i1wRMctG1MtxRTeA5UkNi S9WLOKq7HMFRenSgvT4lRQfDb0gRz0aAR0QNptUGZe3jKezm3ndthN/a2mBdCWnM2N7y h/2b7QilQAHELbx0ah+Bokj4CCxrJfgQUA7UoqMjGwUXyfXyuypaJG5E9F4uNct2cHU/ ADtVHbDVUWYlpw6zz/s8ID4orc8nIrNC7ew13EH7BGLkyF/RlxKDro0URYCVf9YeRaM/ nkjA== X-Gm-Message-State: AOAM531maAr8vx81NRUrZxqL1r/nslRHxl7jcqTjfijhH8yasj83wZ/2 q6ahNaiBFbxLOKZ6Pf4zUBooUA== 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 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) {