Hi, El 26/8/20 a les 17:01, Samuel Thibault ha escrit: > I'm unsure if libpager will be useful actually, since all you need is > to pass on a memory object clamped to the target physical memory. See > gnumach's support for proxy memory object, which possibly is just > enough. > > Samuel >
I did a research on this and think I could implement file mapping in libnetfs based on this old patch by Marcus Brinkmann: https://lists.gnu.org/archive/html/bug-hurd/2001-10/msg00305.html Thomas Bushnell BSG answered to that message saying > You must promise the kernel that *any* change to the underlying data > for the mapped object will never change except with you telling the > kernel Which makes sense, but it seems to me it should be OK to enable file mapping in a net filesystem provided only memory proxy objects are used for this, since each proxy will belong to a memory object that meets the requirement of keeping the kernel updated on any change in the underlying data. So we can take the implementation of io_map from that patch, but adding a check to ensure whatever returned by the user from netfs_get_filemap() is a proxy object. Is there a way to check that? With that, from the aribter side we only need to get the default pager and create a proxy for each region file, with its boundaries and permissions, and write an implementation of netfs_get_filemap which returns the proper proxy for each request. What do you think?
signature.asc
Description: OpenPGP digital signature