From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzpSq-0006Kq-DF for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:50:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzpSk-0007CY-4o for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:50:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzpSj-0007CN-SA for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:50:18 -0400 Date: Wed, 25 Jun 2014 18:50:38 +0300 From: "Michael S. Tsirkin" Message-ID: <20140625155038.GG15720@redhat.com> References: <20140625135207.GC14578@redhat.com> <20140625142704.GC15277@redhat.com> <7B7FFD16-82ED-4D0E-8B83-A6448DC9A344@cisco.com> <20140625152936.GB15720@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] vhost-user: broken mem regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Damjan Marion (damarion)" Cc: "pbonzini@redhat.com" , "qemu-devel@nongnu.org" , Nikolay Nikolaev On Wed, Jun 25, 2014 at 03:46:04PM +0000, Damjan Marion (damarion) wrote: >=20 > On 25 Jun 2014, at 17:29, Michael S. Tsirkin wrote: >=20 > > On Wed, Jun 25, 2014 at 02:57:52PM +0000, Damjan Marion (damarion) wr= ote: > >>=20 > >> On 25 Jun 2014, at 16:27, Michael S. Tsirkin wrote: > >>=20 > >>> On Wed, Jun 25, 2014 at 02:20:56PM +0000, Damjan Marion (damarion) = wrote: > >>>>=20 > >>>> On 25 Jun 2014, at 16:13, Nikolay Nikolaev wrote: > >>>>=20 > >>>>>>> - it will require changes on the user side also > >>>>>>=20 > >>>>>> why would it? > >>>>>> format seems unchanged, right? > >>>>>=20 > >>>>> yes, but it will happen that multiple regions have same FD so cal= l to mmap() > >>>>> should look different, I=E2=80=99m still playing with this on use= r side... > >>>>> but then you shoudl somehow accumulate the sizes and send just a = single fd, something along these lines.=20 > >>>>=20 > >>>> Yes, so I=E2=80=99m not very happy with that approach and looking = if there is better proposal,=20 > >>>> or at least wider agreement how to address this issue. > >>>>=20 > >>>> Damjan > >>>=20 > >>> still not sure what the issue is ... > >>>=20 > >>=20 > >> No issue, just additional logic is needed on user side to calculate = total size of shared regions and call mmap() once per FD. > >>=20 > >> Agree? > >=20 > > why not just call it multiple times? AFAIK linux handles this just fi= ne. >=20 > 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. --=20 MST