On Wed, 21 Mar 2018, Jason Gunthorpe wrote: > I think we are going to add a lock, it should cover all readers > too. There is no real reason not too that I can see. The general approach in the kernel is to not use locks for access to statistics and recognize that they are snapshots and may be inaccurate because unserialized things happened after or at the time of the snapshot. > > So switch stats->lock to a rwlock and hold it in > > show_hw_stats (write) > show_stats_lifespan > set_stats_lifespan > > Which is all the places that touch stats.. I think this just causes unnecessary trouble and may slow down the access to stats in particular in large systems. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html