]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: pqp: Implement handling of PQPs in error.
authorKnut Omang <knut.omang@oracle.com>
Wed, 26 Oct 2016 09:44:00 +0000 (11:44 +0200)
committerKnut Omang <knut.omang@oracle.com>
Fri, 11 Nov 2016 16:36:57 +0000 (17:36 +0100)
commitc4cc97a581e18156308f375d21d632f686601b43
tree031cd6401c5e69cbfa48ab2724d1aa7ac4afdaff
parent69511528199424eafd946263df5ff5fa712159f7
sif: pqp: Implement handling of PQPs in error.

The assumption is that any such situation that can arise in
production is due to an application that causes it's CQ to go
to error and where the PQP subsequently tries to post a CQ
operation that affects the CQ that is in error. In these cases,
the PQP itself goes to error and an event is generated.

This commit refactors the modify_qp logic slightly, as well as
implementing a modification cycle to bring a privileged QP
back up again. It also adds a new pqp debugfs file and some statistics
to help monitoring the new PQP specific state as well.

The resurrect operation is queued on the sif workqueue
by the new handle_pqp_event function, which is now properly
wired up to accept all PQP events. When a PQP is detected as
being in error, its last_set_state is updated, and in addition
the write_only flag is set, which causes new send reqs not to
touch any collect buffer as part of the operation.
This flag was introduced to allow the resurrect to set the PQP in
RTS again while still not triggering any sends.

This way the implementation allows clients to continue to
post requests to the PQP while it is in error or in transition
back to RTS again by just accepting these requests into the PQP
send queue without any writes to the collect buffer.

When in the INIT state, the resurrect worker updates
the SQ pointers to skip the request that triggered
the PQP error.

Once back in RTS, the resurrect worker can take the single SQ lock
which serializes posts, check the size of the send queue
and if >= 0, trigger the send queue scheduler to start processing these.
Once the QP is in SQS mode, or just idle if the queue was empty,
it is safe for ordering purposes to let normal posting with
collect buffer writes commence.

Orabug: 24715634

Signed-off-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: Francisco Trivino-Garcia <francisco.trivino@oracle.com>
13 files changed:
drivers/infiniband/hw/sif/psif_hw_macro.h
drivers/infiniband/hw/sif/psif_hw_setget.h
drivers/infiniband/hw/sif/sif_base.c
drivers/infiniband/hw/sif/sif_cq.c
drivers/infiniband/hw/sif/sif_cq.h
drivers/infiniband/hw/sif/sif_debug.c
drivers/infiniband/hw/sif/sif_eq.c
drivers/infiniband/hw/sif/sif_eq.h
drivers/infiniband/hw/sif/sif_pqp.c
drivers/infiniband/hw/sif/sif_pqp.h
drivers/infiniband/hw/sif/sif_qp.c
drivers/infiniband/hw/sif/sif_qp.h
drivers/infiniband/hw/sif/sif_sq.c