public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: mszeredi@suse.cz, linux-kernel@vger.kernel.org,
	fuse-devel@lists.sourceforge.net, polynomial-c@gentoo.org,
	akpm@linux-foundation.org
Subject: Re: [fuse-devel] [PATCH] FUSE/CUSE: implement direct mmap support
Date: Wed, 10 Feb 2010 20:56:55 +0900	[thread overview]
Message-ID: <4B729F07.8020704@kernel.org> (raw)
In-Reply-To: <E1NfAl6-0000o4-8Z@pomaz-ex.szeredi.hu>

Hello,

On 02/10/2010 08:29 PM, Miklos Szeredi wrote:
>> This is achieved by enforcing address to offset alignment.  IOW, all
>> maps are forced to be SHMLBA aligned to offset so that all maps are
>> SHMLBA aligned to each other.
> 
> Okay, lets be a little clearer.  There are client side maps and server
> side maps.  Client side maps are naturally aligned (same offset ->
> same page).

Same offset -> same page doesn't hold.  Clients mappings sharing the
same offset can end up with different physical pages.  ie. Process A
opening /dev/dsp and mmapping at 0 and process B doing the same thing
clearly need to be served with different pages and that's one of the
reasons why the server is given the ability to adjust the offset.

> So that leaves server side maps needing to be aligned to client side
> maps.  Since we use the offset into the mmap as the ID, we might as
> well just cheat and calculate a maching offset for the server side map
> and use that.  I'm not worried about changing vma->vm_pgoff there, if
> that's the only way to get proper alignment, since those are not
> "proper" mmaps anyway.
...
> Currently you are aligning client/client maps by changing the
> requested offset.  That's like saying: you wanted the file mapped from
> offset X, but we mapped it from offset Y because that's better
> aligned.  It doesn't make much sense, if the filesystem is doing
> something nasty like that, then to hell with cache alignment.

I think we're misunderstanding each other pretty good here.  I really
can't understand the above paragraph.  The offset adjustment is to
allow the server to choose which clients share which mappings.  It's
not to align anything.  The alignment is done by the generic VM layer
against the offset.  The SHMLBA requirement for the FUSE server is
there so that the FUSE server doesn't break the alignment while
changing the offset.

Can you please elaborate how you think the thing can work without
referencing the proposed implementation?  Let's find out where the
misundertanding is.

Thanks.

-- 
tejun

  reply	other threads:[~2010-02-10 11:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09  6:08 [PATCH] FUSE/CUSE: implement direct mmap support Tejun Heo
2010-02-09 14:59 ` [fuse-devel] " Miklos Szeredi
2010-02-10 11:22   ` Tejun Heo
2010-02-10 11:29     ` Miklos Szeredi
2010-02-10 11:56       ` Tejun Heo [this message]
2010-02-10 12:15         ` Miklos Szeredi
2010-02-10 12:35           ` Tejun Heo
2010-02-10 15:02             ` Miklos Szeredi
2010-02-10 23:43               ` Tejun Heo
2010-02-11  9:31                 ` Miklos Szeredi
2010-02-11  9:51                   ` Miklos Szeredi
2010-02-11 11:54                     ` Tejun Heo
2010-02-11 12:25                       ` Miklos Szeredi
2010-02-11 12:49                         ` Tejun Heo
2010-02-11 12:46                           ` Miklos Szeredi
2010-02-11 13:05                             ` Tejun Heo
2010-02-11 13:08                               ` Miklos Szeredi
2010-02-11 13:40                                 ` Tejun Heo
2010-02-11 11:47                   ` Tejun Heo
2010-02-11 12:34                     ` Miklos Szeredi
2010-02-11 12:56                       ` Tejun Heo
2010-02-11 13:01                         ` Miklos Szeredi
2010-02-11 13:30                           ` Tejun Heo
2010-02-11 13:40                             ` Miklos Szeredi
2010-02-11 13:58                               ` Tejun Heo
2010-02-11 14:40                                 ` Miklos Szeredi
2010-02-12  0:07                                   ` Tejun Heo
2010-02-12  0:25                                     ` Tejun Heo
2010-02-12  9:55                                     ` Miklos Szeredi
2010-02-12 13:33                                       ` Tejun Heo
2010-02-12 13:53                                         ` Miklos Szeredi
2010-02-12 17:56                                           ` Tejun Heo
2010-02-10 11:36     ` Tejun Heo
2010-02-10  8:24 ` Goswin von Brederlow
2010-02-10  8:40   ` Miklos Szeredi
2010-02-10  8:58   ` Paul Schutte
2010-02-10 10:02     ` Paul Schutte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B729F07.8020704@kernel.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@suse.cz \
    --cc=polynomial-c@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox