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

2013-03-18 Thread Roger Pau Monne
dev_bus_addr returned in the grant ref map operation is the mfn of the passed page, there's no need to store it in the persistent grant entry, since we can always get it provided that we have the page. This reduces the memory overhead of persistent grants in blkback. Signed-off-by: Roger Pau

[PATCH 2/5] xen-blkback: fix foreach_grant_safe to handle empty lists

2013-03-18 Thread Roger Pau Monne
We may use foreach_grant_safe in the future with empty lists, so make sure we can handle them. Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 0/5] xen-block: cleanup and fixes

2013-03-18 Thread Roger Pau Monne
This series contains the cleanups and fixes found in my previous indirect descriptors series, that are aimed for linux 3.9. Available in the git repository at: git://xenbits.xen.org/people/royger/linux.git blk-for-3.9 Roger Pau Monne (5): xen-blkback: don't store dev_bus_addr xen

[PATCH 0/5] xen-block: cleanup and fixes

2013-03-18 Thread Roger Pau Monne
This series contains the cleanups and fixes found in my previous indirect descriptors series, that are aimed for linux 3.9. Available in the git repository at: git://xenbits.xen.org/people/royger/linux.git blk-for-3.9 Roger Pau Monne (5): xen-blkback: don't store dev_bus_addr xen

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

2013-03-18 Thread Roger Pau Monne
dev_bus_addr returned in the grant ref map operation is the mfn of the passed page, there's no need to store it in the persistent grant entry, since we can always get it provided that we have the page. This reduces the memory overhead of persistent grants in blkback. Signed-off-by: Roger Pau

[PATCH 2/5] xen-blkback: fix foreach_grant_safe to handle empty lists

2013-03-18 Thread Roger Pau Monne
We may use foreach_grant_safe in the future with empty lists, so make sure we can handle them. 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 |2 +- 1 files changed, 1

[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é roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w

[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é roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org --- Changes since RFC: * Move page buffer initialization to setup_blkring --- drivers/block

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

2013-03-18 Thread Roger Pau Monne
locking (llist used previously is safe to use concurrently without additional locking). Should be backported to 3.8 stable. Signed-off-by: Roger Pau Monné roger@citrix.com [Part of the description] Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org

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 the lock - to take

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 can send more segments

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

2013-03-08 Thread Roger Pau Monné
On 05/03/13 22:46, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 05, 2013 at 06:07:57PM +0100, Roger Pau Monné wrote: >> On 04/03/13 21:41, Konrad Rzeszutek Wilk wrote: >>> On Thu, Feb 28, 2013 at 11:28:55AM +0100, Roger Pau Monne wrote: >>>> Indirect descriptors i

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

2013-03-08 Thread Roger Pau Monné
On 05/03/13 22:46, Konrad Rzeszutek Wilk wrote: On Tue, Mar 05, 2013 at 06:07:57PM +0100, Roger Pau Monné wrote: On 04/03/13 21:41, Konrad Rzeszutek Wilk wrote: On Thu, Feb 28, 2013 at 11:28:55AM +0100, Roger Pau Monne wrote: Indirect descriptors introduce a new block operation

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-06 Thread Roger Pau Monné
On 05/03/13 22:53, Konrad Rzeszutek Wilk wrote: >> >> /* No more gnttab callback work. */ >> gnttab_cancel_free_callback(>callback); >> @@ -1088,6 +1120,12 @@ again: >> goto destroy_blkring; >> } >> >> +/*

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-06 Thread Roger Pau Monné
On 05/03/13 22:53, Konrad Rzeszutek Wilk wrote: /* No more gnttab callback work. */ gnttab_cancel_free_callback(info-callback); @@ -1088,6 +1120,12 @@ again: goto destroy_blkring; } +/* Allocate memory for grants */ +err =

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

2013-03-05 Thread Roger Pau Monné
On 04/03/13 21:10, Konrad Rzeszutek Wilk wrote: > On Thu, Feb 28, 2013 at 11:28:49AM +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 RFC 12/12] xen-block: implement indirect descriptors

