Thread (23 messages) 23 messages, 7 authors, 2025-03-12

Re: [PATCH v2] mm: alloc_pages_bulk: remove assumption of populating only NULL elements

From: Yunsheng Lin <hidden>
Date: 2025-03-12 12:05:57
Also in: kvm, linux-btrfs, linux-mm, linux-nfs, linux-xfs, lkml, virtualization

On 2025/3/12 9:45, Gao Xiang wrote:

On 2025/3/12 06:55, NeilBrown wrote:
quoted
On Mon, 10 Mar 2025, Gao Xiang wrote:
quoted
   - Your new api covers narrow cases compared to the existing
     api, although all in-tree callers may be converted
     properly, but it increases mental burden of all users.
     And maybe complicate future potential users again which
     really have to "check NULL elements in the middle of page
     bulk allocating" again.
I think that the current API adds a mental burden for most users.  For
most users, their code would be much cleaner if the interface accepted
an uninitialised array with length, and were told how many pages had
been stored in that array.> A (very) few users benefit from the complexity.  So having two
interfaces, one simple and one full-featured, makes sense.
Thanks for the above clear summarization.
Ok, I think for this part, diferrent people has different
perference on API since there is no absolutely right and
wrong in the API design area.

But I have no interest to follow this for now.
Just to be clearer, as erofs seems to be able to be changed to
use a simple interface, do you prefer to keep using the full-featured
interface or change to use the simple interface?
Thanks,
Gao Xiang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help