Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5

2 messages, 2 authors, 2007-12-10 · open the first message on its own page

Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5

From: Roland Dreier <hidden>
Date: 2007-12-09 23:22:51

 > I think it needs some more inspection. The msleep in there is only called
 > for hcalls that return H_IS_LONG_BUSY(). In theory, you can call
 > ehca_plpar_hcall_norets() from inside an interrupt handler if the
 > hcall in question never returns long busy.

Fair enough... according to Documentation/infiniband/core_locking.txt,
the only driver methods that cannot sleep are:

    create_ah
    modify_ah
    query_ah
    destroy_ah
    bind_mw
    post_send
    post_recv
    poll_cq
    req_notify_cq
    map_phys_fmr

and I don't think ehca does an hcall from any of those.  Of course
there might be other driver-internal code paths that I don't know
about.  Maybe do a quick audit and then stick might_sleep() in the
hcall functions to catch any mistakes?

 - R.

Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5

From: Joachim Fenkes <hidden>
Date: 2007-12-10 17:42:18

On Monday 10 December 2007 00:22, Roland Dreier wrote:
Fair enough... according to Documentation/infiniband/core_locking.txt,
the only driver methods that cannot sleep are:

    [...]
    map_phys_fmr
In fact, we do use hCalls there. Our hardware doesn't actually support FMRs,
so we translate a "map FMR" into a "reallocate PMR", which doesn't work
without hCalls. What's more, the hCalls involved (e.g. H_FREE_RESOURCE)
might well return H_LONG_BUSY, so the whole operation might sleep; no way
around it.

How should we deal with this?

Thanks,
  Joachim
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help