From: Andrew Morton <akpm@digeo.com>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: 2.4, 2.5: SMP race: __sync_single_inode vs. __mark_inode_dirty
Date: Sun, 2 Feb 2003 16:06:56 -0800 [thread overview]
Message-ID: <20030202160656.52349e3a.akpm@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0302022203560.1545-300000@artax.karlin.mff.cuni.cz>
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> 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.
next prev parent reply other threads:[~2003-02-02 23:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-02 23:32 2.4, 2.5: SMP race: __sync_single_inode vs. __mark_inode_dirty Mikulas Patocka
2003-02-03 0:06 ` Andrew Morton [this message]
2003-02-03 17:00 ` Andrea Arcangeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030202160656.52349e3a.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox