[PATCH RFC 1/4] xen-gnt: prevent adding duplicate gnt callbacks

2013-07-08 Thread Roger Pau Monne
ere callback == callback->next. Replace this check with a proper one that iterates over the list to see if the callback has already been added. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk --- drivers/xen/grant-table.c | 13 +++-- 1 files changed, 11 insertions(+), 2 del

[PATCH RFC 4/4] xen-block: introduce a new request type to unmap grants

2013-07-08 Thread Roger Pau Monne
as an array of grant_ref_t once the indirect pages are mapped. This prevents us from introducing a new request struct, since we re-use the same struct from the indirect operation. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c | 108

[PATCH RFC 4/4] xen-block: introduce a new request type to unmap grants

2013-07-08 Thread Roger Pau Monne
as an array of grant_ref_t once the indirect pages are mapped. This prevents us from introducing a new request struct, since we re-use the same struct from the indirect operation. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen

[PATCH RFC 1/4] xen-gnt: prevent adding duplicate gnt callbacks

2013-07-08 Thread Roger Pau Monne
callback == callback-next. Replace this check with a proper one that iterates over the list to see if the callback has already been added. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/xen/grant-table.c | 13 +++-- 1 files

[PATCH RFC 2/4] xen-blkfront: improve aproximation of required grants per request

2013-07-08 Thread Roger Pau Monne
Improve the calculation of required grants to process a request by using nr_phys_segments instead of always assuming a request is going to use all posible segments. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen

[PATCH RFC 0/4] xen-block: prevent blkfront for hoarding grants

2013-07-08 Thread Roger Pau Monne
The following patches prevent blkfront from hoarding all grants in the system by allowing blkfront to request blkback to unmap certain grants so they can be freed by blkfront. This is done periodically by blkfront, unmapping a certain amount of unused persistent grants. This series also

[PATCH RFC 3/4] xen-blkfront: prevent hoarding all grants

2013-07-08 Thread Roger Pau Monne
Prevent blkfront from hoarding all grants by adding a minimum number of grants that must be free at all times. We still need a way to free unused grants in blkfront, but this patch will mitigate the problem in the meantime. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek

