lkml.org 
[lkml]   [2014]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/inode: No need to take ->i_lock right after alloc_inode()
On Wed, Jan 08, 2014 at 11:21:13AM +0100, Richard Weinberger wrote:
> > In all three cases, new_inode_pseudo(), iget_locked() and iget5_locked(),
> > we own the new inode exclusively at this point and therefore taking
> > ->i_lock to protect ->i_state/->i_hash against concurrent access is
> > superfluous.

We'd still need some sort of barrier to make sure the state is visible
to all CPUs before it becomes visible, usually by another spin_unlock
happing later. If you have a workload where removing these is critical
please document these issues in the code and resubmit it with an explanation
of the workload where it helps. If it's just a cleanup I wouldn't bother
with it.



\
 
 \ /
  Last update: 2014-01-10 10:41    [W:0.067 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site