From: Andrew Morton <akpm@linux-foundation.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Jens Axboe <jens.axboe@oracle.com>,
linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] Give kjournald a IOPRIO_CLASS_RT io priority
Date: Thu, 2 Oct 2008 13:24:57 -0700 [thread overview]
Message-ID: <20081002132457.46ad8d05.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081002061236.3c71c877@infradead.org>
On Thu, 2 Oct 2008 06:12:36 -0700 Arjan van de Ven <arjan@infradead.org> wrote:
> On Wed, 1 Oct 2008 23:55:01 -0700
> >
> > I've forgotten where that code is now, but I don't think it was ever
> > revisited. It should be.
> >
> > So. Where are these atime updaters getting blocked?
>
> my reproducer is sadly very simple (claws-mail is my mail client that uses maildir)
>
> Process claws-mail (4896) Total: 2829.7 msec
> EXT3: Waiting for journal access 2491.0 msec 88.4 %
> Writing back inodes 160.9 msec 5.7 %
> synchronous write 78.8 msec 3.0 %
>
> is an example of such a trace (this is with patch, without patch the numbers are about 3x bigger)
>
> Waiting for journal access is "journal_get_write_access"
> Writing back inodes is "writeback_inodes"
> synchronous write is "do_sync_write"
>
Right. Probably the lock_buffer() in do_get_write_access(). kjournald
is checkpointing the committing transaction (writing metadata buffers
back into the fs) and a user process operating on the current
transaction is trying to get access to one of those buffers but has to
wait for the writeout to complete first.
It wasn't always thus. Back in, umm, 2.5.0 we did
/*
* The buffer_locked() || buffer_dirty() tests here are simply an
* optimisation tweak. If anyone else in the system decides to
* lock this buffer later on, we'll blow up. There doesn't seem
* to be a good reason why they should do this.
*/
if (jh->b_cp_transaction &&
(buffer_locked(jh2bh(jh)) || buffer_dirty(jh2bh(jh)))) {
unlock_journal(journal);
lock_buffer(jh2bh(jh));
and I _think_ it was the loss of that which hurt us a lot.
773fc4c63442fbd8237b4805627f6906143204a8 or thereabouts in the old git
tree.
It would be very good if we could again decouple the committing and
current transactions, but I fear that none of us remember sufficiently
well how it all works (or, more importantly, how it all doesn't work
when you make a change).
Of course, that could all be wrong and we could be stuck somewhere
else. A good way to diagnose this stuff would be
--- a/kernel/sched.c~a
+++ a/kernel/sched.c
@@ -5567,10 +5567,14 @@ EXPORT_SYMBOL(yield);
void __sched io_schedule(void)
{
struct rq *rq = &__raw_get_cpu_var(runqueues);
+ unsigned long in, out;
delayacct_blkio_start();
atomic_inc(&rq->nr_iowait);
+ in = jiffies;
schedule();
+ out = jiffies;
+ WARN_ON(time_after(out, in + 1 * HZ));
atomic_dec(&rq->nr_iowait);
delayacct_blkio_end();
}
_
perhaps for varying values of "1".
next prev parent reply other threads:[~2008-10-02 20:25 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 3:00 [PATCH] Give kjournald a IOPRIO_CLASS_RT io priority Arjan van de Ven
2008-10-02 4:56 ` Andrew Morton
2008-10-02 6:27 ` Jens Axboe
2008-10-02 6:55 ` Andrew Morton
2008-10-02 7:45 ` Jens Axboe
2008-10-02 8:03 ` Andrew Morton
2008-10-02 8:22 ` Jens Axboe
2008-10-02 8:43 ` Andrew Morton
2008-10-02 8:46 ` Jens Axboe
2008-10-02 12:04 ` Theodore Tso
2008-10-02 13:16 ` Arjan van de Ven
2008-10-02 13:46 ` Theodore Tso
2008-10-02 14:33 ` Arjan van de Ven
2008-10-04 14:12 ` Theodore Tso
2008-10-04 17:14 ` Joseph Fannin
2008-10-04 21:27 ` Theodore Tso
2008-10-02 13:12 ` Arjan van de Ven
2008-10-02 20:24 ` Andrew Morton [this message]
2008-10-03 4:01 ` Arjan van de Ven
2008-10-03 4:23 ` Arjan van de Ven
2008-10-03 4:40 ` Andrew Morton
2008-10-03 4:43 ` Arjan van de Ven
2008-10-03 4:50 ` Andrew Morton
2008-10-03 5:00 ` Arjan van de Ven
2008-10-03 5:24 ` Andrew Morton
2008-10-03 17:21 ` Arjan van de Ven
2008-10-09 3:00 ` Theodore Tso
2008-10-09 3:38 ` Andrew Morton
2008-10-03 4:45 ` Arjan van de Ven
2008-10-02 6:57 ` Andi Kleen
2008-10-02 7:55 ` Jens Axboe
2008-10-02 9:33 ` Dave Chinner
2008-10-02 9:45 ` Jens Axboe
2008-10-02 13:14 ` Arjan van de Ven
2008-10-02 13:27 ` Jens Axboe
2008-10-02 13:36 ` Arjan van de Ven
2008-10-02 13:47 ` Jens Axboe
2008-10-02 14:26 ` Arjan van de Ven
2008-10-02 16:42 ` Jens Axboe
2008-10-02 19:04 ` Arjan van de Ven
2008-10-02 19:22 ` Jens Axboe
2008-10-02 21:37 ` Andrew Morton
2008-10-02 23:58 ` Dave Chinner
2008-10-03 0:06 ` Andrew Morton
2008-10-03 0:20 ` Andrew Morton
2008-10-02 13:05 ` Arjan van de Ven
2008-10-02 17:11 ` Jens Axboe
[not found] <bimJN-4cO-5@gated-at.bofh.it>
[not found] ` <biosl-6bq-9@gated-at.bofh.it>
[not found] ` <biqkw-aK-3@gated-at.bofh.it>
[not found] ` <birgx-1pQ-9@gated-at.bofh.it>
[not found] ` <bisPe-3xx-9@gated-at.bofh.it>
[not found] ` <bisYW-3HQ-13@gated-at.bofh.it>
2008-10-02 15:32 ` Bodo Eggert
2008-10-02 23:34 ` Dave Chinner
2008-10-04 7:45 ` Aaron Carroll
2008-10-06 3:18 ` Dave Chinner
2008-10-07 18:06 ` Jens Axboe
2008-10-07 22:22 ` Dave Chinner
2008-10-09 8:48 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2007-10-15 17:46 [patch] " Arjan van de Ven
2007-10-15 18:47 ` Andrew Morton
2007-10-15 19:28 ` Jens Axboe
2007-10-22 9:10 ` Ingo Molnar
2007-10-22 9:23 ` Andrew Morton
2007-10-22 9:27 ` Ingo Molnar
2007-10-22 9:40 ` Ingo Molnar
2007-10-22 9:49 ` Andrew Morton
2007-10-15 20:13 ` Rik van Riel
2007-10-15 21:12 ` Andrew Morton
[not found] ` <473B18BA.5000709@hp.com>
2007-11-14 17:14 ` Andrew Morton
2007-11-14 17:18 ` Ingo Molnar
2007-11-14 17:51 ` Arjan van de Ven
2007-11-14 18:55 ` Ingo Molnar
2007-11-14 19:43 ` Alan D. Brunelle
2007-11-14 19:24 ` Alan D. Brunelle
2007-11-14 19:50 ` Arjan van de Ven
2007-11-14 19:56 ` Alan D. Brunelle
2007-11-16 16:25 ` Alan D. Brunelle
2007-11-16 16:40 ` Alan D. Brunelle
2007-11-16 18:35 ` Ray Lee
2007-11-16 18:39 ` Alan D. Brunelle
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=20081002132457.46ad8d05.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=jens.axboe@oracle.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.