Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1864616ybk; Thu, 21 May 2020 17:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlvQ8ef2Z+xS7Wb1ZZALiC/JAow0MtkpHAiPrhqTHAKXOKJc1BftVY1QomBHJSBUmv3o2U X-Received: by 2002:a17:906:aed2:: with SMTP id me18mr6319903ejb.283.1590108566678; Thu, 21 May 2020 17:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590108566; cv=none; d=google.com; s=arc-20160816; b=evtPeW5m7XFt/nyYsz0Q/4rQhPhjV+ZNAyaagd5I4JSMrLuS6o0IiSwL7eFEIew4cN BzQg9O9fhffEW0IYCNOZYJ4KVegEY1UFy2FgqFRQRC/Rb/EK/9YUlDtwfxfTrPB4LEnj Qe+FCtIHYZLgx4O9fyx82jN2GSRnqRExV8tpU8I1A0a6k+pQRwEHgn4XO1+3d7he1o7W 1rSxk5eCQZuqiPwmhU/Cy9i/Aim6hGs/lwA9c+bVwhbzqMMSObS/V5VGEOKq9gpLriyQ 21NEDaWeKIKW6nbReaJgAXGc7pLV3xp/fSMxWhlzAe+Lp9fI1ukEH0buhhcfCtYrouDv bvHg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=gjYjU3O6Q1SJ6tercmJbZG4CMEAiUtRtx5brmXaMAag=; b=FEfjwbXF8jrQhsqMfgSSWFZ2offNrbs8tlAhmPYF5rdpx21aWaAEg5t2N9FChrqGKz wfU1RsSAUQ8pl5uDCzwHEOfpA72Vt4mY6gz8izWR01UA2+JnjIlxq9rgc7F4yXsBxaHO FDnIN0OhK3OG0Vaw0ajOgC6coAoQW+7Bg+s1fD5Dnh5GMwPoUllE+8ARNc85d3MdnYcP mBt58cgOIX+4LMHJrdQPTnZgVBjMgnTJwGczs4jq1GaiHBL/q8NNjRYUMFd7qdIWEkHJ 7Pf/ytXqXMBY+W153SnSpiZNuSKxbblNrNfyu/XqHVL4cTY08wmZsniRx1zR0vPPYDWW OrVA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si3872379edx.164.2020.05.21.17.49.03; Thu, 21 May 2020 17:49:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbgEVArf (ORCPT + 99 others); Thu, 21 May 2020 20:47:35 -0400 Received: from foss.arm.com ([217.140.110.172]:55772 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgEVArf (ORCPT ); Thu, 21 May 2020 20:47:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 65CC230E; Thu, 21 May 2020 17:47:34 -0700 (PDT) Received: from [10.163.76.230] (unknown [10.163.76.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 096B73F52E; Thu, 21 May 2020 17:47:31 -0700 (PDT) Subject: Re: [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix To: Hugh Dickins , Andrew Morton Cc: Naoya Horiguchi , Zi Yan , John Hubbard , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: From: Anshuman Khandual Message-ID: Date: Fri, 22 May 2020 06:16:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/21/2020 07:19 PM, Hugh Dickins wrote: > 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) { > Thanks Hugh. I am preparing to respin the vmstat patch accommodating some earlier comments. Wondering if I should also fold these changes here after adding your signed-off-by ? - Anshuman