Re: [PATCH V3 5/6] RDMA CM: Save Owning PID

2010-12-23 Thread Or Gerlitz
Jason Gunthorpe wrote: Nir Muchtar wrote: It is tied to the ucma_fops FD (ie /dev/rdma_cm, aka the event channel), which when closed calls ucma_free_ctx which calls rdma_destroy_id. Processes that can access that FD can control the RDMA CM IDs associated with it. The only case where this

[RFC 2/8] IB/srp: consolidate state change code

2010-12-23 Thread David Dillow
This is a break-out and slight cleanup of Bart Van Assche's work. --- drivers/infiniband/ulp/srp/ib_srp.c | 45 ++ 1 files changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index

[RFC 3/8] IB/srp: allow lockless work posting

2010-12-23 Thread David Dillow
Only one CPU at a time will own an RX IU, so using the address of the IU as the work request cookie allows us to avoid taking a lock. We can similarly prepare the TX path for lockless posting by moving the free TX IUs to a list. This also removes the requirement that the queue sizes be a power of

[RFC 1/8] IB/srp: allow task management without a previous request

2010-12-23 Thread David Dillow
We can only have one task management comment outstanding, so move the completion and status to the target port. This allows us to handle resets of a LUN without a corresponding request having been sent. Meanwhile, we don't need to play games with host_scribble, just use it as the pointer it is.

[RFC 7/8] IB/srp: stop sharing the host lock with SCSI

2010-12-23 Thread David Dillow
We don't need protection against the SCSI stack, so use our own lock to allow parallel progress on separate CPUs. This is a break-out of Bart Van Assche's work. --- drivers/infiniband/ulp/srp/ib_srp.c | 42 +- drivers/infiniband/ulp/srp/ib_srp.h |2 + 2

[RFC 5/8] IB/srp: reduce local coverage for command submission and EH

2010-12-23 Thread David Dillow
We only need locks to protect our lists and number of credits available. By pre-consuming the credit for the request, we can reduce our lock coverage to just those areas. If we don't actually send the request, we'll need to put the credit back into the pool. This is a break-out and slight cleanup

[RFC 8/8] IB/srp: consolidate hot-path variables into cache lines

2010-12-23 Thread David Dillow
Put the variables accessed together in the hot-path into common cachelines, and separate them by RW vs RO to avoid false dirtying. We keep a local copy of the lkey and rkey in the target to avoid traversing pointers (and associated cache lines) to find them. ---