[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a369ca46-f2c7-7d84-c67c-7006e13f1ada@shopee.com>
Date: Thu, 8 Jun 2023 18:51:30 +0800
From: Haifeng Xu <haifeng.xu@...pee.com>
To: Mike Rapoport <rppt@...nel.org>, Michal Hocko <mhocko@...e.com>
Cc: David Hildenbrand <david@...hat.com>, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mm_init.c: add debug messsge for dma zone
On 2023/6/8 18:13, Mike Rapoport wrote:
> 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.
Yes. From the comments, x86_64 calculates the dma_reserve in order to set zone watermarks more
accurately. But berfore init_per_zone_wmark_min(), memblock_free_all() has already recalculated
the managed pages. It seems that the dma_reserve is not really helpful to this.
>
> I'm not sure that in general dma_reserve has some value now, but that's a
> completely different story.
>
>> --
>> Michal Hocko
>> SUSE Labs
>
Powered by blists - more mailing lists