Re: [dm-devel] [PATCH 05/16] dm: always defer request allocation to the owner of the request_queue

2017-01-25 Thread Junichi Nomura
On 01/25/17 01:39, Mike Snitzer wrote: > On Tue, Jan 24 2017 at 9:20am -0500, Christoph Hellwig wrote: >> On Tue, Jan 24, 2017 at 05:05:39AM -0500, Mike Snitzer wrote: >>> possible and is welcomed cleanup. The only concern I have is that using >>> get_request() for the old

Re: [dm-devel] [PATCH 18/18] block: don't assign cmd_flags in __blk_rq_prep_clone

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> These days we have the proper flags set since request Christoph> allocation time. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering -- dm-devel mailing list

Re: [dm-devel] [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Rely on the new block layer functionality to allocate Christoph> additional driver specific data behind struct request instead Christoph> of implementing it in SCSI itѕelf. Acked-by: Martin K. Petersen

Re: [dm-devel] [PATCH 14/18] scsi: remove __scsi_alloc_queue

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Instead do an internal export of __scsi_init_queue for the Christoph> transport classes that export BSG nodes. Acked-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [dm-devel] [PATCH 13/18] scsi: remove scsi_cmd_dma_pool

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> There is no need for GFP_DMA allocations of the scsi_cmnd Christoph> structures themselves, all that might be DMAed to or from is Christoph> the actual payload, or the sense buffers. Acked-by: Martin K. Petersen

Re: [dm-devel] [PATCH 12/18] scsi: respect unchecked_isa_dma for blk-mq

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Currently blk-mq always allocates the sense buffer using Christoph> normal GFP_KERNEL allocation. Refactor the cmd pool code to Christoph> split the cmd and sense allocation and share the code to Christoph> allocate the

Re: [dm-devel] [PATCH 11/18] scsi: remove gfp_flags member in scsi_host_cmd_pool

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> When using the slab allocator we already decide at cache Christoph> creation time if an allocation comes from a GFP_DMA pool Christoph> using the SLAB_CACHE_DMA flag, and there is no point passing Christoph> the

Re: [dm-devel] [PATCH 08/18] scsi_dh_rdac: switch to scsi_execute_req_flags()

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> From: Hannes Reinecke Switch to Christoph> scsi_execute_req_flags() and scsi_get_vpd_page() instead of Christoph> open-coding it. Using scsi_execute_req_flags() will set Christoph> REQ_QUIET and REQ_PREEMPT,

Re: [dm-devel] [PATCH 05/18] block: allow specifying size for extra command data

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph, Christoph> This mirrors the blk-mq capabilities to allocate extra Christoph> drivers-specific data behind struct request by setting a Christoph> cmd_size field, as well as having a constructor / destructor Christoph> for it.

Re: [dm-devel] [PATCH 04/18] block: simplify blk_init_allocated_queue

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Return an errno value instead of the passed in queue so that Christoph> the callers don't have to keep track of two queues, and move Christoph> the assignment of the request_fn and lock to the caller as Christoph> passing

Re: [dm-devel] [PATCH 03/18] block: fix elevator init check

2017-01-25 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> We can't initalize the elevator fields for flushes as flush Christoph> share space in struct request with the elevator data. But Christoph> currently we can't commnicate that a request is a flush communicate Christoph>

[dm-devel] [PATCH 01/18] block: add a op_is_flush helper

2017-01-25 Thread Christoph Hellwig
This centralizes the checks for bios that needs to be go into the flush state machine. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 8 block/blk-mq-sched.c | 5 ++--- block/blk-mq.c | 4 ++-- drivers/md/bcache/request.c | 2

[dm-devel] [PATCH 04/18] block: simplify blk_init_allocated_queue

2017-01-25 Thread Christoph Hellwig
Return an errno value instead of the passed in queue so that the callers don't have to keep track of two queues, and move the assignment of the request_fn and lock to the caller as passing them as argument doesn't simplify anything. While we're at it also remove two pointless NULL assignments,

[dm-devel] [PATCH 18/18] block: don't assign cmd_flags in __blk_rq_prep_clone

2017-01-25 Thread Christoph Hellwig
These days we have the proper flags set since request allocation time. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 33c5d05e..6bf5ba0

[dm-devel] split scsi passthrough fields out of struct request V2

2017-01-25 Thread Christoph Hellwig
Hi all, this series splits the support for SCSI passthrough commands from the main struct request used all over the block layer into a separate scsi_request structure that drivers that want to support SCSI passthough need to embedded as the first thing into their request-private data, similar to

[dm-devel] [PATCH 03/18] block: fix elevator init check

2017-01-25 Thread Christoph Hellwig
We can't initalize the elevator fields for flushes as flush share space in struct request with the elevator data. But currently we can't commnicate that a request is a flush through blk_get_request as we can only pass READ or WRITE, and the low-level code looks at the possible NULL bio to check

[dm-devel] [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request

2017-01-25 Thread Christoph Hellwig
Rely on the new block layer functionality to allocate additional driver specific data behind struct request instead of implementing it in SCSI itѕelf. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/scsi/hosts.c | 20 +--

[dm-devel] [PATCH 09/18] scsi_dh_emc: switch to scsi_execute_req_flags()

2017-01-25 Thread Christoph Hellwig
From: Hannes Reinecke Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the

[dm-devel] [PATCH 02/18] md: cleanup bio op / flags handling in raid1_write_request

2017-01-25 Thread Christoph Hellwig
No need for the local variables, the bio is still live and we can just assigned the bits we want directly. Make me wonder why we can't assign all the bio flags to start with. Signed-off-by: Christoph Hellwig --- drivers/md/raid1.c | 7 ++- 1 file changed, 2 insertions(+), 5

[dm-devel] [PATCH 08/18] scsi_dh_rdac: switch to scsi_execute_req_flags()

2017-01-25 Thread Christoph Hellwig
From: Hannes Reinecke Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the

[dm-devel] [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue

2017-01-25 Thread Christoph Hellwig
DM already calls blk_mq_alloc_request on the request_queue of the underlying device if it is a blk-mq device. But now that we allow drivers to allocate additional data and initialize it ahead of time we need to do the same for all drivers. Doing so and using the new cmd_size infrastructure in

[dm-devel] [PATCH 13/18] scsi: remove scsi_cmd_dma_pool

2017-01-25 Thread Christoph Hellwig
There is no need for GFP_DMA allocations of the scsi_cmnd structures themselves, all that might be DMAed to or from is the actual payload, or the sense buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi.c | 15

[dm-devel] [PATCH 05/18] block: allow specifying size for extra command data

2017-01-25 Thread Christoph Hellwig
This mirrors the blk-mq capabilities to allocate extra drivers-specific data behind struct request by setting a cmd_size field, as well as having a constructor / destructor for it. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c

[dm-devel] [PATCH 12/18] scsi: respect unchecked_isa_dma for blk-mq

2017-01-25 Thread Christoph Hellwig
Currently blk-mq always allocates the sense buffer using normal GFP_KERNEL allocation. Refactor the cmd pool code to split the cmd and sense allocation and share the code to allocate the sense buffers as well as the sense buffer slab caches between the legacy and blk-mq path. Note that this

[dm-devel] [PATCH 11/18] scsi: remove gfp_flags member in scsi_host_cmd_pool

2017-01-25 Thread Christoph Hellwig
When using the slab allocator we already decide at cache creation time if an allocation comes from a GFP_DMA pool using the SLAB_CACHE_DMA flag, and there is no point passing the kmalloc-family only GFP_DMA flag to kmem_cache_alloc. Drop all the infrastructure for doing so. Signed-off-by:

[dm-devel] [PATCH 10/18] scsi_dh_hp_sw: switch to scsi_execute_req_flags()

2017-01-25 Thread Christoph Hellwig
From: Hannes Reinecke Switch to scsi_execute_req_flags() instead of using the block interface directly. This will set REQ_QUIET and REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and should be able to send the command even if the device is quiesced.

Re: [dm-devel] deterministic io throughput in multipath

2017-01-25 Thread Benjamin Marzinski
On Wed, Jan 25, 2017 at 11:48:33AM +, Muneendra Kumar M wrote: > Hi Ben, > Thanks for the review . > I will consider the below points and will do the necessary changes. > > I have two general questions which may not be related to this. > 1)Is there any standard tests that we need to do to

Re: [dm-devel] deterministic io throughput in multipath

2017-01-25 Thread Muneendra Kumar M
Hi Ben, Thanks for the review . I will consider the below points and will do the necessary changes. I have two general questions which may not be related to this. 1)Is there any standard tests that we need to do to check the functionality of the multipath daemon. 2)Iam new to git is there any

Re: [dm-devel] deterministic io throughput in multipath

2017-01-25 Thread Benjamin Marzinski
This looks fine to me. If this what you want to push, I'm o.k. with it. But I'd like to make some suggestions that you are free to ignore. Right now you have to check in two places to see if the path failed (in update_multipath and check_path). If you look at the delayed_*_checks code, it flags