Note that in that case mmap() would be coherent with itself, but still
probably not coherent with read/write without _major_ surgery in the VM.
So even the per-file flag doesn't really help.
It also gets really hard to do a sane replacement policy for _any_ backing
store (in order to cover the whole file). The problem with the replacement
policy is that we simply cannot unmap the big page sanely, because we
don't want to force a huge 4MB IO of dirty data, _and_ because the VM
doesn't know about big pages in the first place.
My suggested interface only does anonymous pages exactly for this reason:
you get a fixed number of big pages, and no more. No replacement policies
to worry about, no fundamental VM changes, and you get what people
actually want to have (then you can teach some well-defined places like
the direct-IO page walking about the big page, so that the database can do
IO directly into a _part_ of the page).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/