Re: [PATCH RFC] userfaultfd: introduce UFFDIO_COPY_MODE_YOUNG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/14/22 14:52, Nadav Amit wrote:
Actually, I think passing around a struct might be overkill, when you can
simply collapse the various boolean args into a single flags arg. It looked
like a lot of the new args were bools...

Ok. Whatever you prefer. I thought that having something similar to “struct
vm_fault” makes sense, especially since it would allow to avoid propagating
ugly arguments like mmap_changing. But I do not care enough to argue.

Actually, I think you could make a case for passing around a struct.
The argument list is getting longer. I don't actually have an opinion
on that point, other than to point out the obvious: if you usually need
most of the struct fields (args) in each function call, then a struct
might be an improvement. But if you only need a few, then a struct passes
up the opportunity to have some function calls that are much simpler
and shorter.

It's the flags point that I really think you want to stick with, either
a flags arg, or a .flags field.

thanks,
--
John Hubbard
NVIDIA




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux