Re: [Xen-devel] [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-28 Thread David Vrabel
On 27/07/16 04:21, Bob Liu wrote: > The current VBD layer reserves buffer space for each attached device based on > three statically configured settings which are read at boot time. > * max_indirect_segs: Maximum amount of segments. > * max_ring_page_order: Maximum order of pages to be used for t

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-28 Thread Roger Pau Monné
On Thu, Jul 28, 2016 at 07:05:05AM +0800, Bob Liu wrote: > > On 07/27/2016 10:24 PM, Roger Pau Monné wrote: > > On Wed, Jul 27, 2016 at 07:21:05PM +0800, Bob Liu wrote: > >> > >> On 07/27/2016 06:59 PM, Roger Pau Monné wrote: > >>> On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: > >>> [..

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Bob Liu
On 07/27/2016 10:24 PM, Roger Pau Monné wrote: > On Wed, Jul 27, 2016 at 07:21:05PM +0800, Bob Liu wrote: >> >> On 07/27/2016 06:59 PM, Roger Pau Monné wrote: >>> On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: >>> [...] +static ssize_t dynamic_reconfig_device(struct blkfront_info *i

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Roger Pau Monné
On Wed, Jul 27, 2016 at 07:21:05PM +0800, Bob Liu wrote: > > On 07/27/2016 06:59 PM, Roger Pau Monné wrote: > > On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: > > [...] > >> +static ssize_t dynamic_reconfig_device(struct blkfront_info *info, > >> ssize_t count) > >> +{ > >> + /* > >> +

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Bob Liu
On 07/27/2016 06:59 PM, Roger Pau Monné wrote: > On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: > [...] >> +static ssize_t dynamic_reconfig_device(struct blkfront_info *info, ssize_t >> count) >> +{ >> +/* >> + * Prevent new requests even to software request queue. >> + */ >

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Roger Pau Monné
On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: [...] > +static ssize_t dynamic_reconfig_device(struct blkfront_info *info, ssize_t > count) > +{ > + /* > + * Prevent new requests even to software request queue. > + */ > + blk_mq_freeze_queue(info->rq); > + > + /* >

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Roger Pau Monné
On Wed, Jul 27, 2016 at 05:12:22PM +0800, Bob Liu wrote: > > On 07/27/2016 04:07 PM, Roger Pau Monné wrote: > ..[snip].. > >> @@ -2443,6 +2674,22 @@ static void blkfront_connect(struct blkfront_info > >> *info) > >>return; > >>} > >> > >> + err = device_create_file(&info->xbdev

RE: [Xen-devel] [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Paul Durrant
> -Original Message- [snip] > > > > Also, I'm not sure this is correct, if blkfront sees the "Closing" state on > > blkback it will try to close the frontend and destroy the block device (see > > blkfront_closing), and this should be avoided. You should call > > blkfront_resume as soon as y

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Bob Liu
On 07/27/2016 04:07 PM, Roger Pau Monné wrote: ..[snip].. >> @@ -2443,6 +2674,22 @@ static void blkfront_connect(struct blkfront_info >> *info) >> return; >> } >> >> +err = device_create_file(&info->xbdev->dev, >> &dev_attr_max_ring_page_order); >> +if (err) >> +

Re: [PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-27 Thread Roger Pau Monné
Hello, Thanks for the fixes. On Wed, Jul 27, 2016 at 11:21:25AM +0800, Bob Liu wrote: > The current VBD layer reserves buffer space for each attached device based on > three statically configured settings which are read at boot time. > * max_indirect_segs: Maximum amount of segments. > * max_ri

[PATCH v3] xen-blkfront: dynamic configuration of per-vbd resources

2016-07-26 Thread Bob Liu
The current VBD layer reserves buffer space for each attached device based on three statically configured settings which are read at boot time. * max_indirect_segs: Maximum amount of segments. * max_ring_page_order: Maximum order of pages to be used for the shared ring. * max_queues: Maximum of