linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Peter T. Breuer" <ptb@it.uc3m.es>
To: Andrew Morton <akpm@zip.com.au>
Cc: Steve Whitehouse <Steve@ChyGwyn.com>,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Kernel deadlock using nbd over acenic driver
Date: Thu, 16 May 2002 22:28:37 +0200 (MET DST)	[thread overview]
Message-ID: <200205162028.g4GKSbA23812@oboe.it.uc3m.es> (raw)
In-Reply-To: <3CE40A77.22C74DC1@zip.com.au> from Andrew Morton at "May 16, 2002 12:37:27 pm"

"A month of sundays ago Andrew Morton wrote:"
> Steven Whitehouse wrote:
> > It would be nice to have a per device "max dirty pages" limit. Also useful
> > would be a per queue priority so that if the max dirty pages limit is reached
> > for that device, then the driver gets higher priority on memory allocations
> > until the number of dirty pages has dropped below an acceptable level. I
> > don't know how easy or desireable it would be to implement such a scheme
> > generally though.

I think that is one possible mechanism, yes.  What we need is for the VM
system to "act more intelligently".  I've given up on trying to get VM
info and throttling the nbd device using it, because the lockup doesn't
involve nbd, and would be made worse by slowing it down.  The lockup is
purely a VM phenonemen - It tries to flush buffers aimed at nbd.  but
won't give the nbd process any tcp buffers to do the flushing with, and
thus blocks itself.

> I'd expect a lot of these problems would be lessened by tweaking
> the fractional settings in /proc/sys/vm/bdflush.  Get it to write
> data earlier.  nfract, ndirty, nfract_sync and nfract_stop_bdflush.

This is part of the standard setup in Enbd, at least - the client
daemons twiddle these settings to at least 15/85% on startup.  It
doesn't help the reported tcp/vm deadlock, though it makes the occasions
on which it happens more "abnormal" than "usual".  Unfortunately those
abnormal conditions are reached under memory pressure while nbd is
running - one simply has to get tcp competing for buffers with other
heavy i/o.  If the i/o is directed at nbd itself, you have a deadlock.

Setting PF_MEMALLOC on the networking process seems to help a lot.
Obviously it can't help if we are competing against "nothing" instead of
another process.  I.e.  when we are doing i/o exclusively to nbd.  (e.g.
swap over nbd).

> Also, test 2.4.18 and 2.4.19-pre8.  There were significant
> bdflush changes in -pre6.

I'm willing to look, but you don't make it sound intrinsically
likely.

And setting vm/bdflush affects everthing, and presumably unoptimizes
the settings for everthing else on the system. This is core
kernel hackers territory .. somebody must be able to do something
here!

Peter

       reply	other threads:[~2002-05-16 20:28 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3CE40A77.22C74DC1@zip.com.au>
2002-05-16 20:28 ` Peter T. Breuer [this message]
2002-05-16 22:54 Kernel deadlock using nbd over acenic driver Peter T. Breuer
2002-05-17  8:44 ` Steven Whitehouse
2002-05-23 13:21   ` Peter T. Breuer
2002-05-24 10:11     ` Steven Whitehouse
2002-05-24 11:43       ` Peter T. Breuer
2002-05-24 13:28         ` Steven Whitehouse
2002-05-24 15:54           ` Peter T. Breuer
2002-05-27 13:04             ` Steven Whitehouse
2002-05-27 19:51               ` Peter T. Breuer
2002-05-27 13:44         ` Pavel Machek
2002-05-29 10:51           ` Peter T. Breuer
2002-05-29 11:21             ` Pavel Machek
2002-05-29 12:10               ` Peter T. Breuer
2002-05-29 13:24                 ` Jens Axboe
2002-06-01 21:13       ` Peter T. Breuer
2002-06-05  8:48         ` Steven Whitehouse
2002-06-02  6:39           ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2002-05-16 13:18 chen, xiangping
2002-05-15 21:43 Peter T. Breuer
2002-05-16  8:33 ` Steven Whitehouse
2002-05-15 17:43 Peter T. Breuer
2002-05-15 19:43 ` Steven Whitehouse
2002-05-16  5:15   ` Peter T. Breuer
2002-05-16  8:04     ` Steven Whitehouse
2002-05-16  8:49       ` Peter T. Breuer
2002-05-15 16:01 Peter T. Breuer
2002-05-14 17:42 chen, xiangping
2002-05-14 17:36 chen, xiangping
2002-05-14 18:02 ` Alan Cox
2002-05-14 16:07 chen, xiangping
2002-05-14 16:32 ` Steven Whitehouse
2002-05-14 16:48 ` Alan Cox
2002-05-15 22:31 ` Oliver Xymoron
2002-05-16  5:10   ` Peter T. Breuer
2002-05-16  5:19     ` Peter T. Breuer
2002-05-16 14:29       ` Oliver Xymoron
2002-05-16 15:35         ` Peter T. Breuer
2002-05-16 16:22           ` Oliver Xymoron
2002-05-16 16:45             ` Peter T. Breuer
2002-05-16 16:35               ` Steven Whitehouse
2002-05-17  7:01                 ` Peter T. Breuer
2002-05-17  9:26                   ` Steven Whitehouse
2002-05-14 15:05 chen, xiangping
2002-05-14 15:11 ` Jes Sorensen
2002-05-10 15:39 chen, xiangping
2002-05-10 15:02 chen, xiangping
2002-05-10 15:11 ` Steven Whitehouse
2002-05-14 14:58 ` Jes Sorensen
2002-05-06 15:05 chen, xiangping
2002-05-07  8:15 ` Steven Whitehouse
2002-05-06  2:26 chen, xiangping
2002-05-06  8:45 ` Steven Whitehouse

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=200205162028.g4GKSbA23812@oboe.it.uc3m.es \
    --to=ptb@it.uc3m.es \
    --cc=Steve@ChyGwyn.com \
    --cc=akpm@zip.com.au \
    --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;
as well as URLs for NNTP newsgroup(s).