[rds-devel] cq event handler - using mutex
Steve Wise
swise at opengridcomputing.com
Mon Jan 12 09:18:59 PST 2009
Andy,
I think rds_ib_recv_cq_comp_handler() shouldn't be using a mutex. If
you turn on mutex debugging, you'll see a DEBUG_LOCKS_WARN_ON() from
spin_lock_mutex() in kernel/mutex_debug.h because in_interrupt() is TRUE.
The RDMA kernel mode cq completion callback func is called from the
interrupt context...
snipit from rds_ib_recv_cq_comp_handler():
------------
if (mutex_trylock(&ic->i_recv_mutex)) {
if (rds_ib_recv_refill(conn, GFP_ATOMIC,
GFP_ATOMIC | __GFP_HIGHMEM, 0))
ret = -EAGAIN;
else
rds_ib_stats_inc(s_ib_rx_refill_from_cq);
mutex_unlock(&ic->i_recv_mutex);
} else
ret = -EAGAIN;
------------
Steve.
More information about the rds-devel
mailing list