[lkml]   [2003]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.4, 2.5: SMP race: __sync_single_inode vs. __mark_inode_dirty
Mikulas Patocka <> wrote:
> Hi.
> there's a SMP race condition between __sync_single_inode (or __sync_one on
> 2.4.20) and __mark_inode_dirty. __mark_inode_dirty doesn't take inode
> spinlock. As we know -- unless you take a spinlock or use barrier,
> processor can change order of instructions.

Looks good to me, although my understanding of these memory ordering issues
is woeful.

We do want to avoid taking inode_lock in mark_inode_dirty() - that is called
very frequently. I'm rather surprised that inode_lock contention has not
been a problem thus far.

Longer-term we should probably turn i_state into a ulong and only run atomic
bitops against it.

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

 \ /
  Last update: 2005-03-22 13:32    [W:0.039 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site