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=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 A6D88C433ED for ; Thu, 20 May 2021 20:51:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EC9161355 for ; Thu, 20 May 2021 20:51:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EC9161355 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 A646B8D0013; Thu, 20 May 2021 16:51:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A14808D0001; Thu, 20 May 2021 16:51:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 867178D0013; Thu, 20 May 2021 16:51:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 54B1D8D0001 for ; Thu, 20 May 2021 16:51:06 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E35868248068 for ; Thu, 20 May 2021 20:51:05 +0000 (UTC) X-FDA: 78162804090.14.5E04E2F Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf25.hostedemail.com (Postfix) with ESMTP id 2C2546000248 for ; Thu, 20 May 2021 20:51:03 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so6129089pjt.1 for ; Thu, 20 May 2021 13:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=1J1NDW9wLnXiZc7FkTHB0M7yewdKrRpuKTdgXkg6FJs=; b=nDLQLS++V3ws3vlncUZ2ERGKbCvhyzFuD/5um4yuejg4dTa58eP5RaeSBuqsamXvsM +rBPRBfL5AgOeXJQjBkLZMrfAdKs/dSVw+FUPyTtY2WvE4xA1ZfcVMF9RTBBsXgn2YZd QVGxyOPMDb3dX+44RZ5AYwPEWwKd5lytsj+PmNPmcKZL/FJfuUUFyrlzGojvOVcLeZij 7dNYPAXOfMMVwGVCKLSXDZwLfRjuellzQ5PlmqnBiRgApiuRm3kjc/M//ceAaEvK3CII S9SXx9txbs7ZnEoe0Pga+cDXutqUhHENQH8Uj2lhZGzJzFcqucjXJnWAvLFwsJTvYe9r mx0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=1J1NDW9wLnXiZc7FkTHB0M7yewdKrRpuKTdgXkg6FJs=; b=S26iqzeUOsCq1eGHHwHL5MOSS/ZXFs9KLFCP/BNuJr2zIt9cyRd/gnGISq3wNyENB9 ow8s5p7VFrF9k9m7NoG2UOnp+BVdkcKoAmunQGarn9gCfLyakzY6swCdJ/60GCpezAlr AWxvvjfl6eHwb58sJB2HGq74Gh5q6KascrOG1W4tExyBxCMt29TldbqkO2zCQVcWeTbT kPlNRgZUcP67D2G7RiM8RIODagQ51z7RJTW8WsqKAew1TeDQJsu1f+JcXMG+z2Rs1zqz WOh/CTvxwHf+CzloguA/AiBtRIV66PvUhN+bW7RowoHqdlQGRCAr4vG2KIyko0TeISxw UOJg== X-Gm-Message-State: AOAM532xpuvBbi59HGiku0voHjPKhPUd4A5k/c22RXxQJzeShzBLO9cD GPwhUsCRXL0y18KVHIOq1JE= X-Google-Smtp-Source: ABdhPJxF/LBzvkDguzqsDvK2KTTSPNLhh9YFbQIBPAjcLQejwZW0ObLtoaxDDnXyoGgsE3fUbk4y5w== X-Received: by 2002:a17:90a:5649:: with SMTP id d9mr6715794pji.163.1621543864493; Thu, 20 May 2021 13:51:04 -0700 (PDT) Received: from google.com ([2620:15c:211:201:f248:e9e3:9874:9116]) by smtp.gmail.com with ESMTPSA id 204sm2570381pfy.56.2021.05.20.13.51.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 13:51:03 -0700 (PDT) Date: Thu, 20 May 2021 13:51:02 -0700 From: Minchan Kim To: David Hildenbrand Cc: Andrew Morton , John Dias , LKML , Michal Hocko , Suren Baghdasaryan , linux-mm Subject: Re: [PATCH] mm: page_alloc: dump migrate-failed pages only at -EBUSY Message-ID: References: <20210519213341.2620708-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nDLQLS++; spf=pass (imf25.hostedemail.com: domain of minchankim@gmail.com designates 209.85.216.47 as permitted sender) smtp.mailfrom=minchankim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2C2546000248 X-Stat-Signature: y6ychr3ztzwziq6qn16b94mgf1ndxnkp X-HE-Tag: 1621543863-444566 Content-Transfer-Encoding: quoted-printable 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 Thu, May 20, 2021 at 09:28:09PM +0200, David Hildenbrand wrote: > Minchan Kim schrieb am Do. 20. Mai 2021 um 21:20: >=20 > > On Wed, May 19, 2021 at 02:33:41PM -0700, Minchan Kim wrote: > > > 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 > > > --- > > > 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(struc= t > > compact_control *cc, > > > > > > lru_cache_enable(); > > > if (ret < 0) { > > > - alloc_contig_dump_pages(&cc->migratepages); > > > + if (ret =3D=3D -EBUSY) > > > + alloc_contig_dump_pages(&cc->migratepages); > > > putback_movable_pages(&cc->migratepages); > > > return ret; > > > } > > > -- > > > 2.31.1.751.gd2f1c929bd-goog > > > > > > > Resend with a little modifying description. > > > > From c5a2fea291cf46079b87cc9ac9a25fc7f819d0fd Mon Sep 17 00:00:00 200= 1 > > From: Minchan Kim > > Date: Wed, 19 May 2021 14:22:18 -0700 > > Subject: [PATCH] mm: page_alloc: dump migrate-failed pages only at -E= BUSY > > > > 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. > > >=20 > what about -ENOMEM when migrating empty/free huge pages? I think there = is > value in having the pages dumped to identify something like that. And i= t > doesn=E2=80=98t require heavy memory pressure to fail allocating a huge= page. >=20 -ENOMEM means there is no memory to alloate destination page. How could it help dumping source pages in those case from dump_page content point of view?