From: Mike Galbraith <bitbucket@online.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Tony Luck <tony.luck@gmail.com>,
eunb.song@samsung.com, Dmitry Monakhov <dmonakhov@openvz.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: EXT4 panic at jbd2_journal_put_journal_head() in 3.9+
Date: Mon, 13 May 2013 07:18:26 +0200 [thread overview]
Message-ID: <1368422306.5774.70.camel@marge.simpson.net> (raw)
In-Reply-To: <20130513033655.GE25996@thunk.org>
On Sun, 2013-05-12 at 23:36 -0400, Theodore Ts'o wrote:
> On Sun, May 12, 2013 at 08:11:59PM -0700, Tony Luck wrote:
> >
> > My best guess as to why this commit causes problems is that there are places
> > where updates to individual fields in this structure used to be independent
> > because they were to whole words. Now we have bitfileds there are races
> > between access to different fields in the same word.
>
> Yeah, except we access the fields while holding a lock.... wait a
> minute. We're using bit_spinlocks().... and am I missing something?
>
> Where are the barrier statements to prevent the CPU or the compiler
> from reordering statements around bit_spin_lock()? But if that's the
> problem, I would have expected lots of other things to be broken.
Those use test_and_set_bit(), which per Paul McMemory-Wizard...
ATOMIC OPERATIONS
-----------------
Whilst they are technically interprocessor interaction considerations, atomic
operations are noted specially as some of them imply full memory barriers and
some don't, but they're very heavily relied on as a group throughout the
kernel.
Any atomic operation that modifies some state in memory and returns information
about the state (old or new) implies an SMP-conditional general memory barrier
(smp_mb()) on each side of the actual operation (with the exception of
explicit lock operations, described later). These include:
xchg();
cmpxchg();
atomic_xchg();
atomic_cmpxchg();
atomic_inc_return();
atomic_dec_return();
atomic_add_return();
atomic_sub_return();
atomic_inc_and_test();
atomic_dec_and_test();
atomic_sub_and_test();
atomic_add_negative();
atomic_add_unless(); /* when succeeds (returns 1) */
test_and_set_bit();
test_and_clear_bit();
test_and_change_bit();
next prev parent reply other threads:[~2013-05-13 5:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 2:21 Re: " EUNBONG SONG
2013-05-13 3:11 ` Tony Luck
2013-05-13 3:36 ` Theodore Ts'o
2013-05-13 5:18 ` Mike Galbraith [this message]
2013-05-13 6:14 ` Tony Luck
-- strict thread matches above, loose matches on Subject: below --
2013-05-10 0:51 EUNBONG SONG
2013-05-10 17:27 ` Tony Luck
2013-05-11 7:52 ` Dmitry Monakhov
2013-05-13 2:04 ` Tony Luck
2013-05-13 3:07 ` Theodore Ts'o
2013-05-13 5:06 ` Sidorov, Andrei
2013-05-10 19:27 ` Theodore Ts'o
2013-05-10 20:38 ` David Daney
2013-05-09 7:59 EUNBONG SONG
2013-05-09 15:31 ` Theodore Ts'o
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=1368422306.5774.70.camel@marge.simpson.net \
--to=bitbucket@online.de \
--cc=dmonakhov@openvz.org \
--cc=eunb.song@samsung.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@gmail.com \
--cc=tytso@mit.edu \
/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
Powered by JetHome