[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <483f22fe-1830-8b5c-c32d-9422e356f296@huawei.com>
Date: Tue, 16 Apr 2024 21:11:27 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Bagas Sanjaya <bagasdotme@...il.com>, <davem@...emloft.net>,
<kuba@...nel.org>, <pabeni@...hat.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Alexander Duyck
<alexander.duyck@...il.com>, Jonathan Corbet <corbet@....net>, Andrew Morton
<akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
<linux-doc@...r.kernel.org>
Subject: Re: [PATCH net-next v2 14/15] mm: page_frag: update documentation for
page_frag
On 2024/4/16 14:13, Bagas Sanjaya wrote:
> On Mon, Apr 15, 2024 at 09:19:39PM +0800, Yunsheng Lin wrote:
>> +API interface
>> +=============
>> +As the design and implementation of page_frag API, the allocation side does not
> "... implies, the allocation side ..."
>> +allow concurrent calling, it is assumed that the caller must ensure there is not
> "... . Instead, it is assumed that ...:
>> +concurrent alloc calling to the same page_frag_cache instance by using it's own
> "... by using its own ..."
>> +lock or rely on some lockless guarantee like NAPI softirq.
>> +
>> +Depending on different use cases, callers expecting to deal with va, page or
>> +both va and page for them may call page_frag_alloc_va*, page_frag_alloc_pg*,
>> +or page_frag_alloc* API accordingly.
>> +
>> +There is also a use case that need minimum memory in order for forward
>> +progressing, but can do better if there is more memory available. Introduce
> Did you mean "... but more performant if more memory is available"?
>> +page_frag_alloc_prepare() and page_frag_alloc_commit() related API, the caller
> s/Introduce/Using/
>> +requests the minimum memory it need and the prepare API will return the maximum
>> +size of the fragment returned, caller need to report back to the page_frag core
> "The caller needs to either call the commit API ..."
>> +how much memory it actually use by calling commit API, or not calling the commit
> "... to report how much memory it actually uses ..."
>> +API if deciding to not use any memory.
> "... or not do so if deciding to not use any memory."
Thanks.
Your wording seems better than mine, will update it accordingly.
>
> Thanks.
>
Powered by blists - more mailing lists