From: Stefano Stabellini Subject: Re: [Hackathon minutes] PV block improvements Date: Mon, 24 Jun 2013 12:06:12 +0100 Message-ID: References: <519F81E1.8030203@citrix.com> <51C48923.1040808@citrix.com> <20130621201625.GA18283@phenom.dumpdata.com> <20130621231700.GA4470@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1342847746-1925728261-1372071972=:4782" Return-path: In-Reply-To: <20130621231700.GA4470@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: xen-devel , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org --1342847746-1925728261-1372071972=:4782 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 22 Jun 2013, Wei Liu wrote: > On Fri, Jun 21, 2013 at 04:16:25PM -0400, Konrad Rzeszutek Wilk wrote: > > On Fri, Jun 21, 2013 at 07:10:59PM +0200, Roger Pau Monn=C3=A9 wrote: > > > Hello, > > >=20 > > > While working on further block improvements I've found an issue with > > > persistent grants in blkfront. > > >=20 > > > Persistent grants basically allocate grants and then they are never > > > released, so both blkfront and blkback keep using the same memory pag= es > > > for all the transactions. > > >=20 > > > This is not a problem in blkback, because we can dynamically choose h= ow > > > many grants we want to map. On the other hand, blkfront cannot remove > > > the access to those grants at any point, because blkfront doesn't kno= w > > > if blkback has this grants mapped persistently or not. > > >=20 > > > So if for example we start expanding the number of segments in indire= ct > > > requests, to a value like 512 segments per requests, blkfront will > > > probably try to persistently map 512*32+512 =3D 16896 grants per devi= ce, > > > that's much more grants that the current default, which is 32*256 =3D= 8192 > > > (if using grant tables v2). This can cause serious problems to other > > > interfaces inside the DomU, since blkfront basically starts hoarding = all > > > possible grants, leaving other interfaces completely locked. > > >=20 > > > I've been thinking about different ways to solve this, but so far I > > > haven't been able to found a nice solution: > > >=20 > > > 1. Limit the number of persistent grants a blkfront instance can use, > > > let's say that only the first X used grants will be persistently mapp= ed > > > by both blkfront and blkback, and if more grants are needed the previ= ous > > > map/unmap will be used. > > >=20 > > > 2. Switch to grant copy in blkback, and get rid of persistent grants = (I > > > have not benchmarked this solution, but I'm quite sure it will involv= e a > > > performance regression, specially when scaling to a high number of do= mains). > > >=20 >=20 > Any chance that the speed of copying is fast enough for block devices? >=20 > > > 3. Increase the size of the grant_table or the size of a single grant > > > (from 4k to 2M) (this is from Stefano Stabellini). > > >=20 > > > 4. Introduce a new request type that we can use to request blkback to > > > unmap certain grefs so we can free them in blkfront. > >=20 > >=20 > > 5). Lift the limit of grant pages a domain can have. >=20 > If I'm not mistaken, this is basically the same as "increase the size of > the grant_table" in #3. Yes, that was one of the things I was suggesting, but it needs investigating: I wouldn't want that increasing the number of grant frames would reach a different scalability limit of the data structure. --1342847746-1925728261-1372071972=:4782 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 --1342847746-1925728261-1372071972=:4782--