Re: [PATCH 07/17] fs: icache atomic inodes_stat

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

 



On Wed, Sep 29, 2010 at 09:52:53PM -0700, Andrew Morton wrote:
> On Wed, 29 Sep 2010 22:18:39 +1000 Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> > From: Nick Piggin <npiggin@xxxxxxx>
> > 
> > The inode use statistics are currently protected by the inode_lock.
> > Before we can remove the inode_lock, we need to protect these
> > counters against races. Do this by converting them to atomic
> > counters so they ar enot dependent on any lock at all.
> 
> typo

It's Dave, I swear :)


> > +struct inodes_stat_t {
> > +	atomic_t nr_inodes;
> > +	atomic_t nr_unused;
> > +	int dummy[5];		/* padding for sysctl ABI compatibility */
> > +};
> 
> OK, that's a hack.  The first two "ints" are copied out to userspace. 
> This change assumes that sizeof(atomic_t)=4 and that an atomic_t has
> the same layout, alignment and padding as an int.
> 
> Probably that's true in current kernels and with current architectures
> but it's a hack and it's presumptive.
> 
> It shouldn't be snuck into the tree unchangelogged and uncommented.
> 
> (time passes)
> 
> OK, I see that all of this gets reverted later on.  Please update the
> changelog so the next reviewer doesn't get fooled.

Yeah it is. I might end up folding the per-cpu stuff back over it
and avoid the issue completely. Otherwise I'll add a comment.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux