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 0628DC433DB for ; Thu, 18 Feb 2021 16:47:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4259864EB1 for ; Thu, 18 Feb 2021 16:47:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4259864EB1 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 773506B0006; Thu, 18 Feb 2021 11:47:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 724F96B006C; Thu, 18 Feb 2021 11:47:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63B176B006E; Thu, 18 Feb 2021 11:47:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id 4F31D6B0006 for ; Thu, 18 Feb 2021 11:47:33 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 18052612B for ; Thu, 18 Feb 2021 16:47:33 +0000 (UTC) X-FDA: 77831969586.16.army41_46165d627656 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id E9616100E6903 for ; Thu, 18 Feb 2021 16:47:32 +0000 (UTC) X-HE-Tag: army41_46165d627656 X-Filterd-Recvd-Size: 6328 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Feb 2021 16:47:32 +0000 (UTC) Received: by mail-pj1-f41.google.com with SMTP id fy5so1668315pjb.5 for ; Thu, 18 Feb 2021 08:47:32 -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=QLD/Vci8BmjI88mYbyEPyheGKG0KNpyI0nkYViJLyO4=; b=YHDVGz9Wm9nKaEw67Tpa9tyNwVeX/OK3qzLTbNPaILkqjBy4kTvgggy2iLcv+k2EwG rqsngVVMewnsiMnAkATXJ/l4pEhdkMFH/KDvGkToe1C9is3KG9QFm8ouC/d9Dc1cP27V PWYss9F4yORor9Bf9/0aLD9HJp+m3eQRs2GRZ6Di182fy2nceb4R8xMFB7cnUtwjOAvd RNUt2ZB3DR7CkCm3Dafk8OVP485zHB42AUkzr8wOc9lvHMDZJUpTUVhEVDT1hiTRelUc 8iAfN7qgX98vRzGubsqrwfuZnUEnbt7U1iLHbWDmvAY3ZNiaWwUaZrw2vzG8WRfjHR1E KGaw== 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=QLD/Vci8BmjI88mYbyEPyheGKG0KNpyI0nkYViJLyO4=; b=jzJKY2RKPFlLedLFT9k8P9EuaEAuOIIfmCaAf4+gVqiIjO5h0oYJgcH4i6xjvEtRwz 7dR98lG8uaMfLW6GTcKUSqKUPAprLfYEMEmDPKC6yT+3jXlAF3cqh7Xq+cb9gI8tkH75 Io0AxXR5ME2uLfwTC7h/NE9Pba4NVnbRnJsp/jgFA+8hWCCXupDJDPHCZ1/Z73SxFcJ7 X214175a0T4zWEBRZJkGwfpRsVHTswTLs0xBsf3BBtE8Wfwa0jDbxKgHFr3UXbDc7eC0 yCV9v7wOfbYpGQpYwq2F6+uOf+cakP8SrZvCvnH79h9ffusPLRo92751OZ597uGOGXsJ tINA== X-Gm-Message-State: AOAM530sx35mfuyAIdHaDTYbouX8LBV1KKeMUUY6NJ0emyMDMLlsUAzO qoSG9a9DYiBF3FpYtDXeKSe1Ow0D+KM= X-Google-Smtp-Source: ABdhPJwoZfClDSLYCjn0A9YHv8diVsM02fTK00Xfw2+4RfmSwoJwROlZgiTYngLZZrqjzVcRE3H7DA== X-Received: by 2002:a17:90b:4c8c:: with SMTP id my12mr4780789pjb.35.1613666851454; Thu, 18 Feb 2021 08:47:31 -0800 (PST) Received: from google.com ([2620:15c:211:201:157d:8a19:5427:ea9e]) by smtp.gmail.com with ESMTPSA id v9sm6014020pju.33.2021.02.18.08.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 08:47:30 -0800 (PST) Date: Thu, 18 Feb 2021 08:47:28 -0800 From: Minchan Kim To: David Hildenbrand Cc: Michal Hocko , Andrew Morton , linux-mm , LKML , joaodias@google.com Subject: Re: [PATCH] mm: be more verbose for alloc_contig_range faliures Message-ID: References: <20210217163603.429062-1-minchan@kernel.org> <2f167b3c-5f0a-444a-c627-49181fc8fe0d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Feb 18, 2021 at 05:26:08PM +0100, David Hildenbrand wrote: > On 18.02.21 17:19, Minchan Kim wrote: > > On Thu, Feb 18, 2021 at 10:43:21AM +0100, David Hildenbrand wrote: > > > On 18.02.21 10:35, Michal Hocko wrote: > > > > On Thu 18-02-21 10:02:43, David Hildenbrand wrote: > > > > > On 18.02.21 09:56, Michal Hocko wrote: > > > > > > On Wed 17-02-21 08:36:03, Minchan Kim wrote: > > > > > > > alloc_contig_range is usually used on cma area or movable zone. > > > > > > > It's critical if the page migration fails on those areas so > > > > > > > dump more debugging message like memory_hotplug unless user > > > > > > > specifiy __GFP_NOWARN. > > > > > > > > > > > > I agree with David that this has a potential to generate a lot of output > > > > > > and it is not really clear whether it is worth it. Page isolation code > > > > > > already has REPORT_FAILURE mode which currently used only for the memory > > > > > > hotplug because this was just too noisy from the CMA path - d381c54760dc > > > > > > ("mm: only report isolation failures when offlining memory"). > > > > > > > > > > > > Maybe migration failures are less likely to fail but still. > > > > > > > > > > Side note: I really dislike that uncontrolled error reporting on memory > > > > > offlining path we have enabled as default. Yeah, it might be useful for > > > > > ZONE_MOVABLE in some cases, but otherwise it's just noise. > > > > > > > > > > Just do a "sudo stress-ng --memhotplug 1" and see the log getting flooded > > > > > > > > Anyway we can discuss this in a separate thread but I think this is not > > > > a representative workload. > > > > > > Sure, but the essence is "this is noise", and we'll have more noise on > > > alloc_contig_range() as we see these calls more frequently. There should be > > > an explicit way to enable such *debug* messages. > > > > alloc_contig_range already has gfp_mask and it respects __GFP_NOWARN. > > I am not 100% sure it does. Oh, it should. Otherwise, let's fix either of caller or alloc_contig_range since we have a customer. ``` ret = alloc_contig_range(pfn, pfn + count, MIGRATE_CMA, GFP_KERNEL | (no_warn ? __GFP_NOWARN : 0)) ``` > > > Why shouldn't people use it if they don't care the failure? > > Because flooding the log with noise maybe a handful of people on this planet > care about is absolutely useless. With the warnings in warn_alloc() people > can at least conclude something reasonable. > > > Semantically, it makes sense to me. > > > > About the messeage flooding, shouldn't we go with ratelimiting? > > At least that (see warn_alloc()). But I'd even want to see some other > trigger to enable this explicitly on demand. No objection. How about adding verbose knob under CONFIG_CMA_DEBUGFS with alloc_contig_range(..., bool verbose) like start_isolate_page_range? If admin turns on the verbose mode under CONFIG_CMA_DEBUGFS, cma_alloc will pass alloc_contig_range(...., true).