From: Steven Whitehouse <swhiteho@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org
Subject: Preempt & smp_processor_id in __make_request
Date: Tue, 26 Jul 2011 10:32:06 +0100 [thread overview]
Message-ID: <1311672726.2700.5.camel@menhir> (raw)
Hi,
On the latest upstream kernel, I'm getting large quantities of messages
as per the following:
Jul 26 09:54:04 chywoon kernel: BUG: using smp_processor_id() in preemptible [00
000000] code: jbd2/dm-0-8/1546
Jul 26 09:54:04 chywoon kernel: caller is __make_request+0x209/0x350
Jul 26 09:54:04 chywoon kernel: Pid: 1546, comm: jbd2/dm-0-8 Tainted: G W
3.0.0+ #252
Jul 26 09:54:04 chywoon kernel: Call Trace:
Jul 26 09:54:04 chywoon kernel: [<ffffffff813db897>] debug_smp_processor_id+0xe7
/0x100
Jul 26 09:54:04 chywoon kernel: [<ffffffff813b6f29>] __make_request+0x209/0x350
Jul 26 09:54:04 chywoon kernel: [<ffffffff8154635e>] ? dm_request+0x2e/0x280
Jul 26 09:54:04 chywoon kernel: [<ffffffff813b3ffb>] generic_make_request+0x27b/
0x550
Jul 26 09:54:04 chywoon kernel: [<ffffffff8123ef7e>] ? jbd2_journal_file_buffer+
0x8e/0x130
Jul 26 09:54:04 chywoon kernel: [<ffffffff813b432f>] submit_bio+0x5f/0xd0
Jul 26 09:54:04 chywoon kernel: [<ffffffff811b14a6>] submit_bh+0xe6/0x120
etc.
The (trivial) fix appears to be the following:
diff --git a/block/blk-core.c b/block/blk-core.c
index f8cb099..f925581 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1283,7 +1283,7 @@ get_rq:
if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
bio_flagged(bio, BIO_CPU_AFFINE))
- req->cpu = smp_processor_id();
+ req->cpu = raw_smp_processor_id();
plug = current->plug;
if (plug) {
However this fixes the symptoms, rather than the cause, so I'm not at
all sure that this is the correct solution,
Steve.
next reply other threads:[~2011-07-26 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 9:32 Steven Whitehouse [this message]
2011-07-26 10:56 ` Preempt & smp_processor_id in __make_request Sergey Senozhatsky
2011-07-26 16:15 ` Williams, Dan J
2011-07-26 11:43 ` Christoph Hellwig
2011-07-26 13:05 ` Jens Axboe
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=1311672726.2700.5.camel@menhir \
--to=swhiteho@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
/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