lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 22 Aug 2008 20:33:22 +0200
From:	Peter Zijlstra <>
To:	Mingming Cao <>
Cc:	"Aneesh Kumar K.V" <>,,,
Subject: Re: [RFC PATCH] percpu_counters: make fbc->count read atomic on 32
	bit architecture

On Fri, 2008-08-22 at 11:29 -0700, Mingming Cao wrote:
> 在 2008-08-22五的 19:04 +0530,Aneesh Kumar K.V写道:
> > fbc->count is of type s64. The change was introduced by
> > 0216bfcffe424a5473daa4da47440881b36c1f4 which changed the type
> > from long to s64. Moving to s64 also means on 32 bit architectures
> > we can get wrong values on fbc->count.
> > 
> > percpu_counter_read is used within interrupt context also. So
> > use the irq safe version of spinlock while reading
> > 
> It's quit expensive to hold the lock to do percpu_counter_read  on 32
> bit arch, the common case.
> The type of the global counter and local counter were explictly
> specified using s64 and s32 The global counter is changed from long to
> s64, while the local counter is changed from long to s32, so we could
> avoid doing 64 bit update in most cases.  After all the percpu counter
> read is not a accurate value. 

seqlocks come to mind.

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists