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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 8D016C433DB for ; Wed, 10 Mar 2021 15:45:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 006AC64F9B for ; Wed, 10 Mar 2021 15:45:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 006AC64F9B 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 6C68D8D01C1; Wed, 10 Mar 2021 10:45:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 69F8D8D01A6; Wed, 10 Mar 2021 10:45:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 540988D01C1; Wed, 10 Mar 2021 10:45:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 394CE8D01A6 for ; Wed, 10 Mar 2021 10:45:24 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 00D351811E9F2 for ; Wed, 10 Mar 2021 15:45:24 +0000 (UTC) X-FDA: 77904388968.28.6FEBBF3 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf15.hostedemail.com (Postfix) with ESMTP id E7FB9A0009E8 for ; Wed, 10 Mar 2021 15:45:22 +0000 (UTC) Received: by mail-pj1-f54.google.com with SMTP id gb6so1837667pjb.0 for ; Wed, 10 Mar 2021 07:45:23 -0800 (PST) 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:in-reply-to; bh=K7J4mK1wcrpYvuUrhe1JER61F+ZE4UvbwDiIPZFXGcc=; b=Abi4UsGeZm27KRexhiofdoPc/x71fqlJza7Q5Gdm1PMgUXGdaN4Ccik5MtaP0cjz6y 5qFGApD4ByCByqGB7qOWaGTOVcSBECT7reWjOIYlL6nArdAlPDIyX8iWchuHTGuuQ075 Wh3tQGbqbaXT+EOvSjzMqVXCWJ5qGIc9RHbKs4jRhECfss4+t44kETB4LPRt7RVxytqI jzl7TVger2GfFNKYAU6NTdvgksn2Ms/Bdj07wMwoS2wlqQQ4ZUSWhH+CUlbfskG8FvMr BZ7KyJsRTQPpLdgY3f5ftEgzyPMQlQNpI328/NQiMGSv0gh4ujg2Vuh0GSTTy4n6rSA2 a3eA== 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:in-reply-to; bh=K7J4mK1wcrpYvuUrhe1JER61F+ZE4UvbwDiIPZFXGcc=; b=EqK0Zq5qzK4JOcqWUvt34AnpRL5/jm+YnNU+VuDYy5znRjJawJwasiB+bSyYu43Kqi rHe7E6en6JHBvV3seB6hkIt74o5rDDoXQQjCSNqQSJMlDjcFyOJJ8ywWXv7vIHbu+XrL QIFP9Oh0/SedDbF5c4g1TH647Yv+p5lm66NFDrQ+ndikEeVt+NfGIhDJtXk+QQuVX+l/ iVdvi9DeCUa5YpEkUMCtcZYgaiy/0jpvaFT3o19HuAxqkCBcNuuiNtKf2g9/uRJASEPZ sJrbHlnfL7FUsuAe754c8n3nPerSC7rGkf5u65YVFRoxZh3Eml8yEYOpLq856EWj9Pic 048A== X-Gm-Message-State: AOAM5309Pe7dL8Ef2UNw0FCcwGjDyzwC43clHq3UqobSVgIFP+wRchHk CtUDCQesnnm8t4Ar6YGNq5c= X-Google-Smtp-Source: ABdhPJyxum0hAIsGKUQDt+qw44nnnOmGADd+iz0D8A+QyT69wJznXpft6ZD5PBdFWY4GNhNZ5AMA7g== X-Received: by 2002:a17:90a:a103:: with SMTP id s3mr4274115pjp.158.1615391122367; Wed, 10 Mar 2021 07:45:22 -0800 (PST) Received: from google.com ([2620:15c:211:201:64cb:74c7:f2c:e5e0]) by smtp.gmail.com with ESMTPSA id jt21sm6448248pjb.51.2021.03.10.07.45.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 07:45:21 -0800 (PST) Date: Wed, 10 Mar 2021 07:45:19 -0800 From: Minchan Kim To: David Hildenbrand Cc: Michal Hocko , Andrew Morton , linux-mm , LKML , John Dias , Jason Baron Subject: Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages Message-ID: References: <20210308202047.1903802-1-minchan@kernel.org> <5f0e17f2-b161-f0f1-65a4-a7b3af4d2cce@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f0e17f2-b161-f0f1-65a4-a7b3af4d2cce@redhat.com> X-Stat-Signature: nd8p9dn3b8p58mz9q8z3w34bhw4q7n1r X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E7FB9A0009E8 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf15; identity=mailfrom; envelope-from=""; helo=mail-pj1-f54.google.com; client-ip=209.85.216.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615391122-71232 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 Wed, Mar 10, 2021 at 09:20:40AM +0100, David Hildenbrand wrote: > On 10.03.21 08:42, Minchan Kim wrote: > > On Tue, Mar 09, 2021 at 08:15:41AM -0800, Minchan Kim wrote: > > > > < snip > > > > > > > [...] > > > > > +void dump_migrate_failure_pages(struct list_head *page_list) > > > > > +{ > > > > > + DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, > > > > > + "migrate failure"); > > > > > + if (DYNAMIC_DEBUG_BRANCH(descriptor) && > > > > > + alloc_contig_ratelimit()) { > > > > > + struct page *page; > > > > > + > > > > > + WARN(1, "failed callstack"); > > > > > + list_for_each_entry(page, page_list, lru) > > > > > + dump_page(page, "migration failure"); > > > > > + } > > > > > > > > Apart from the above, do we have to warn for something that is a > > > > debugging aid? A similar concern wrt dump_page which uses pr_warn and > > > > > > Make sense. > > > > > > > page owner is using even pr_alert. > > > > Would it make sense to add a loglevel parameter both into __dump_page > > > > and dump_page_owner? > > > > > > Let me try it. > > > > I looked though them and made first draft to clean them up. > > > > It's bigger than my initial expectaion because there are many callsites > > to use dump_page and stack_trace_print inconsistent loglevel. > > Since it's not a specific problem for this work, I'd like to deal with > > it as separate patchset since I don't want to be stuck on here for my > > initial goal. > > Why the need to rush regarding your series? > > If it will clean up your patch significantly, then I think doing the > cleanups first is the proper way to go. It doesn't clean up my patch at all. dump_page and internal functions are already broken in several places from print level point of view. I agreed that it's good to fix but it shouldn't be a block for the work since it's not a new particular problem this patch introduce. > > I really don't get why this is a real problem. That's because it's not my top priority.