From patchwork Tue Jun 29 02:42:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12349213 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 905F7C11F66 for ; Tue, 29 Jun 2021 02:42:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4950361D0D for ; Tue, 29 Jun 2021 02:42:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4950361D0D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A407B8D011E; Mon, 28 Jun 2021 22:42:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EF5C8D00F0; Mon, 28 Jun 2021 22:42:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B7C18D011E; Mon, 28 Jun 2021 22:42:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id 5F08B8D00F0 for ; Mon, 28 Jun 2021 22:42:08 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 57721180F76A8 for ; Tue, 29 Jun 2021 02:42:08 +0000 (UTC) X-FDA: 78305211936.32.852928A Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP id 11D562000BEF for ; Tue, 29 Jun 2021 02:42:07 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 050BE611AE; Tue, 29 Jun 2021 02:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1624934527; bh=dPHVTe5pFBgxCjc9cC/3A1EmkKKzjL1XyJ8voDvZjKs=; h=Date:From:To:Subject:In-Reply-To:From; b=AAkb0Hr30T6f7+YtTnIuPxlDxibC/SSdvk544dVVH/vcrIcd/yxf5NQOrqjTBeNyI CtE9RnuVDD4CytwEl9a0+sEZXwQ1XCXmoKBPWDX2fPhGkVpspzV3sdddXk8KGOp31x yWkgpSNqXv88oj+aIOOXkmTSl2hi4fQAuoXFT/k4= Date: Mon, 28 Jun 2021 19:42:06 -0700 From: Andrew Morton To: akpm@linux-foundation.org, david@redhat.com, joaodias@google.com, linux-mm@kvack.org, mhocko@suse.com, minchan@kernel.org, mm-commits@vger.kernel.org, surenb@google.com, torvalds@linux-foundation.org Subject: [patch 169/192] mm: page_alloc: dump migrate-failed pages only at -EBUSY Message-ID: <20210629024206.C0aQfuEUf%akpm@linux-foundation.org> In-Reply-To: <20210628193256.008961950a714730751c1423@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=AAkb0Hr3; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 11D562000BEF X-Stat-Signature: yc8cuyud6zorhi5u167ictahmmn5r67t X-HE-Tag: 1624934527-559360 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: From: Minchan Kim Subject: mm: page_alloc: dump migrate-failed pages only at -EBUSY alloc_contig_dump_pages() aims for helping debugging page migration failure by elevated page refcount compared to expected_count. (for the detail, please look at migrate_page_move_mapping) However, -ENOMEM is just the case that system is under memory pressure state, not relevant with page refcount at all. Thus, the dumping page list is not helpful for the debugging point of view. Link: https://lkml.kernel.org/r/YKa2Wyo9xqIErpfa@google.com Signed-off-by: Minchan Kim Reviewed-by: David Hildenbrand Cc: Suren Baghdasaryan Cc: John Dias Cc: Michal Hocko Signed-off-by: Andrew Morton --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/page_alloc.c~mm-page_alloc-dump-migrate-failed-pages-only-at-ebusy +++ a/mm/page_alloc.c @@ -8800,7 +8800,8 @@ static int __alloc_contig_migrate_range( 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; }