linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	Andrea Arcangeli <andrea@suse.de>, Jens Axboe <axboe@suse.de>,
	Rik van Riel <riel@conectiva.com.br>,
	linux-mm@kvack.org
Subject: Re: [RFC] gfp_mask for address_space
Date: Mon, 4 Dec 2000 13:40:45 +0000	[thread overview]
Message-ID: <20001204134045.B8700@redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0012011548370.25379-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Fri, Dec 01, 2000 at 03:59:44PM -0500

Hi,

On Fri, Dec 01, 2000 at 03:59:44PM -0500, Alexander Viro wrote:
> 	Guys, what about adding into address_space a new field - gfp_mask?
> Changes required:
> 	a) new argument for page_cache_alloc() - address_space we want the
> page to go in. NULL for anonymous pages. (9 lines).
> 	b) when we initialize the ->i_data we should set ->i_data.gfp_mask to
> GFP_HIGHUSER (1 line)
> 	c) when we set the loop device we could memorize the current gfp_mask
> of the ->i_mapping of that file and set it to GFP_BUFFER.
> 	d) restore the old value upon losetup -d

There are other things we could do with something like this --- for
example, localising cache allocations on NUMA.

However, it doesn't actually fix all of the problems.  We still have
balance_dirty() deadlocks even if we avoid memory allocation loops.
NBD to localhost shows this up particularly easily, for example.

For 2.5, I think that the NBD problem can only really be laid to rest
by making bdflush fully async, so that things like the nbd server can
still run a balance_dirty() without deadlocking.  

The problem right now is that the balance_dirty() inside the nbd
server can result in it attempting to flush out dirty nbd buffers, so
we have the nbd device blocked on the nbd server, the nbd server
dirtying local disk buffer_heads, and the dirty buffer code blocking
on other dirty nbd buffers.)

The more we can make the VM flush and dirty-balancing code
asynchronous, the more we can both remove these deadlocks, AND cater
cleanly with multiple devices whose IO rates are vastly different.
(Things get really ugly if you start filling memory with dirty buffers
for slow devices like MO or floppies right now.)

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

       reply	other threads:[~2000-12-04 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20001119114052.B9031@suse.de>
     [not found] ` <Pine.GSO.4.21.0012011548370.25379-100000@weyl.math.psu.edu>
2000-12-04 13:40   ` Stephen C. Tweedie [this message]
2000-12-04 13:56     ` Alexander Viro

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=20001204134045.B8700@redhat.com \
    --to=sct@redhat.com \
    --cc=andrea@suse.de \
    --cc=axboe@suse.de \
    --cc=linux-mm@kvack.org \
    --cc=riel@conectiva.com.br \
    --cc=viro@math.psu.edu \
    /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