Re: [rdma-next v1 1/1] IB/core: Protect against concurrent access to hardware stats

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

 



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



[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