vm_operations_struct sync/unmap replacements?

From: Paul Mundt
Date: Fri Aug 15 2003 - 14:42:54 EST


This particular issue seems to have been raised before (at least in the unmap
case) according to google, but there doesn't seem to be any obvious resolution
that I've been able to find.

In short, we need (or rather, want) both sync and unmap for a store queue
implementation for sh. The main requirement is manually remapping special
virtual addresses that we know ahead of time against a phys addr handed off
by mmap(). Writes to the remapped area subsequently need to be flushed from
the queues (which would work quite nicely from msync()). Looking through
mm/msync.c it seems that fsync() is the only candidate for a driver callback,
which unfortunately isn't quite as nice as the old sync() where both the
size and the base could be specified directly.

Also, since allocations are tracked in a list, the unmap() functionality would
be nice to have, as it provides us with a much saner method for cleaning up
this stuff. The only other option I see here is to do this at VMA close time,
which can potentially leave us with stale entries for quite awhile, and also
leaves us with the overhead of linearly searching the list and cleaning up
after the allocations.

It seems that both of these were removed around 2.4-test time, since apparently
there weren't any users at the time. Is there any objection to adding these
back in for 2.6? Does anyone have any suggestions for any useful workarounds
for getting the same sort of functionality without having to resort to endless
ioctl stupidity?

Attachment: pgp00000.pgp
Description: PGP signature