Re: [PATCH v2 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-25 Thread Roger Pau Monné
On 24/06/13 15:28, Konrad Rzeszutek Wilk wrote: > On Sat, Jun 22, 2013 at 09:59:17AM +0200, Roger Pau Monne wrote: >> With the introduction of indirect segments we can receive requests >> with a number of segments bigger than the maximum number of allowed >> iovecs in

Re: [PATCH v2 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-25 Thread Roger Pau Monné
On 24/06/13 15:28, Konrad Rzeszutek Wilk wrote: On Sat, Jun 22, 2013 at 09:59:17AM +0200, Roger Pau Monne wrote: With the introduction of indirect segments we can receive requests with a number of segments bigger than the maximum number of allowed iovecs in a bios, so make sure that blkback

[PATCH v2 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-22 Thread Roger Pau Monne
With the introduction of indirect segments we can receive requests with a number of segments bigger than the maximum number of allowed iovecs in a bios, so make sure that blkback doesn't try to allocate a bios with more iovecs than BIO_MAX_PAGES Signed-off-by: Roger Pau Monné Cc: Konrad

[PATCH v2 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-22 Thread Roger Pau Monne
With the introduction of indirect segments we can receive requests with a number of segments bigger than the maximum number of allowed iovecs in a bios, so make sure that blkback doesn't try to allocate a bios with more iovecs than BIO_MAX_PAGES Signed-off-by: Roger Pau Monné roger@citrix.com

Re: [Xen-devel] [PATCH 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-21 Thread Roger Pau Monné
On 21/06/13 13:46, Jan Beulich wrote: >>>> On 21.06.13 at 12:56, Roger Pau Monne wrote: >> @@ -1236,7 +1236,8 @@ static int dispatch_rw_block_io(struct xen_blkif >> *blkif, >> seg[i].nsec << 9, >>

[PATCH 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-21 Thread Roger Pau Monne
With the introduction of indirect segments we can receive requests with a number of segments bigger than the maximum number of allowed iovecs in a bios, so make sure that blkback doesn't try to allocate a bios with more iovecs than BIO_MAX_PAGES Signed-off-by: Roger Pau Monné Cc: Konrad

[PATCH 2/4] xen-blkfront: set blk_queue_max_hw_sectors correctly

2013-06-21 Thread Roger Pau Monne
Now that indirect segments are enabled blk_queue_max_hw_sectors must be set to match the maximum number of sectors we can handle in a request. Signed-off-by: Roger Pau Monné Reported-by: Felipe Franciosi Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkfront.c |2 +- 1 files changed, 1

[PATCH 4/4] xen-blkfront: increase the default number of indirect segments

2013-06-21 Thread Roger Pau Monne
When using certain storage devices (like RAID) having a bigger number of segments per request provides better performance. Signed-off-by: Roger Pau Monné Reported-by: Steven Haigh Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkfront.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 0/4] xen-block: bug fixes for indirect-descriptors

2013-06-21 Thread Roger Pau Monne
This series contains a small number of bug fixes and improvements for xen-block indirect descriptors. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/4] xen-blkback: workaround compiler bug in gcc 4.1

2013-06-21 Thread Roger Pau Monne
, that will be set when all the desired persistent grants have been removed and we need to iterate over the remaining ones to remove the WAS_ACTIVE flag. Signed-off-by: Roger Pau Monné Reported-by: Tom O'Neill Reported-by: Konrad Rzeszutek Wilk Cc: Konrad Rzeszutek Wilk --- drivers/block/xen

[PATCH 1/4] xen-blkback: workaround compiler bug in gcc 4.1

2013-06-21 Thread Roger Pau Monne
, that will be set when all the desired persistent grants have been removed and we need to iterate over the remaining ones to remove the WAS_ACTIVE flag. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Tom O'Neill tone...@vmem.com Reported-by: Konrad Rzeszutek Wilk konrad.w

[PATCH 2/4] xen-blkfront: set blk_queue_max_hw_sectors correctly

2013-06-21 Thread Roger Pau Monne
Now that indirect segments are enabled blk_queue_max_hw_sectors must be set to match the maximum number of sectors we can handle in a request. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Felipe Franciosi felipe.franci...@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w

[PATCH 4/4] xen-blkfront: increase the default number of indirect segments

2013-06-21 Thread Roger Pau Monne
When using certain storage devices (like RAID) having a bigger number of segments per request provides better performance. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Steven Haigh net...@crc.id.au Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen

[PATCH 0/4] xen-block: bug fixes for indirect-descriptors

2013-06-21 Thread Roger Pau Monne
This series contains a small number of bug fixes and improvements for xen-block indirect descriptors. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-21 Thread Roger Pau Monne
With the introduction of indirect segments we can receive requests with a number of segments bigger than the maximum number of allowed iovecs in a bios, so make sure that blkback doesn't try to allocate a bios with more iovecs than BIO_MAX_PAGES Signed-off-by: Roger Pau Monné roger@citrix.com

Re: [Xen-devel] [PATCH 3/4] xen-blkback: check the number of iovecs before allocating a bios

2013-06-21 Thread Roger Pau Monné
On 21/06/13 13:46, Jan Beulich wrote: On 21.06.13 at 12:56, Roger Pau Monne roger@citrix.com wrote: @@ -1236,7 +1236,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, seg[i].nsec 9, seg[i].offset) == 0

Re: [Xen-devel] [GIT PULL] (xen) stable/for-jens-3.10 xenwatch: page allocation failure: order:7, mode:0x10c0d0

2013-05-06 Thread Roger Pau Monné
On 04/05/13 09:34, Sander Eikelenboom wrote: > Hello Sander, > > Monday, April 29, 2013, 6:05:20 PM, you wrote: > > >> Monday, April 29, 2013, 5:46:23 PM, you wrote: > >>> On Wed, Apr 24, 2013 at 08:16:37PM +0200, Sander Eikelenboom wrote: Friday, April 19, 2013, 4:44:01 PM, you wrote:

Re: [Xen-devel] [GIT PULL] (xen) stable/for-jens-3.10 xenwatch: page allocation failure: order:7, mode:0x10c0d0

2013-05-06 Thread Roger Pau Monné
On 04/05/13 09:34, Sander Eikelenboom wrote: Hello Sander, Monday, April 29, 2013, 6:05:20 PM, you wrote: Monday, April 29, 2013, 5:46:23 PM, you wrote: On Wed, Apr 24, 2013 at 08:16:37PM +0200, Sander Eikelenboom wrote: Friday, April 19, 2013, 4:44:01 PM, you wrote: Hey Jens,

Re: [PATCH] xen-blkback: allocate list of pending reqs in small chunks

2013-05-02 Thread Roger Pau Monné
On 29/04/13 20:37, Konrad Rzeszutek Wilk wrote: > On Fri, Apr 26, 2013 at 03:47:40PM +0100, David Vrabel wrote: >> On 26/04/13 14:45, Roger Pau Monne wrote: >>> Allocate pending requests in smaller chunks instead of allocating them >>> all at the same time. >&

[PATCH v3] xen-blkback: allocate list of pending reqs in small chunks

2013-05-02 Thread Roger Pau Monne
o allocate them in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné Reported-by: Sander Eikelenboom Tested-by: Sander Eikelenboom Reviewed-by: David Vrabel Cc: David Vrabel Cc: Konrad Rzeszutek Wilk --- Changes since v2: * Add Sander Tested-by. Changes since v1:

[PATCH v3] xen-blkback: allocate list of pending reqs in small chunks

2013-05-02 Thread Roger Pau Monne
in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Sander Eikelenboom li...@eikelenboom.it Tested-by: Sander Eikelenboom li...@eikelenboom.it Reviewed-by: David Vrabel david.vra...@citrix.com Cc: David Vrabel david.vra

Re: [PATCH] xen-blkback: allocate list of pending reqs in small chunks

2013-05-02 Thread Roger Pau Monné
On 29/04/13 20:37, Konrad Rzeszutek Wilk wrote: On Fri, Apr 26, 2013 at 03:47:40PM +0100, David Vrabel wrote: On 26/04/13 14:45, Roger Pau Monne wrote: Allocate pending requests in smaller chunks instead of allocating them all at the same time. This change also removes the global array

[PATCH v2] xen-blkback: allocate list of pending reqs in small chunks

2013-04-26 Thread Roger Pau Monne
o allocate them in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné Reported-by: Sander Eikelenboom Reviewed-by: David Vrabel Cc: David Vrabel Cc: Konrad Rzeszutek Wilk --- Changes since v1: * Remove stray pr_alert. --- drivers/block/xen-blkback/blkbac

[PATCH] xen-blkback: allocate list of pending reqs in small chunks

2013-04-26 Thread Roger Pau Monne
o allocate them in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné Reported-by: Sander Eikelenboom Cc: David Vrabel Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c | 92 +++ drivers/block/xen-blkback/common

[PATCH] xen-blkback: allocate list of pending reqs in small chunks

2013-04-26 Thread Roger Pau Monne
in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Sander Eikelenboom li...@eikelenboom.it Cc: David Vrabel david.vra...@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen-blkback/blkback.c | 92

[PATCH v2] xen-blkback: allocate list of pending reqs in small chunks

2013-04-26 Thread Roger Pau Monne
in smaller chunks, and also improves memory locality. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Sander Eikelenboom li...@eikelenboom.it Reviewed-by: David Vrabel david.vra...@citrix.com Cc: David Vrabel david.vra...@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 16:26, Jens Axboe wrote: >>> I've just set that to something that brings a performance benefit >>> without having to map an insane number of persistent grants in blkback. >>> >>> Yes, the values are correct, but the device request queue (rq) is only >>> able to

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 14:43, Jens Axboe wrote: > On Wed, Apr 17 2013, Konrad Rzeszutek Wilk wrote: >> On Wed, Apr 17, 2013 at 07:04:51PM +0200, Roger Pau Monné wrote: >>> On 17/04/13 16:25, Konrad Rzeszutek Wilk wrote: >>>>>> Perhaps the xen-blkfront part o

[PATCH v3] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since v1: * Added padding to make the indirect request 64bit aligned. * Added some

Re: [PATCH v2 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 14:21, Konrad Rzeszutek Wilk wrote: > On Wed, Apr 17, 2013 at 08:19:01PM +0200, Roger Pau Monne wrote: >> Indirect descriptors introduce a new block operation >> (BLKIF_OP_INDIRECT) that passes grant references instead of segments >> in the request. This grant

Re: [PATCH v2 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 14:21, Konrad Rzeszutek Wilk wrote: On Wed, Apr 17, 2013 at 08:19:01PM +0200, Roger Pau Monne wrote: Indirect descriptors introduce a new block operation (BLKIF_OP_INDIRECT) that passes grant references instead of segments in the request. This grant references are filled

[PATCH v3] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes since v1: * Added padding to make

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 14:43, Jens Axboe wrote: On Wed, Apr 17 2013, Konrad Rzeszutek Wilk wrote: On Wed, Apr 17, 2013 at 07:04:51PM +0200, Roger Pau Monné wrote: On 17/04/13 16:25, Konrad Rzeszutek Wilk wrote: Perhaps the xen-blkfront part of the patch should be just split out to make this easier

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-18 Thread Roger Pau Monné
On 18/04/13 16:26, Jens Axboe wrote: I've just set that to something that brings a performance benefit without having to map an insane number of persistent grants in blkback. Yes, the values are correct, but the device request queue (rq) is only able to provide read requests with 64 segments

[PATCH v2 5/7] xen-blkback: make the queue of free requests per backend

2013-04-17 Thread Roger Pau Monne
Remove the last dependency from blkbk by moving the list of free requests to blkif. This change reduces the contention on the list of available requests. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since RFC: * Replace kzalloc with kcalloc

[PATCH v2 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-04-17 Thread Roger Pau Monne
no longer need the bitmap (unmap_seg). Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since RFC: * Offload part of the purge work to a kworker thread. * Add documentation about sysfs tunable. Changes since v1: * Changed some module_param

[PATCH v2 7/7] xen-block: implement indirect descriptors

2013-04-17 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since v1: * Added padding to make the indirect request 64bit aligned. * Added some

[PATCH v2 6/7] xen-blkback: expand map/unmap functions

2013-04-17 Thread Roger Pau Monne
grants without needing to pass a pending_req. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 141 +-- 1 files changed, 86 insertions(+), 55 deletions(-) diff --git a/drivers/block/xen

[PATCH v2 2/7] xen-blkback: use balloon pages for all mappings

2013-04-17 Thread Roger Pau Monne
(max_buffer_pages) has been added in order to tune the maximum number of free pages each blkback instance will keep in it's buffer. Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- Changes since RFC: * Fix typos in commit message. * Minor fixes in code

[PATCH v2 1/7] xen-blkback: print stats about persistent grants

2013-04-17 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index dd5b2fe

[PATCH v2 0/7] xen-block: indirect descriptors

2013-04-17 Thread Roger Pau Monne
Implementation of indirect descriptors v2, addressing Konrad's comments. A graph on performance can be found at: http://xenbits.xen.org/people/royger/plot_indirect_read4k.png Thanks for the review, Roger. Roger Pau Monne (7): xen-blkback: print stats about persistent grants xen

[PATCH v2 4/7] xen-blkback: move pending handles list from blkbk to pending_req

2013-04-17 Thread Roger Pau Monne
Moving grant ref handles from blkbk to pending_req will allow us to get rid of the shared blkbk structure. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 16 1 files changed, 4 insertions(+), 12

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-17 Thread Roger Pau Monné
On 17/04/13 16:25, Konrad Rzeszutek Wilk wrote: >>> Perhaps the xen-blkfront part of the patch should be just split out to make >>> this easier? >>> >>> Perhaps what we really should have is just the 'max' value of megabytes >>> we want to handle on the ring. >>> >>> As right now 32 ring requests

Re: [PATCH v1 7/7] xen-block: implement indirect descriptors

2013-04-17 Thread Roger Pau Monné
On 17/04/13 16:25, Konrad Rzeszutek Wilk wrote: Perhaps the xen-blkfront part of the patch should be just split out to make this easier? Perhaps what we really should have is just the 'max' value of megabytes we want to handle on the ring. As right now 32 ring requests * 32 segments = 4MB.

[PATCH v2 4/7] xen-blkback: move pending handles list from blkbk to pending_req

2013-04-17 Thread Roger Pau Monne
Moving grant ref handles from blkbk to pending_req will allow us to get rid of the shared blkbk structure. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 16

[PATCH v2 0/7] xen-block: indirect descriptors

2013-04-17 Thread Roger Pau Monne
Implementation of indirect descriptors v2, addressing Konrad's comments. A graph on performance can be found at: http://xenbits.xen.org/people/royger/plot_indirect_read4k.png Thanks for the review, Roger. Roger Pau Monne (7): xen-blkback: print stats about persistent grants xen

[PATCH v2 2/7] xen-blkback: use balloon pages for all mappings

2013-04-17 Thread Roger Pau Monne
(max_buffer_pages) has been added in order to tune the maximum number of free pages each blkback instance will keep in it's buffer. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- Changes since RFC: * Fix typos

[PATCH v2 1/7] xen-blkback: print stats about persistent grants

2013-04-17 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné roger@citrix.com Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen-blkback/blkback.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers

[PATCH v2 7/7] xen-block: implement indirect descriptors

2013-04-17 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes since v1: * Added padding to make

[PATCH v2 6/7] xen-blkback: expand map/unmap functions

2013-04-17 Thread Roger Pau Monne
grants without needing to pass a pending_req. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 141 +-- 1 files changed, 86 insertions(+), 55

[PATCH v2 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-04-17 Thread Roger Pau Monne
the bitmap (unmap_seg). Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes since RFC: * Offload part of the purge work to a kworker thread. * Add documentation about sysfs tunable. Changes since v1

[PATCH v2 5/7] xen-blkback: make the queue of free requests per backend

2013-04-17 Thread Roger Pau Monne
Remove the last dependency from blkbk by moving the list of free requests to blkif. This change reduces the contention on the list of available requests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes

Re: [PATCH v1 5/7] xen-blkback: make the queue of free requests per backend

2013-04-15 Thread Roger Pau Monné
On 09/04/13 18:13, Konrad Rzeszutek Wilk wrote: > On Wed, Mar 27, 2013 at 12:10:41PM +0100, Roger Pau Monne wrote: >> Remove the last dependency from blkbk by moving the list of free >> requests to blkif. This change reduces the contention on the list of >> available reque

Re: [PATCH v1 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-04-15 Thread Roger Pau Monné
On 09/04/13 17:42, Konrad Rzeszutek Wilk wrote: > On Wed, Mar 27, 2013 at 12:10:39PM +0100, Roger Pau Monne wrote: >> This mechanism allows blkback to change the number of grants >> persistently mapped at run time. >> >> The algorithm uses a simple LRU mechan

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 16:47, Konrad Rzeszutek Wilk wrote: > On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: >> Using balloon pages for all granted pages allows us to simplify the >> logic in blkback, especially in the xen_blkbk_map function, since now >> we can dec

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 17:46, Konrad Rzeszutek Wilk wrote: > On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: >> Using balloon pages for all granted pages allows us to simplify the >> logic in blkback, especially in the xen_blkbk_map function, since now >> we can dec

Re: [Xen-devel] [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
>> Perhaps you could update the comment from saying 'map this grant' (which >> implies doing it NOW as opposed to have done it already), and say: >> >> /* >> .. continue using the grant non-persistently. Note that >> we mapped it in the earlier loop and the earlier if conditional >> sets

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 16:47, Konrad Rzeszutek Wilk wrote: > On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: >> Using balloon pages for all granted pages allows us to simplify the >> logic in blkback, especially in the xen_blkbk_map function, since now >> we can dec

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 16:47, Konrad Rzeszutek Wilk wrote: On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: Using balloon pages for all granted pages allows us to simplify the logic in blkback, especially in the xen_blkbk_map function, since now we can decide if we want to map a grant

Re: [Xen-devel] [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
Perhaps you could update the comment from saying 'map this grant' (which implies doing it NOW as opposed to have done it already), and say: /* .. continue using the grant non-persistently. Note that we mapped it in the earlier loop and the earlier if conditional sets

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 17:46, Konrad Rzeszutek Wilk wrote: On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: Using balloon pages for all granted pages allows us to simplify the logic in blkback, especially in the xen_blkbk_map function, since now we can decide if we want to map a grant

Re: [PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-04-15 Thread Roger Pau Monné
On 09/04/13 16:47, Konrad Rzeszutek Wilk wrote: On Wed, Mar 27, 2013 at 12:10:38PM +0100, Roger Pau Monne wrote: Using balloon pages for all granted pages allows us to simplify the logic in blkback, especially in the xen_blkbk_map function, since now we can decide if we want to map a grant

Re: [PATCH v1 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-04-15 Thread Roger Pau Monné
On 09/04/13 17:42, Konrad Rzeszutek Wilk wrote: On Wed, Mar 27, 2013 at 12:10:39PM +0100, Roger Pau Monne wrote: This mechanism allows blkback to change the number of grants persistently mapped at run time. The algorithm uses a simple LRU mechanism that removes (if needed) the persistent

Re: [PATCH v1 5/7] xen-blkback: make the queue of free requests per backend

2013-04-15 Thread Roger Pau Monné
On 09/04/13 18:13, Konrad Rzeszutek Wilk wrote: On Wed, Mar 27, 2013 at 12:10:41PM +0100, Roger Pau Monne wrote: Remove the last dependency from blkbk by moving the list of free requests to blkif. This change reduces the contention on the list of available requests. Signed-off-by: Roger Pau

[PATCH v1 1/7] xen-blkback: print stats about persistent grants

2013-03-27 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index dd5b2fe

[PATCH v1 5/7] xen-blkback: make the queue of free requests per backend

2013-03-27 Thread Roger Pau Monne
Remove the last dependency from blkbk by moving the list of free requests to blkif. This change reduces the contention on the list of available requests. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since RFC: * Replace kzalloc with kcalloc

[PATCH v1 6/7] xen-blkback: expand map/unmap functions

2013-03-27 Thread Roger Pau Monne
grants without needing to pass a pending_req. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 133 ++- 1 files changed, 84 insertions(+), 49 deletions(-) diff --git a/drivers/block/xen

[PATCH v1 4/7] xen-blkback: move pending handles list from blkbk to pending_req

2013-03-27 Thread Roger Pau Monne
Moving grant ref handles from blkbk to pending_req will allow us to get rid of the shared blkbk structure. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 16 1 files changed, 4 insertions(+), 12

[PATCH v1 7/7] xen-block: implement indirect descriptors

2013-03-27 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 136 +++--- drivers/block/xen-blkback/common.h

[PATCH v1 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-03-27 Thread Roger Pau Monne
in the list (that are not in use). The algorithm allows the user to change the maximum number of persistent grants, by changing max_persistent_grants in sysfs. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since RFC: * Offload part of the purge work

[PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-03-27 Thread Roger Pau Monne
(max_buffer_pages) has been added in order to tune the maximum number of free pages each blkback instance will keep in it's buffer. Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- Changes since RFC: * Fix typos in commit message. * Minor fixes in code

[PATCH v1 0/7] xen-block: indirect descriptors

2013-03-27 Thread Roger Pau Monne
accurate comparison: http://xenbits.xen.org/people/royger/plot_indirect_read4k.png Also, the default number of segments per indirect request has been set to 32 in order to map them all persistently, but this can be changed at runtime by the user. Roger Pau Monne (7): xen-blkback: print

[PATCH v1 0/7] xen-block: indirect descriptors

2013-03-27 Thread Roger Pau Monne
accurate comparison: http://xenbits.xen.org/people/royger/plot_indirect_read4k.png Also, the default number of segments per indirect request has been set to 32 in order to map them all persistently, but this can be changed at runtime by the user. Roger Pau Monne (7): xen-blkback: print

[PATCH v1 3/7] xen-blkback: implement LRU mechanism for persistent grants

2013-03-27 Thread Roger Pau Monne
in the list (that are not in use). The algorithm allows the user to change the maximum number of persistent grants, by changing max_persistent_grants in sysfs. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes

[PATCH v1 2/7] xen-blkback: use balloon pages for all mappings

2013-03-27 Thread Roger Pau Monne
(max_buffer_pages) has been added in order to tune the maximum number of free pages each blkback instance will keep in it's buffer. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- Changes since RFC: * Fix typos

[PATCH v1 4/7] xen-blkback: move pending handles list from blkbk to pending_req

2013-03-27 Thread Roger Pau Monne
Moving grant ref handles from blkbk to pending_req will allow us to get rid of the shared blkbk structure. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 16

[PATCH v1 7/7] xen-block: implement indirect descriptors

2013-03-27 Thread Roger Pau Monne
in the ring and in the queue and split the bios in them if they are bigger than the new maximum number of segments. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 136

[PATCH v1 6/7] xen-blkback: expand map/unmap functions

2013-03-27 Thread Roger Pau Monne
grants without needing to pass a pending_req. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 133 ++- 1 files changed, 84 insertions(+), 49

[PATCH v1 5/7] xen-blkback: make the queue of free requests per backend

2013-03-27 Thread Roger Pau Monne
Remove the last dependency from blkbk by moving the list of free requests to blkif. This change reduces the contention on the list of available requests. Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes

[PATCH v1 1/7] xen-blkback: print stats about persistent grants

2013-03-27 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné roger@citrix.com Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen-blkback/blkback.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers

Re: [PATCH RFC 08/12] xen-blkback: use balloon pages for all mappings

2013-03-26 Thread Roger Pau Monné
On 04/03/13 21:22, Konrad Rzeszutek Wilk wrote: >> @@ -194,14 +260,15 @@ static void add_persistent_gnt(struct rb_root *root, >> else if (persistent_gnt->gnt > this->gnt) >> new = &((*new)->rb_right); >> else { >> -

Re: [PATCH RFC 08/12] xen-blkback: use balloon pages for all mappings

2013-03-26 Thread Roger Pau Monné
On 04/03/13 21:22, Konrad Rzeszutek Wilk wrote: [...] >> @@ -535,13 +604,17 @@ purge_gnt_list: >> msecs_to_jiffies(xen_blkif_lru_interval); >> } >> >> + remove_free_pages(blkif, xen_blkif_max_buffer_pages); >> + >> if (log_stats

Re: [PATCH RFC 08/12] xen-blkback: use balloon pages for all mappings

2013-03-26 Thread Roger Pau Monné
On 04/03/13 21:22, Konrad Rzeszutek Wilk wrote: [...] @@ -535,13 +604,17 @@ purge_gnt_list: msecs_to_jiffies(xen_blkif_lru_interval); } + remove_free_pages(blkif, xen_blkif_max_buffer_pages); + if (log_stats

Re: [PATCH RFC 08/12] xen-blkback: use balloon pages for all mappings

2013-03-26 Thread Roger Pau Monné
On 04/03/13 21:22, Konrad Rzeszutek Wilk wrote: @@ -194,14 +260,15 @@ static void add_persistent_gnt(struct rb_root *root, else if (persistent_gnt-gnt this-gnt) new = ((*new)-rb_right); else { - pr_alert(DRV_PFX trying to

Re: [Xen-devel] [PATCH 1/5] xen-blkback: don't store dev_bus_addr

2013-03-19 Thread Roger Pau Monné
On 19/03/13 16:10, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 19, 2013 at 02:55:56PM +, Jan Beulich wrote: >>>>> On 19.03.13 at 15:32, Konrad Rzeszutek Wilk >>>>> wrote: >>> On Mon, Mar 18, 2013 at 05:49:32PM +0100, Roger Pau Monne wrote: >&

Re: [PATCH 3/5] xen-blkfront: switch from llist to list

2013-03-19 Thread Roger Pau Monné
On 19/03/13 13:51, Konrad Rzeszutek Wilk wrote: > On Mon, Mar 18, 2013 at 05:49:34PM +0100, Roger Pau Monne wrote: >> Replace the use of llist with list. >> >> llist_for_each_entry_safe can trigger a bug in GCC 4.1, so it's best >> to remove it and use a doubly

Re: [PATCH 3/5] xen-blkfront: switch from llist to list

2013-03-19 Thread Roger Pau Monné
On 19/03/13 13:51, Konrad Rzeszutek Wilk wrote: On Mon, Mar 18, 2013 at 05:49:34PM +0100, Roger Pau Monne wrote: Replace the use of llist with list. llist_for_each_entry_safe can trigger a bug in GCC 4.1, so it's best to remove it and use a doubly linked list, which is used extensively

Re: [Xen-devel] [PATCH 1/5] xen-blkback: don't store dev_bus_addr

2013-03-19 Thread Roger Pau Monné
On 19/03/13 16:10, Konrad Rzeszutek Wilk wrote: On Tue, Mar 19, 2013 at 02:55:56PM +, Jan Beulich wrote: On 19.03.13 at 15:32, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Mon, Mar 18, 2013 at 05:49:32PM +0100, Roger Pau Monne wrote: dev_bus_addr returned in the grant ref map

Re: [PATCH RFC 12/12] xen-block: implement indirect descriptors

2013-03-18 Thread Roger Pau Monné
On 28/02/13 11:28, Roger Pau Monne wrote: > Indirect descriptors introduce a new block operation > (BLKIF_OP_INDIRECT) that passes grant references instead of segments > in the request. This grant references are filled with arrays of > blkif_request_segment_aligned, this way we c

Re: [PATCH RFC 06/12] xen-blkback: implement LRU mechanism for persistent grants

2013-03-18 Thread Roger Pau Monné
On 05/03/13 22:49, Konrad Rzeszutek Wilk wrote: >>> This could be written a bit differently to also run outside the >>> xen_blkif_schedule >>> (so a new thread). This would require using the lock mechanism and >>> converting >>> this big loop to two smaller loops: >>> 1) - one quick that holds

[PATCH 3/5] xen-blkfront: switch from llist to list

2013-03-18 Thread Roger Pau Monne
viously is safe to use concurrently without additional locking). Should be backported to 3.8 stable. Signed-off-by: Roger Pau Monné [Part of the description] Signed-off-by: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkfront.c

[PATCH 5/5] xen-blkfront: remove frame list from blk_shadow

2013-03-18 Thread Roger Pau Monne
We already have the frame (pfn of the grant page) stored inside struct grant, so there's no need to keep an aditional list of mapped frames for a specific request. This reduces memory usage in blkfront. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org

[PATCH 4/5] xen-blkfront: pre-allocate pages for requests

2013-03-18 Thread Roger Pau Monne
prevents us from having to call alloc_page, thus preventing possible failures. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- Changes since RFC: * Move page buffer initialization to setup_blkring --- drivers/block/xen-blkfront.c | 120

<    3   4   5   6   7   8   9   10   >