From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andy Whitcroft <apw@shadowen.org>,
Andrew Morton <akpm@linux-foundation.org>,
Chuck Ebbert <cebbert@redhat.com>,
Matthias Hensler <matthias@wspse.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
richard kennedy <richard@rsk.demon.co.uk>
Subject: Re: Processes spinning forever, apparently in lock_timer_base()?
Date: Fri, 21 Sep 2007 20:54:14 +0200 [thread overview]
Message-ID: <20070921205414.33d51aae@lappy> (raw)
In-Reply-To: <Pine.LNX.4.64.0709211623190.16442@blonde.wat.veritas.com>
On Fri, 21 Sep 2007 16:58:15 +0100 (BST) Hugh Dickins
<hugh@veritas.com> wrote:
> But once I look harder at it, I wonder what would have kept
> 2.6.18 to 2.6.23 safe from the same issue: per-cpu deltas from
> the global vm stats too low to get synched back to global, yet
> adding up to something which misleads balance_dirty_pages into
> an indefinite loop e.g. total nr_writeback actually 0, but
> appearing more than dirty_thresh in the global approximation.
This could only happen when: dirty_thresh < nr_cpus * per_cpu_max_delta
> Looking at the 2.6.18-2.6.23 code, I'm uncertain what to try instead.
> There is a refresh_vm_stats function which we could call (then retest
> the break condition) just before resorting to congestion_wait. But
> the big NUMA people might get very upset with me calling that too
> often: causing a thundering herd of bouncing cachelines which that
> was all designed to avoid. And it's not obvious to me what condition
> to test for dirty_thresh "too low".
That could be modeled on the error limit I have. For this particular
case that would end up looking like:
nr_online_cpus * pcp->stat_threshold.
> I believe Peter gave all this quite a lot of thought when he was
> making the rc6-mm1 changes, and I'd rather defer to him for a
> suggestion of what best to do in earlier releases. Or maybe he'll
> just point out how this couldn't have been a problem before.
As outlined above, and I don't think we'll ever have such a low
dirty_limit. But who knows :-)
> Or there is is Richard's patch, which I haven't considered, but
> Andrew was not quite satisfied with it - partly because he'd like
> to understand how the situation could come about first, perhaps
> we have now got an explanation.
I'm with Andrew on this, that is, quite puzzled on how all this arises.
Testing those writeback-fix-* patches might help rule out (or point to)
a mis-function of pdflush.
The theory that one task will spin in balance_dirty_pages() on a
bdi that does not actually have many dirty pages, doesn't sound
plausible because eventually the total dirty count (well, actually
dirty+unstable+writeback) should subside again. This theory can
cause crappy latencies, but should not 'hang' the machine.
> (The original bug report was indeed on SMP, but I haven't seen
> anyone say that's a necessary condition for the hang: it would
> be if this is the issue. And Richard writes at one point of the
> system only responding to AltSysRq: that would be surprising for
> this issue, though it's possible that a task in balance_dirty_pages
> is holding an i_mutex that everybody else comes to need.)
Are we actually holding i_mutex on paths that lead into
balance_dirty_pages? that does (from my admittedly limited knowledge of
the vfs) sound like trouble, since we'd need it to complete writeback.
All quite puzzling.
next prev parent reply other threads:[~2007-09-21 18:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 22:39 Processes spinning forever, apparently in lock_timer_base()? Chuck Ebbert
2007-08-02 10:37 ` richard kennedy
2007-08-03 18:34 ` Andrew Morton
2007-08-04 8:44 ` Matthias Hensler
2007-08-09 9:59 ` Matthias Hensler
2007-08-09 16:55 ` Andrew Morton
2007-08-09 17:37 ` Matthias Hensler
2007-09-20 21:07 ` Chuck Ebbert
2007-09-20 21:29 ` Andrew Morton
2007-09-20 22:04 ` Chuck Ebbert
2007-09-20 22:36 ` Andrew Morton
2007-09-20 22:44 ` Chuck Ebbert
2007-09-21 8:08 ` Matthias Hensler
2007-09-21 8:22 ` Andrew Morton
2007-09-21 10:25 ` richard kennedy
2007-09-21 10:33 ` Andrew Morton
2007-09-21 10:47 ` richard kennedy
2007-09-22 12:08 ` richard kennedy
2007-09-21 9:39 ` Andy Whitcroft
2007-09-21 15:43 ` Chuck Ebbert
2007-09-21 15:58 ` Hugh Dickins
2007-09-21 16:16 ` Chuck Ebbert
2007-09-21 18:54 ` Peter Zijlstra [this message]
2007-10-29 18:55 ` Bruno Wolff III
-- strict thread matches above, loose matches on Subject: below --
2007-08-03 20:14 Oleg Nesterov
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=20070921205414.33d51aae@lappy \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=cebbert@redhat.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias@wspse.de \
--cc=richard@rsk.demon.co.uk \
--cc=tglx@linutronix.de \
/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