From: Wei Liu Subject: Re: blkback global resources Date: Tue, 27 Mar 2012 14:01:13 +0100 Message-ID: <1332853273.2485.100.camel@leeds.uk.xensource.com> References: <4F70ADD4020000780007AF3B@nat28.tlf.novell.com> <1332778808.26550.23.camel@zakaz.uk.xensource.com> <1332841265.2485.79.camel@leeds.uk.xensource.com> <4F71B111020000780007B190@nat28.tlf.novell.com> <1332851672.2485.96.camel@leeds.uk.xensource.com> <4F71D28C020000780007B239@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F71D28C020000780007B239@nat28.tlf.novell.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: Jan Beulich Cc: wei.liu2@citrix.com, Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, 2012-03-27 at 13:45 +0100, Jan Beulich wrote: > >>> On 27.03.12 at 14:34, Wei Liu wrote: > > On Tue, 2012-03-27 at 11:22 +0100, Jan Beulich wrote: > >> >>> On 27.03.12 at 11:41, Wei Liu wrote: > >> > On Mon, 2012-03-26 at 17:20 +0100, Ian Campbell wrote: > >> >> On Mon, 2012-03-26 at 16:56 +0100, Jan Beulich wrote: > >> >> > All the resources allocated based on xen_blkif_reqs are global in > >> >> > blkback. While (without having measured anything) I think that this > >> >> > is bad from a QoS perspective (not the least implied from a warning > >> >> > issued by Citrix'es multi-page-ring patches: > >> >> > > >> >> > if (blkif_reqs < BLK_RING_SIZE(order)) > >> >> > printk(KERN_WARNING "WARNING: " > >> >> > "I/O request space (%d reqs) < ring order %ld, " > >> >> > "consider increasing %s.reqs to >= %ld.", > >> >> > blkif_reqs, order, KBUILD_MODNAME, > >> >> > roundup_pow_of_two(BLK_RING_SIZE(order))); > >> >> > > >> >> > indicating that this _is_ a bottleneck), I'm otoh hesitant to convert > >> >> > this to per-instance allocations, as the amount of memory taken > >> >> > away from Dom0 for this may be not insignificant when there are > >> >> > many devices. > >> >> > > >> > > >> > What's your main concern on QoS? Lock contention? Starvation? Or any > >> > other things? > >> > >> However you want to put it. Prior to the multi-page ring patches, we > >> have 64 pending requests (global) and 32 ring entries. Obviously, > >> bumping the ring size just to order 1 will already bring the number of > >> possible in-flight entries per device on par with those in-flight across > >> all devices. So _if_ someone really determined that a multi-page ring > >> helps performance, I wonder whether that was with manually > >> adjusted global pending request values (not said anywhere) or with > >> just a single frontend (not very close to real world scenarios). > >> > > > > Just to be precise, bumping order to 1 makes ring entries more than 64. > > Iirc order 0 -> 32 entries, order 1 -> 64 entries. > I skimmed the code just to make sure. You're right, the size is rounded down to power of 2. What I was talking about is the value before rounded-down. Wei. > Jan >