Re: [RFC PATCH -v2] percpu_counters: make fbc->count read atomic on 32 bit architecture

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, August 26, 2008 - 5:26 pm

On Mon, 25 Aug 2008 16:50:28 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:


The linux-ext4 list is not an appropriate place for discussing a
kernel-wide change.


Which this one surely is.  I added linux-kernel to cc.


The problem of atomically handling 64-bit quantities on 32-bit machines
is by no means unique to percpu_counters.  We sorta-solved it for
i_size and we continue to sorta-not-solve it for loff_t and surely
there are other places which already sorta-solve it and which will be
sorta-solved in the future.

All of which tells us that we need a real solution, at a lower level.

We already have a suitable type, really: atomic64_t.  But it's an
arch-private thing and is only implemented on 64-bit architectures.

Perhaps atomic64_t should be promoted to being a kernel-wide facility?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC PATCH -v2] percpu_counters: make fbc->count read ..., Andrew Morton, (Tue Aug 26, 5:26 pm)