public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Momchil Velikov <velco@fadata.bg>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Copying to loop device hangs up everything
Date: Wed, 19 Dec 2001 23:41:47 -0800	[thread overview]
Message-ID: <3C21963B.AD97D4@zip.com.au> (raw)
In-Reply-To: <87bsgwi6zz.fsf@fadata.bg> <Pine.LNX.4.21.0112181757460.4821-100000@freak.distro.conectiva> <3C1FC254.525B9108@zip.com.au> <3C1FCB96.83E49ECB@zip.com.au> <3C204C4F.C989AD71@zip.com.au>, <3C204C4F.C989AD71@zip.com.au>; from akpm@zip.com.au on Wed, Dec 19, 2001 at 12:14:07AM -0800 <20011219144213.A1395@athlon.random>

Andrea Arcangeli wrote:
> 
> ...
> > The thing I don't like about the Andrea+Momchil approach is that it
> > exposes the risk of flooding the machine with dirty data.  A scheme
> 
> it doesn't, balance_dirty() has to work only  at the highlevel.
> sync_page_buffers also is no problem, we'll try again later in those
> GFP_NOIO allocations.

Not so.  The loop thread *copies* the data.  We must throttle it,
otherwise the loop thread gobbles all memory and the box dies.  This
is trivial to demonstrate.

> furthmore you don't even address the writepage from loop thread on the
> loop queue.

How can this deadlock?  The only path to those buffers is
via the page, and the page is locked.
 
> The final fix should be in rc2aa1 that I will release in a jiffy. It
> takes care now of both the VM and balance_dirty().
>
> this is the incremental fix against rc1aa1:
> 

No.  Your patch removes *all* loop thread throttling, it doesn't even start
IO (thus removing the throttling which request starving would provide)
and doesn't even wake up bdflush.

If you set nfract to 70%, nfract_sync to 80% and do a big write, the
machine falls into a VM coma within 15 seconds.  The same happens
with both my patches :-(

And it's not legitimate to say "don't do that".  If we can't survive
those settings, we don't have a solution. We need to throttle writes
*more*, not less.

I'll keep poking at it.   If you have any more suggestions/patches,
please toss them over...

-

  reply	other threads:[~2001-12-20  7:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-16  3:40 Copying to loop device hangs up everything David Gomez
2001-12-16  4:00 ` Dave Jones
2001-12-16 11:41   ` David Gomez
2001-12-16 16:53     ` Momchil Velikov
2001-12-16 19:42       ` David Gomez
2001-12-16 19:50         ` Momchil Velikov
2001-12-16 21:52           ` Momchil Velikov
2001-12-18 19:46             ` Marcelo Tosatti
2001-12-18 20:54               ` Momchil Velikov
2001-12-18 19:57                 ` Marcelo Tosatti
2001-12-18 21:26                   ` Momchil Velikov
     [not found]                   ` <3C1FC254.525B9108@zip.com.au>
     [not found]                     ` <3C1FCB96.83E49ECB@zip.com.au>
     [not found]                       ` <3C204C4F.C989AD71@zip.com.au>
2001-12-19 13:42                         ` Andrea Arcangeli
2001-12-20  7:41                           ` Andrew Morton [this message]
2001-12-20 11:27                             ` Andrea Arcangeli
2001-12-20 11:34                               ` Andrea Arcangeli
2001-12-17  3:30       ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2001-12-20 21:05 Momchil Velikov

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=3C21963B.AD97D4@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=velco@fadata.bg \
    /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