From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: Re: [PATCH 5/7] libxc: implement gntshr for minios Date: Mon, 29 Apr 2013 01:17:16 +0200 Message-ID: <517DADFC.9060706@invisiblethingslab.com> References: <7289d991a6953ebc95102bd2c509b71d7232e911.1366987505.git.marmarek@invisiblethingslab.com> <20130428224425.GK4962@type.youpi.perso.aquilenet.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2412402214609674805==" Return-path: In-Reply-To: <20130428224425.GK4962@type.youpi.perso.aquilenet.fr> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Thibault , xen-devel@lists.xen.org, Stefano Stabellini , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============2412402214609674805== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2RGKOFUAPVVSKBMXTLVTV" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2RGKOFUAPVVSKBMXTLVTV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 29.04.2013 00:44, Samuel Thibault wrote: > Marek Marczykowski, le Tue 23 Apr 2013 05:17:59 +0200, a =C3=A9crit : >> +static int minios_gntshr_munmap(xc_gntshr *xcg, xc_osdep_handle h, >> + void *start_address, uint32_t count) >> +{ >> + int i; >> + uint32_t gref; >> + >> + for (i =3D 0; i < count; i++) { >> + gref =3D gnttab_find_grant_of_page(start_address + i * PAGE_S= IZE); >=20 > This can become quite expensive. Can we really not afford allocating th= e > list of grants, keeping its adresse in the xc_osdep_handle? count is number of pages, so most likely gnttab_find_grant_of_page() will= be called no more than few times. Also most likely munmap will be called ver= y rarely (connection close). Anyway I haven't calculated how much memory such mapping will require and= how much memory is still available in stubdom. Do you have some numbers? What can be xc_osdep_handle? In (almost?) every case it is file descripto= r. Can it be some memory pointer? --=20 Best Regards / Pozdrawiam, Marek Marczykowski Invisible Things Lab ------enig2RGKOFUAPVVSKBMXTLVTV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRfa38AAoJENuP0xzK19cs+6wIAIz+pPwVCPGFpVZ2U6Wicw7L xdrm8L4ozrb4iHKVJQ8ik6dkof/g2POV5NPcA4QZWxLnvbgY2xo3jxRftXI48ZaP dSr88yxsDPdza2bdwYFZlmQUM9EE1W5bG+UmHRD898wEogBk3KcD6LmLvdoRCL5L DSF1GjKRu4hN15W9TDHbxsqRJyu0dBgmMlpZavuDWoF+DYCF9XKDg8NXShbf2rGd lTt/cxUfQnAaTVZB82IXDwllrgTwQ9nbC/6vuOsQ6z5lGjp4+W3t5TQAmz5YDqHd jjwkk1WbmxxFODfkxIhlJI0pFhi4yk4pmgsnSZFwexA15BOeYgmsBgAPlp27304= =e/Is -----END PGP SIGNATURE----- ------enig2RGKOFUAPVVSKBMXTLVTV-- --===============2412402214609674805== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============2412402214609674805==--