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, Mar 21, 2018 at 03:13:25PM -0500, Christopher Lameter wrote:
> On Wed, 21 Mar 2018, Jason Gunthorpe wrote:
> 
> > On Wed, Mar 21, 2018 at 01:04:45PM -0500, Christopher Lameter wrote:
> > > 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.
> >
> > Maybe, but other places aren't recording their statistics in u64's
> > then, there is no way to do that without locks portably.
> 
> Umm... Ok so we are concerned about 32 bits here? True the core kernel
> uses unsigned long for these counters.

Sort of. For core kernel code like this I certainly don't want to see
us cavalierly break things to solve imaginary problems.

In this case I can't see a real performance problem here..

The extra two sysfs that need locking are not used frequently I think,
and I doubt much software is polling sysfs files multi-threaded at a
high rate of speed. That is a pretty nonsense thing to do.

Jason
--
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