Re: [fuse-devel] [PATCH] FUSE/CUSE: implement direct mmap support

From: Miklos Szeredi
Date: Thu Feb 11 2010 - 08:40:46 EST


On Thu, 11 Feb 2010, Tejun Heo wrote:
> > So there are different offsets:
> >
> > a) vma->vm_pgoff (which may mean anything, but usually means b)
>
> Yeap, vma->vm_pgoff can be any value and doesn't really matter. The
> only visible difference would be the /proc listing, right? Setting
> this to the requested offset is trivial.

You mean leaving it at the requested offset? Yes, that's the most
trivial thing to do. Very few drivers change vm_pgoff:

git grep "vm_pgoff *=[^=]"

> > b) the offset at which the pages of the mapping are located
> > c) the offset at which the server side mmap is located
>
> There are three offsets.
>
> a) the offset a client requested
>
> b) the offset into dmmap AS, a client mmap region is mapped to. This
> could be different from a) by multiple of SHMLBA / PAGE_SIZE.

No, it could be different from a) by an arbitrary value.

>
> c) the offset into dmmap AS, a server mmap region is mapped to, where
> collection of these mmaps define the dmmap AS.
>
> The offsets used in b) and c) are the same offsets.

Why are they the same?

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/