From patchwork Wed May 19 21:33:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 12268613 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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 EADE2C433B4 for ; Wed, 19 May 2021 21:33:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C4DF61074 for ; Wed, 19 May 2021 21:33:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C4DF61074 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0D76D6B0036; Wed, 19 May 2021 17:33:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 088676B006E; Wed, 19 May 2021 17:33:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E43BF6B0070; Wed, 19 May 2021 17:33:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id B62796B0036 for ; Wed, 19 May 2021 17:33:46 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5CB03A741 for ; Wed, 19 May 2021 21:33:46 +0000 (UTC) X-FDA: 78159282852.04.113FFAF Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf25.hostedemail.com (Postfix) with ESMTP id A1FCF6000243 for ; Wed, 19 May 2021 21:33:44 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id 10so10843613pfl.1 for ; Wed, 19 May 2021 14:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oP8gkx8lBe4tFadnN1llHaYQNEqC1BdffwyrrrWEirY=; b=u7y1pYsrsONhi35thtT4sCU3kSP8eoObVlvB5VfQxPAQZMuSl+KUsG0H8Pw7ydtp12 DRMKqvoMKkMX5/jW0t1WiVj1H0Z5Vx2/jMLnkM0S4btHP2fq4CA1qteSns00Fwa54O17 7eu+COmp/BigfWKj1RuQO4+ZaAXmcoSezVniVvcVbljBupgj8OSvBCANOkLPUdLpQpnt i8qu4EeoeBqrTN3USqY6aa8fHseZvb+KQhshIzC0zEm6QhhitNeBsZxSfNEikxGPZXaV uR0Be5QwwM54fp/2toy7F7bAOpSYJHZMI4phLn1c7MWaxRHzbslxR+FWWytYkGkVqG0B +CcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=oP8gkx8lBe4tFadnN1llHaYQNEqC1BdffwyrrrWEirY=; b=EmBzSUVBkH3yTIj4c8XhffNyg1KvcV8ry/U569ezL1LA6Epql5iX/dxzAv/lCAnvtk pvsqrWxs9uT3E/5SsnOq7AuFKaxNZ1ZOfZ/GvX/n/gMgcXc2XO5L9s4rQkwl9hW0eWaZ 2Gbg2pJUBrXSTR7WIuJKzt2t3QhOuaH72aEmmYGeb//78/INrtFgXCAJ4epNy53ahakZ Up7vBOymukuaPOjlRCDTXSv97Y+OkNPyiVlsabqqUN1/4IDmnihw3PHNaJ7d949XgVIP Hone6wWBh6+yIgimhTC3CJN0jlK8nmgOnTVe/ermCnpa2Xhlg5xeospR4W1DPgGlTmMe oNUQ== X-Gm-Message-State: AOAM532z3UvBNWd0EslhUce1y7FgK3U7n1qu9ds3RCCmuiyiht+rVjad TWH0KiMUIrNKO2jH+mNsGCw= X-Google-Smtp-Source: ABdhPJw17dse/s5N6mmJmO3jjluXMyq5kxrCUDIerwZkvctMy0+GdVeA8EBeO2DKelkE5c6voVaOSA== X-Received: by 2002:a62:8013:0:b029:2de:93c6:1358 with SMTP id j19-20020a6280130000b02902de93c61358mr1125885pfd.55.1621460025088; Wed, 19 May 2021 14:33:45 -0700 (PDT) Received: from bbox-1.mtv.corp.google.com ([2620:15c:211:201:4102:f4c7:9246:e6c4]) by smtp.gmail.com with ESMTPSA id q24sm248773pgb.19.2021.05.19.14.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 14:33:44 -0700 (PDT) From: Minchan Kim To: Andrew Morton Cc: Suren Baghdasaryan , John Dias , Michal Hocko , David Hildenbrand , LKML , linux-mm , Minchan Kim Subject: [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY Date: Wed, 19 May 2021 14:33:41 -0700 Message-Id: <20210519213341.2620708-1-minchan@kernel.org> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog MIME-Version: 1.0 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=u7y1pYsr; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (imf25.hostedemail.com: domain of minchankim@gmail.com designates 209.85.210.181 as permitted sender) smtp.mailfrom=minchankim@gmail.com X-Stat-Signature: kxmzkrxttq3c8w9dkdg9juann9976s8y X-Rspamd-Queue-Id: A1FCF6000243 X-Rspamd-Server: rspam02 X-HE-Tag: 1621460024-728008 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: alloc_contig_dump_pages aims for helping debugging page migration failure by page refcount mismatch or something else of page itself from migration handler function. However, in -ENOMEM case, there is nothing to get clue from page descriptor information so just dump pages only when -EBUSY happens. Signed-off-by: Minchan Kim Signed-off-by: Minchan Kim Reviewed-by: David Hildenbrand --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3100fcb08500..c0a2971dc755 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -8760,7 +8760,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, lru_cache_enable(); if (ret < 0) { - alloc_contig_dump_pages(&cc->migratepages); + if (ret == -EBUSY) + alloc_contig_dump_pages(&cc->migratepages); putback_movable_pages(&cc->migratepages); return ret; }