Re: [PATCH rdma-next] IB/core: Avoid deadlock during netlink message handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 24, 2019 at 07:53:56PM +0000, Parav Pandit wrote:

> Jason's memory size point made be curious about the srcu_struct
> size.  On my x86 5.x kernel I see srcu_struct costs 70+Kbytes!
> Likely due to some debug info in my kernel.  Which is probably a
> good reason in this case to shift to rwsem. (rwsem is 80 bytes).

Yikes, I knew it was bad, but I didn't think that bad.. So
unbelievable I checked here and I got +4752 bytes using SRCU on my
much less debug kernel. Crazy.

> One small comment correction needed is,
> 
> -	rdma_nl_types[index].cb_table = cb_table;
> -	mutex_unlock(&rdma_nl_mutex);
> +	/* Pairs with the READ_ONCE in is_nl_valid() */
> +	smp_store_release(&rdma_nl_types[index].cb_table, cb_table);
> 
> It should be "Pairs with the READ_ONE in get_cb_table() */

Done, applied to for-rc, thanks

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux