On Sun 15-10-17 10:50:29, Guy Shattah wrote:
So you are saying that providing an API which fails randomly because of
On 13/10/2017 19:17, Michal Hocko wrote:
On Fri 13-10-17 10:56:13, Cristopher Lameter wrote:In what way? userspace users will still be working with virtual memory.
On Fri, 13 Oct 2017, Michal Hocko wrote:availability of the virtual address space depends on the availability of
It does do that? In what way?There is a generic posix interface that could we used for a variety ofYes you wrote that already and my counter argument was that this generic
specific hardware dependent use cases.
posix interface shouldn't bypass virtual memory abstraction.
the same sized contiguous physical memory range. That sounds like the
abstraction is gone to large part to me.
the physically fragmented memory is OK? Users shouldn't really care
about the state of the physical memory. That is what we have the virtual
memory for.
Because users shouldn't really care, really. We do have means to getWhy have several driver specific implementation if you can generalize theBut a generic implementation would have to deal with many issues asAnd then in all the other use cases as well. It would be much easier ifThere are numerous RDMA devices that would all need the mmapThat doesn't prevent providing a library function which could be reused
implementation. And this covers only the needs of one subsystem. There are
other use cases.
by all those drivers. Nothing really too much different from
remap_pfn_range.
mmap could give you the memory you need instead of havig numerous drivers
improvise on their own. This is in particular also useful
for numerous embedded use cases where you need contiguous memory.
already mentioned. If you make this driver specific you can have access
control based on fd etc... I really fail to see how this is any
different from remap_pfn_range.
idea and implement
an already existing POSIX standard?
large memory and having a guaranteed large memory is a PITA. Just look
at hugetlb and all the issues it exposes. And that one is preallocated
and it requires admin to do a conscious decision about the amount of the
memory. You would like to establish something similar except without
bounds to the size and no pre-allowed amount by an admin. This sounds
just crazy to me.
We tried doing it in the past. but the maintainer gave us a very good argument:
On the other hand if you make this per-device mmap implementation you
can have both admin defined policy on who is allowed this memory and
moreover drivers can implement their fallback strategies which best suit
their needs. I really fail to see how this is any different from using
specialized mmap implementations.
I might be really wrong but I consider such a general purpose flag quiteCould you please elaborate why is it dangerous and future maintenance burden?
dangerous and future maintenance burden. At least from the hugetlb/THP
history I do not see why this should be any different.