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.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 7D599C433E0 for ; Fri, 22 May 2020 01:22:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 40077207F7 for ; Fri, 22 May 2020 01:22:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Eo7lQGKO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40077207F7 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 C1BFB80008; Thu, 21 May 2020 21:22:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BCB6F80007; Thu, 21 May 2020 21:22:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE04780008; Thu, 21 May 2020 21:22:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 9684F80007 for ; Thu, 21 May 2020 21:22:00 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 573B28248047 for ; Fri, 22 May 2020 01:22:00 +0000 (UTC) X-FDA: 76842603600.07.lace45_4bac7f7493103 X-HE-Tag: lace45_4bac7f7493103 X-Filterd-Recvd-Size: 4870 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 01:21:59 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id v128so7943350oia.7 for ; Thu, 21 May 2020 18:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=QyvoWyLbSuP/CE36awIf5BB51IMB409+51eWDRrnj+o=; b=Eo7lQGKOHDF30A7GNcKV32v4KA/gw8VRNtfwaqUHbU//l8VFzYd4AL6nlOvXafYo1J oGmiOu1nIw4u/UXYm/HIxmDLIT24DDR16SLM0VxYqPNGEkqiwzuWZG7MvXYnrMYxIM5p bj2tbLMJlKqusuKH8oIIgEEoZOl7Ku9uDuUtdg6iXHphIOZw12qUfviX9cVVJTFUrx6W 8ezZYEAbkJVvy9zoCHi5QtkVxwfCJQRgFDJIFFIM5ZGYPuDtXA7fnHPuh6EZ59IC4zhV wA9BonHZEeM9/QHiPJh6qE3xG65XMUpTnUJeCMybdL0a8B+Qy+qZ0Y677bR6Q92cr4Bh RpBg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=QyvoWyLbSuP/CE36awIf5BB51IMB409+51eWDRrnj+o=; b=eXuYjelw6Ul3XUEWUyFrHCikDfsUSPpjfvPwq57dVXsWgs8d8ESOESiwDmya4LwG1S xxCEFtJKm69wqxJXEdgRwtc8dJKyVLCfqRv8y/Cmhp9xMxPmDJqwR062vP2Hg+qGSq2J BQv5gUHY0HPLEPTKTux88jsJL4H3Li1mFOeq2/Dps3xDgh0H4eDz+AUaK8unuCVB2orT Su+CMxMOlA1y0D7xmIcpiP1+bsXwHzZg8I5AncuSGnG0EpZoGhnJMGifUKZsiAxMgfPY gfGkV6BRTSBZiZuXlpT4UwJDyDvyP81Rjlg78NM2jqX9Tu8Zxh648YCOLPHNh+AlVOwI hVZg== X-Gm-Message-State: AOAM5300CAFZpHGQfH1GJB6B12oa3NhPS+0BOGLTnyvAjDHVr+tUGU8w YZbRv131XsBbTtV9pfjhYI8n0D39MK6g7g== X-Google-Smtp-Source: ABdhPJzyjC58A+oSo8vkohjD8TJiMy24fhHGzlIv/bIFMwS15PjCYp3lfL/QwYU03q+/SI2A4S/kVQ== X-Received: by 2002:aca:ad45:: with SMTP id w66mr1001114oie.59.1590110518857; Thu, 21 May 2020 18:21:58 -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 p26sm2103753ood.28.2020.05.21.18.21.57 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Thu, 21 May 2020 18:21:57 -0700 (PDT) Date: Thu, 21 May 2020 18:21:42 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Anshuman Khandual cc: Hugh Dickins , Andrew Morton , Naoya Horiguchi , Zi Yan , John Hubbard , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH mmotm] mm/vmstat: Add events for PMD based THP migration without split fix In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: On Fri, 22 May 2020, Anshuman Khandual wrote: > 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 ? Thanks for asking, but please just fold this one-line fixup into your respin without my signed-off-by: I'm not heavily invested in these stats, just want to avoid the crash; and don't know if I would want to sign the result. You could add something like [hughd: fixed oops on NULL newpage] to confirm that the fix is on board, but the fix is what matters. Hugh