Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp473349rwd; Thu, 8 Jun 2023 03:31:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rDHey2ndx5PsNgY7RyXjU5y2o6Fxwf4Uc/lUAzUfGjXKxiEq1te6kL2PwDGlwndKTzomm X-Received: by 2002:a05:6808:6d7:b0:393:fb3e:6151 with SMTP id m23-20020a05680806d700b00393fb3e6151mr7992919oih.50.1686220277407; Thu, 08 Jun 2023 03:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686220277; cv=none; d=google.com; s=arc-20160816; b=sR+OK9ggM34SWUDq6nGIXee8Lv1zh6xrxvhkwSkDQIBKtCRyo2C73JGK151fJyr2mC EzYsS3drLp5nlnOEF5w4C6uebhPKf7Kgb8bvgyaHNTb6+yPw10B6SA0TbFe8aNs8gfpS LpsQTx2E2zSqhfyqIcCnP7gVdrleOeHJJnIcN9oJpulEpxLbi+abpU1X+BKbtsMFqLhm L+m/Be7+/oaT/mWPKwLiDXC7stiN5AOzZZT3//cVv2BKEFuIh+7mtzwFlXh6WoxlozZs MerLPs5hRkSpxBqCe7WsoT1zCMbjMwbjHQImKM191X11gojwewNcZvrqXP0tUFFqZaak LvIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pp1skOxyiIndrCwRHdsolduOFYDDuJKNDO0O6RT8OJA=; b=lpe/ju+/5BeiQwuU6Jcz0pJjTJEg9eQrf+Epc3nhVShcGv7uLRlq9tC8Hh8fv1puz4 mAL/jLk6Kqe1drt00mnXTX6ynGbkn7pdUsCtWk2NX+nTEcDAB5D5KTnM7nrMjIwf3EHa 5oNPU5mbC/HVEmUFwmjar7wIRhxiZDQo7r20YQeh3l6VtxkwPBH1mZpwRvVvRUQAtNUA 0PF1e2h5LY3Puqx+MhITqta7wdlqYrmdrumK33ZpSwerTzthS7O1geayP9FzimVzcNz+ gM9lG3gwON6ccxkpOMFf+mtaziWhum88UV0MmTA0AICN8HQoYXWeNeQgqgo1IC8frNQm SG5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCr1Wl0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6385c3000000b00520dfb861fbsi803994pgd.416.2023.06.08.03.31.04; Thu, 08 Jun 2023 03:31:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCr1Wl0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235211AbjFHKOX (ORCPT + 99 others); Thu, 8 Jun 2023 06:14:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236023AbjFHKON (ORCPT ); Thu, 8 Jun 2023 06:14:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 127CB2D54 for ; Thu, 8 Jun 2023 03:14:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8987064BBE for ; Thu, 8 Jun 2023 10:14:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84C5BC433EF; Thu, 8 Jun 2023 10:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686219246; bh=A/yf/LULqe7cvpY9FNQQv9+HJYr9a5XLS/1CEJh4cUI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YCr1Wl0YP84wvIO2VnanRSDJFX8gKazY0fIbIaQQpeY8GwiC4hJKVKNwtW0q4LCzf t93zJ1seq5bE9yZRw83p/S4eY8irVRPlLZHE4zT70ZBfYBB8OH/X3eb29hyfK3F353 XbqPetAS+vr27HRFX6ytssh7f8WeSAZBa142EB+1TSWnufkB3VYtvjcFHm/6n9j9GZ jczUfeXFIjQA7EBXdX7DCGVMTVFYZ+tnHcgOjGY6svebxlSssNpgVxMIwRUPbwu7Dc NLTXt4JHsFOjeQllk02r4Aoh9kBaJnSVJN2MLSjmPTVdPELaClUG4Na86StyoAV/Jw Vnae3p4wKE9HA== Date: Thu, 8 Jun 2023 13:13:40 +0300 From: Mike Rapoport To: Michal Hocko Cc: Haifeng Xu , David Hildenbrand , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mm_init.c: add debug messsge for dma zone Message-ID: <20230608101340.GI52412@kernel.org> References: <20230607090734.1259-1-haifeng.xu@shopee.com> <34f32148-24c3-09a3-8bec-9515139e15b1@shopee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 08, 2023 at 11:18:02AM +0200, Michal Hocko wrote: > On Thu 08-06-23 15:38:48, Haifeng Xu wrote: > > > > > > On 2023/6/7 18:22, David Hildenbrand wrote: > > > On 07.06.23 12:16, Michal Hocko wrote: > > >> On Wed 07-06-23 09:07:34, Haifeng Xu wrote: > > >>> If freesize is less than dma_reserve, print warning message to report > > >>> this case. > > >> > > >> Why? > > > > > > I'd like to second that question, and add > > > > > > a) Did you run into that scenario? > > > b) What can an admin do in that case with that error messages? > > > > In theory,dma_reserve shouldn't exceed freesize, so the error messages can remind us > > to verify whether the configuration of reserved memory is correct. > > I am not really convinced this is worth touching the code TBH. The only architecture that sets the dma_reserve is x86_64 and it sets it to the number of reserved pages in DMA zone. There is no way freesize will be less than dma_reserve. I'm not sure that in general dma_reserve has some value now, but that's a completely different story. > -- > Michal Hocko > SUSE Labs -- Sincerely yours, Mike.