2013-03-05 Thread Roger Pau Monné
On 04/03/13 21:41, Konrad Rzeszutek Wilk wrote: > On Thu, Feb 28, 2013 at 11:28:55AM +0100, 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: [Xen-devel] [PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-03-05 Thread Roger Pau Monné
On 05/03/13 09:06, Jan Beulich wrote: >>>> On 04.03.13 at 18:19, Roger Pau Monné wrote: >> On 28/02/13 11:58, Jan Beulich wrote: >>>>>> On 28.02.13 at 11:28, Roger Pau Monne wrote: >>> And then the biolist[] array really can be folded into a union >

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

2013-03-05 Thread Roger Pau Monné
On 05/03/13 15:16, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 05, 2013 at 08:11:19AM +, Jan Beulich wrote: > On 04.03.13 at 21:44, Konrad Rzeszutek Wilk > wrote: >>> 'op' sounds good. With a comment saying it can do all of the >>> BLKIF_OPS_.. >>> except the BLKIF_OP_INDIRECT one.

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-05 Thread Roger Pau Monné
On 05/03/13 15:18, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 05, 2013 at 12:04:41PM +0100, Roger Pau Monné wrote: >> On 04/03/13 20:39, Konrad Rzeszutek Wilk wrote: >>> On Thu, Feb 28, 2013 at 11:28:47AM +0100, Roger Pau Monne wrote: >>>> This prevents us from havi

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-05 Thread Roger Pau Monné
On 04/03/13 20:39, Konrad Rzeszutek Wilk wrote: > On Thu, Feb 28, 2013 at 11:28:47AM +0100, Roger Pau Monne wrote: >> This prevents us from having to call alloc_page while we are preparing >> the request. Since blkfront was calling alloc_page with a spinlock >> held we used

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-05 Thread Roger Pau Monné
On 04/03/13 20:39, Konrad Rzeszutek Wilk wrote: On Thu, Feb 28, 2013 at 11:28:47AM +0100, Roger Pau Monne wrote: This prevents us from having to call alloc_page while we are preparing the request. Since blkfront was calling alloc_page with a spinlock held we used GFP_ATOMIC, which can fail

Re: [PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-03-05 Thread Roger Pau Monné
On 05/03/13 15:18, Konrad Rzeszutek Wilk wrote: On Tue, Mar 05, 2013 at 12:04:41PM +0100, Roger Pau Monné wrote: On 04/03/13 20:39, Konrad Rzeszutek Wilk wrote: On Thu, Feb 28, 2013 at 11:28:47AM +0100, Roger Pau Monne wrote: This prevents us from having to call alloc_page while we

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

2013-03-05 Thread Roger Pau Monné
On 05/03/13 15:16, Konrad Rzeszutek Wilk wrote: On Tue, Mar 05, 2013 at 08:11:19AM +, Jan Beulich wrote: On 04.03.13 at 21:44, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: nods 'op' sounds good. With a comment saying it can do all of the BLKIF_OPS_.. except the BLKIF_OP_INDIRECT

Re: [Xen-devel] [PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-03-05 Thread Roger Pau Monné
On 05/03/13 09:06, Jan Beulich wrote: On 04.03.13 at 18:19, Roger Pau Monnéroger@citrix.com wrote: On 28/02/13 11:58, Jan Beulich wrote: On 28.02.13 at 11:28, Roger Pau Monne roger@citrix.com wrote: And then the biolist[] array really can be folded into a union with the remaining seg

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

2013-03-05 Thread Roger Pau Monné
On 04/03/13 21:41, Konrad Rzeszutek Wilk wrote: On Thu, Feb 28, 2013 at 11:28:55AM +0100, 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

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

2013-03-05 Thread Roger Pau Monné
On 04/03/13 21:10, Konrad Rzeszutek Wilk wrote: On Thu, Feb 28, 2013 at 11:28:49AM +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: [Xen-devel] [PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-03-04 Thread Roger Pau Monné
On 28/02/13 11:58, Jan Beulich wrote: >>>> On 28.02.13 at 11:28, Roger Pau Monne wrote: >> dev_bus_addr returned in the grant ref map operation is the mfn of the >> passed page, there's no need to store it in the persistent grant >> entry, since we can always get it

Re: [Xen-devel] [PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-03-04 Thread Roger Pau Monné
On 28/02/13 11:58, Jan Beulich wrote: On 28.02.13 at 11:28, Roger Pau Monne roger@citrix.com wrote: dev_bus_addr returned in the grant ref map operation is the mfn of the passed page, there's no need to store it in the persistent grant entry, since we can always get it provided that we

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

2013-02-28 Thread Roger Pau Monné
On 28/02/13 12:19, Jan Beulich wrote: >>>> On 28.02.13 at 11:28, Roger Pau Monne wrote: >> @@ -109,6 +111,16 @@ typedef uint64_t blkif_sector_t; >> */ >> #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 >> >> +#define BLKIF_MAX_IN

Re: [Xen-devel] [PATCH RFC 00/12] xen-block: indirect descriptors

2013-02-28 Thread Roger Pau Monné
On 28/02/13 12:35, Jan Beulich wrote: >>>> On 28.02.13 at 12:25, Roger Pau Monné wrote: >> This is the expanded graph that also contains indirect descriptors >> without persistent grants: >> >> http://xenbits.xen.org/people/royger/plot_indirect_nopers.png >

Re: [Xen-devel] [PATCH RFC 00/12] xen-block: indirect descriptors

2013-02-28 Thread Roger Pau Monné
On 28/02/13 11:49, Jan Beulich wrote: >>>> On 28.02.13 at 11:28, Roger Pau Monne wrote: >> This series contains the initial implementation of indirect >> descriptors for Linux blkback/blkfront. >> >> Patches 1, 2, 3, 4 and 5 are bug fixes and minor optimiz

[PATCH RFC 02/12] xen-blkback: fix foreach_grant_safe to handle empty lists

2013-02-28 Thread Roger Pau Monne
We may use foreach_grant_safe in the future with empty lists, so make sure we can handle them. Signed-off-by: Roger Pau Monné Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkback/blkback.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH RFC 03/12] xen-blkfront: switch from llist to list

2013-02-28 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 RFC 05/12] xen-blkfront: remove frame list from blk_shadow

2013-02-28 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 RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-02-28 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 --- drivers/block/xen-blkfront.c | 120 +++-- 1 files changed, 79 insertions(+), 41 deletions

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

2013-02-28 Thread Roger Pau Monne
This series contains the initial implementation of indirect descriptors for Linux blkback/blkfront. Patches 1, 2, 3, 4 and 5 are bug fixes and minor optimizations. Patch 6 contains a LRU implementation for blkback that will be needed when using indirect descriptors (since we are no longer able

[PATCH RFC 07/12] xen-blkback: print stats about persistent grants

2013-02-28 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 |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index c14b736

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

2013-02-28 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 --- drivers/block/xen-blkback/blkback.c | 278

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

2013-02-28 Thread Roger Pau Monne
of persistent grants to remove when executing the LRU. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block/xen-blkback/blkback.c | 207 +++ drivers/block/xen-blkback/common.h |4 + drivers/block/xen

[PATCH RFC 11/12] xen-blkback: expand map/unmap functions

2013-02-28 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 | 134 ++- 1 files changed, 85 insertions(+), 49 deletions(-) diff --git a/drivers/block/xen

[PATCH RFC 10/12] xen-blkback: make the queue of free requests per backend

2013-02-28 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 --- drivers/block/xen-blkback/blkback.c | 123

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

2013-02-28 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 | 129 +++--- drivers/block/xen-blkback/common.h

[PATCH RFC 09/12] xen-blkback: move pending handles list from blkbk to pending_req

2013-02-28 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 RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-02-28 Thread Roger Pau Monne
dev_bus_addr returned in the grant ref map operation is the mfn of the passed page, there's no need to store it in the persistent grant entry, since we can always get it provided that we have the page. This reduces the memory overhead of persistent grants in blkback. Signed-off-by: Roger Pau

[PATCH RFC 01/12] xen-blkback: don't store dev_bus_addr

2013-02-28 Thread Roger Pau Monne
dev_bus_addr returned in the grant ref map operation is the mfn of the passed page, there's no need to store it in the persistent grant entry, since we can always get it provided that we have the page. This reduces the memory overhead of persistent grants in blkback. Signed-off-by: Roger Pau

[PATCH RFC 09/12] xen-blkback: move pending handles list from blkbk to pending_req

2013-02-28 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 RFC 12/12] xen-block: implement indirect descriptors

2013-02-28 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 | 129

[PATCH RFC 11/12] xen-blkback: expand map/unmap functions

2013-02-28 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 | 134 ++- 1 files changed, 85 insertions(+), 49

[PATCH RFC 10/12] xen-blkback: make the queue of free requests per backend

2013-02-28 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 --- drivers

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

2013-02-28 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 --- drivers/block/xen-blkback/blkback.c

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

2013-02-28 Thread Roger Pau Monne
of persistent grants to remove when executing the LRU. 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 | 207 +++ drivers/block/xen-blkback

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

2013-02-28 Thread Roger Pau Monne
This series contains the initial implementation of indirect descriptors for Linux blkback/blkfront. Patches 1, 2, 3, 4 and 5 are bug fixes and minor optimizations. Patch 6 contains a LRU implementation for blkback that will be needed when using indirect descriptors (since we are no longer able

[PATCH RFC 07/12] xen-blkback: print stats about persistent grants

2013-02-28 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 |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers

[PATCH RFC 04/12] xen-blkfront: pre-allocate pages for requests

2013-02-28 Thread Roger Pau Monne
prevents us from having to call alloc_page, thus preventing possible failures. 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-blkfront.c | 120 +++-- 1 files

[PATCH RFC 05/12] xen-blkfront: remove frame list from blk_shadow

2013-02-28 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é roger@citrix.com Cc: Konrad Rzeszutek Wilk konrad.w

[PATCH RFC 03/12] xen-blkfront: switch from llist to list

2013-02-28 Thread Roger Pau Monne
locking (llist used previously is safe to use concurrently without additional locking). Should be backported to 3.8 stable. Signed-off-by: Roger Pau Monné roger@citrix.com [Part of the description] Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org

[PATCH RFC 02/12] xen-blkback: fix foreach_grant_safe to handle empty lists

2013-02-28 Thread Roger Pau Monne
We may use foreach_grant_safe in the future with empty lists, so make sure we can handle them. 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 |2 +- 1 files changed, 1

Re: [Xen-devel] [PATCH RFC 00/12] xen-block: indirect descriptors

2013-02-28 Thread Roger Pau Monné
On 28/02/13 11:49, Jan Beulich wrote: On 28.02.13 at 11:28, Roger Pau Monne roger@citrix.com wrote: This series contains the initial implementation of indirect descriptors for Linux blkback/blkfront. Patches 1, 2, 3, 4 and 5 are bug fixes and minor optimizations. Patch 6 contains a LRU

Re: [Xen-devel] [PATCH RFC 00/12] xen-block: indirect descriptors

2013-02-28 Thread Roger Pau Monné
On 28/02/13 12:35, Jan Beulich wrote: On 28.02.13 at 12:25, Roger Pau Monnéroger@citrix.com wrote: This is the expanded graph that also contains indirect descriptors without persistent grants: http://xenbits.xen.org/people/royger/plot_indirect_nopers.png Thanks. Interesting

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

2013-02-28 Thread Roger Pau Monné
On 28/02/13 12:19, Jan Beulich wrote: On 28.02.13 at 11:28, Roger Pau Monne roger@citrix.com wrote: @@ -109,6 +111,16 @@ typedef uint64_t blkif_sector_t; */ #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 +#define BLKIF_MAX_INDIRECT_GREFS_PER_REQUEST 8 + +struct

Re: [PATCH] drivers/block/xen-blkback: preq.dev is used without initialized

2013-02-27 Thread Roger Pau Monné
On 27/02/13 05:52, Chen Gang wrote: > > if call xen_vbd_translate failed, the preq.dev will be not initialized. > so use blkif->vbd.pdevice instead (still better to print relative info). preq.dev is initialized a a couple of lines prior to calling xen_vbd_translate: preq.dev =

Re: [PATCH] drivers/block/xen-blkback: preq.dev is used without initialized

2013-02-27 Thread Roger Pau Monné
On 27/02/13 05:52, Chen Gang wrote: if call xen_vbd_translate failed, the preq.dev will be not initialized. so use blkif-vbd.pdevice instead (still better to print relative info). preq.dev is initialized a a couple of lines prior to calling xen_vbd_translate: preq.dev =

Re: [Xen-devel] [PATCH] xen-blkfront: switch from llist to list

2013-02-25 Thread Roger Pau Monné
On 25/02/13 17:49, Konrad Rzeszutek Wilk wrote: > On Fri, Feb 15, 2013 at 08:12:52PM +0100, Roger Pau Monné wrote: >> On 15/02/13 19:56, Konrad Rzeszutek Wilk wrote: >>>> Should be backported to 3.8 stable. >>> >>> Lets do one thing at a time. >>>

Re: [Xen-devel] [PATCH] xen-blkfront: switch from llist to list

2013-02-25 Thread Roger Pau Monné
On 25/02/13 17:49, Konrad Rzeszutek Wilk wrote: On Fri, Feb 15, 2013 at 08:12:52PM +0100, Roger Pau Monné wrote: On 15/02/13 19:56, Konrad Rzeszutek Wilk wrote: Should be backported to 3.8 stable. Lets do one thing at a time. The patch I have in the tree (and that I've asked Jens to pull

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

2013-02-15 Thread Roger Pau Monné
On 15/02/13 19:56, Konrad Rzeszutek Wilk wrote: >> Should be backported to 3.8 stable. > > Lets do one thing at a time. > > The patch I have in the tree (and that I've asked Jens to pull for 3.9 - so > he might have already in his tree) is the old hybrid where we still use llist > but change the

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

2013-02-15 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 | 27 ++- includ

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

2013-02-15 Thread Roger Pau Monne
locking (llist used previously is safe to use concurrently without additional locking). Should be backported to 3.8 stable. Signed-off-by: Roger Pau Monné roger@citrix.com [Part of the description] Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org

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

2013-02-15 Thread Roger Pau Monné
On 15/02/13 19:56, Konrad Rzeszutek Wilk wrote: Should be backported to 3.8 stable. Lets do one thing at a time. The patch I have in the tree (and that I've asked Jens to pull for 3.9 - so he might have already in his tree) is the old hybrid where we still use llist but change the loop

Re: [PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monné
On 14/02/13 14:23, Konrad Rzeszutek Wilk wrote: > On Thu, Feb 14, 2013 at 11:12:09AM +0100, Roger Pau Monne wrote: >> With current persistent grants implementation we are not freeing the >> persistent grants after we disconnect the device. Since grant map > > Can you explain

Re: [PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monné
On 14/02/13 11:12, Roger Pau Monne wrote: > With current persistent grants implementation we are not freeing the > persistent grants after we disconnect the device. Since grant map > operations change the mfn of the allocated page, and we can no longer > pass it to __free_page wit

[PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monne
instead, as the gntdev device does. 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

[PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monne
instead, as the gntdev device does. 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

Re: [PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monné
On 14/02/13 11:12, Roger Pau Monne wrote: With current persistent grants implementation we are not freeing the persistent grants after we disconnect the device. Since grant map operations change the mfn of the allocated page, and we can no longer pass it to __free_page without setting the mfn

Re: [PATCH] xen-blkback: use balloon pages for persistent grants

2013-02-14 Thread Roger Pau Monné
On 14/02/13 14:23, Konrad Rzeszutek Wilk wrote: On Thu, Feb 14, 2013 at 11:12:09AM +0100, Roger Pau Monne wrote: With current persistent grants implementation we are not freeing the persistent grants after we disconnect the device. Since grant map Can you explain this in more details please

[PATCH] xen-blkfront: drop the use of llist_for_each_entry_safe

2013-02-11 Thread Roger Pau Monne
macro remove it from llist.h. Signed-off-by: Roger Pau Monné Reported-by: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk --- drivers/block/xen-blkfront.c |5 ++--- include/linux/llist.h| 25 - 2 files changed, 2 insertions

[PATCH] xen-blkfront: drop the use of llist_for_each_entry_safe

2013-02-11 Thread Roger Pau Monne
macro remove it from llist.h. Signed-off-by: Roger Pau Monné roger@citrix.com Reported-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: xen-de...@lists.xen.org Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/block/xen-blkfront.c |5 ++--- include/linux/llist.h

Re: [Xen-devel] [PATCH 2/3] xen/ring: Add a new macro to detect whether there is an overflow in requests and response.

2013-01-25 Thread Roger Pau Monné
On 25/01/13 18:32, Konrad Rzeszutek Wilk wrote: > We want to be able to exit if the difference between the request > produced (what the frontend tells us) and the requests consumed > (what we have so far processed) is greater than the ring size. > > If so, we should terminate the loop as the

Re: [Xen-devel] [PATCH 2/3] xen/ring: Add a new macro to detect whether there is an overflow in requests and response.

2013-01-25 Thread Roger Pau Monné
On 25/01/13 18:32, Konrad Rzeszutek Wilk wrote: We want to be able to exit if the difference between the request produced (what the frontend tells us) and the requests consumed (what we have so far processed) is greater than the ring size. If so, we should terminate the loop as the request

Re: [B.A.T.M.A.N.] [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Pau Koning
On Mon, Dec 24, 2012 at 3:38 PM, Marek Lindner wrote: > On Monday, December 24, 2012 22:18:52 Pau Koning wrote: >> On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin wrote: >> > The code that works with routing_algo assumes that the string passed is >> > non >> >

Re: [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Pau Koning
On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin wrote: > The code that works with routing_algo assumes that the string passed is non > empty, this assumption is wrong: Why isn't this patch part of Linux 3.7? It seems to be a bugfix and it was sent early enough? -- To unsubscribe from this list:

Re: [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Pau Koning
On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin sasha.le...@oracle.com wrote: The code that works with routing_algo assumes that the string passed is non empty, this assumption is wrong: Why isn't this patch part of Linux 3.7? It seems to be a bugfix and it was sent early enough? -- To unsubscribe

Re: [B.A.T.M.A.N.] [PATCH] net, batman: don't crash on zero length strings in routing_algo

2012-12-24 Thread Pau Koning
On Mon, Dec 24, 2012 at 3:38 PM, Marek Lindner lindner_ma...@yahoo.de wrote: On Monday, December 24, 2012 22:18:52 Pau Koning wrote: On Mon, Nov 19, 2012 at 9:08 PM, Sasha Levin sasha.le...@oracle.com wrote: The code that works with routing_algo assumes that the string passed is non empty

[PATCH v4 2/3] llist: add a safe version of llist_for_each_entry

2012-12-13 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: Huang Ying Cc: Konrad Rzeszutek Wilk --- Changes since v3: * Change n to use type *, to keep the same semantics as list_for_each_entry_safe. Changes since v2: * Allow to pass a NULL node as the first entry of deleted list entries. --- include/linux

[PATCH v4 3/3] xen-blkfront: transverse list of persistent grants safely

2012-12-13 Thread Roger Pau Monne
Use llist_for_each_entry_safe in blkif_free. Previously grants where freed while iterating the list, which lead to dereferences when trying to fetch the next item. Reported-by: Dan Carpenter Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block

[PATCH v4 1/3] xen-blkback: implement safe iterator for the list of persistent grants

2012-12-13 Thread Roger Pau Monne
Change foreach_grant iterator to a safe version, that allows freeing the element while iterating. Also move the free code in free_persistent_gnts to prevent freeing the element before the rb_next call. Reported-by: Dan Carpenter Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen

[PATCH v4 3/3] xen-blkfront: transverse list of persistent grants safely

2012-12-13 Thread Roger Pau Monne
Use llist_for_each_entry_safe in blkif_free. Previously grants where freed while iterating the list, which lead to dereferences when trying to fetch the next item. Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Konrad Rzeszutek Wilk kon

[PATCH v4 1/3] xen-blkback: implement safe iterator for the list of persistent grants

2012-12-13 Thread Roger Pau Monne
Change foreach_grant iterator to a safe version, that allows freeing the element while iterating. Also move the free code in free_persistent_gnts to prevent freeing the element before the rb_next call. Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Roger Pau Monné roger

[PATCH v4 2/3] llist: add a safe version of llist_for_each_entry

2012-12-13 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Huang Ying ying.hu...@intel.com Cc: Konrad Rzeszutek Wilk kon...@kernel.org --- Changes since v3: * Change n to use type *, to keep the same semantics as list_for_each_entry_safe. Changes since v2: * Allow to pass a NULL node

Re: [PATCH v3] llist: add a safe version of llist_for_each_entry

2012-12-12 Thread Roger Pau Monné
On 12/12/12 01:37, Huang Ying wrote: > On Tue, 2012-12-11 at 12:25 +0100, Roger Pau Monne wrote: >> Signed-off-by: Roger Pau Monné >> Cc: Huang Ying >> Cc: Konrad Rzeszutek Wilk >> --- >> Changes since v2: >> * Allow to pass a NULL node as the fi

Re: [PATCH v3] llist: add a safe version of llist_for_each_entry

2012-12-12 Thread Roger Pau Monné
On 12/12/12 01:37, Huang Ying wrote: On Tue, 2012-12-11 at 12:25 +0100, Roger Pau Monne wrote: Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Huang Ying ying.hu...@intel.com Cc: Konrad Rzeszutek Wilk kon...@kernel.org --- Changes since v2: * Allow to pass a NULL node as the first

[PATCH v3] llist: add a safe version of llist_for_each_entry

2012-12-11 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: Huang Ying Cc: Konrad Rzeszutek Wilk --- Changes since v2: * Allow to pass a NULL node as the first entry of deleted list entries. --- include/linux/llist.h | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git

[PATCH v3] llist: add a safe version of llist_for_each_entry

2012-12-11 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné roger@citrix.com Cc: Huang Ying ying.hu...@intel.com Cc: Konrad Rzeszutek Wilk kon...@kernel.org --- Changes since v2: * Allow to pass a NULL node as the first entry of deleted list entries. --- include/linux/llist.h | 27 +++ 1

[PATCH v2 3/3] xen-blkfront: transverse list of persistent grants safely

2012-12-10 Thread Roger Pau Monne
Use llist_for_each_entry_safe in blkif_free. Previously grants where freed while iterating the list, which lead to dereferences when trying to fetch the next item. Reported-by: Dan Carpenter Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen-de...@lists.xen.org --- drivers/block

[PATCH v2 1/3] xen-blkback: implement safe iterator for the list of persistent grants

2012-12-10 Thread Roger Pau Monne
Change foreach_grant iterator to a safe version, that allows freeing the element while iterating. Also move the free code in free_persistent_gnts to prevent freeing the element before the rb_next call. Reported-by: Dan Carpenter Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: xen

[PATCH v2 2/3] llist: add a safe version of llist_for_each_entry

2012-12-10 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: Huang Ying Cc: Konrad Rzeszutek Wilk --- include/linux/llist.h | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/include/linux/llist.h b/include/linux/llist.h index a5199f6..f611cd8 100644 --- a/include/linux

Re: [Xen-devel] [PATCH 2/2] xen-blkfront: implement safe version of llist_for_each_entry

2012-12-10 Thread Roger Pau Monné
On 10/12/12 16:15, Konrad Rzeszutek Wilk wrote: > On Mon, Dec 10, 2012 at 01:15:50PM +0100, Roger Pau Monné wrote: >> On 07/12/12 21:20, Konrad Rzeszutek Wilk wrote: >>> On Tue, Dec 04, 2012 at 03:21:53PM +0100, Roger Pau Monne wrote: >>>> Implement a safe version of

Re: [Xen-devel] [PATCH 2/2] xen-blkfront: implement safe version of llist_for_each_entry

2012-12-10 Thread Roger Pau Monné
On 07/12/12 21:20, Konrad Rzeszutek Wilk wrote: > On Tue, Dec 04, 2012 at 03:21:53PM +0100, Roger Pau Monne wrote: >> Implement a safe version of llist_for_each_entry, and use it in >> blkif_free. Previously grants where freed while iterating the list, >> which lead to der

Re: [Xen-devel] [PATCH 2/2] xen-blkfront: implement safe version of llist_for_each_entry

2012-12-10 Thread Roger Pau Monné
On 07/12/12 21:20, Konrad Rzeszutek Wilk wrote: On Tue, Dec 04, 2012 at 03:21:53PM +0100, Roger Pau Monne wrote: Implement a safe version of llist_for_each_entry, and use it in blkif_free. Previously grants where freed while iterating the list, which lead to dereferences when trying to fetch

Re: [Xen-devel] [PATCH 2/2] xen-blkfront: implement safe version of llist_for_each_entry

2012-12-10 Thread Roger Pau Monné
On 10/12/12 16:15, Konrad Rzeszutek Wilk wrote: On Mon, Dec 10, 2012 at 01:15:50PM +0100, Roger Pau Monné wrote: On 07/12/12 21:20, Konrad Rzeszutek Wilk wrote: On Tue, Dec 04, 2012 at 03:21:53PM +0100, Roger Pau Monne wrote: Implement a safe version of llist_for_each_entry, and use

<    4   5   6   7   8   9   10   >