On Wed, Jun 25, 2014 at 03:46:04PM +0000, Damjan Marion (damarion) wrote: > > On 25 Jun 2014, at 17:29, Michael S. Tsirkin <m...@redhat.com> wrote: > > > On Wed, Jun 25, 2014 at 02:57:52PM +0000, Damjan Marion (damarion) wrote: > >> > >> On 25 Jun 2014, at 16:27, Michael S. Tsirkin <m...@redhat.com> wrote: > >> > >>> On Wed, Jun 25, 2014 at 02:20:56PM +0000, Damjan Marion (damarion) wrote: > >>>> > >>>> On 25 Jun 2014, at 16:13, Nikolay Nikolaev > >>>> <n.nikol...@virtualopensystems.com> wrote: > >>>> > >>>>>>> - it will require changes on the user side also > >>>>>> > >>>>>> why would it? > >>>>>> format seems unchanged, right? > >>>>> > >>>>> yes, but it will happen that multiple regions have same FD so call to > >>>>> mmap() > >>>>> should look different, I’m still playing with this on user side... > >>>>> but then you shoudl somehow accumulate the sizes and send just a single > >>>>> fd, something along these lines. > >>>> > >>>> Yes, so I’m not very happy with that approach and looking if there is > >>>> better proposal, > >>>> or at least wider agreement how to address this issue. > >>>> > >>>> Damjan > >>> > >>> still not sure what the issue is ... > >>> > >> > >> No issue, just additional logic is needed on user side to calculate total > >> size of shared regions and call mmap() once per FD. > >> > >> Agree? > > > > why not just call it multiple times? AFAIK linux handles this just fine. > > I need to specify size when calling mmap(), so i need to run trough all > regions and sum sizes before calling mmap().
You can map same file in many places. Just call mmap many times with offsets. -- MST