* Re: [RFC] gfp_mask for address_space
[not found] ` <Pine.GSO.4.21.0012011548370.25379-100000@weyl.math.psu.edu>
@ 2000-12-04 13:40 ` Stephen C. Tweedie
2000-12-04 13:56 ` Alexander Viro
0 siblings, 1 reply; 2+ messages in thread
From: Stephen C. Tweedie @ 2000-12-04 13:40 UTC (permalink / raw)
To: Alexander Viro
Cc: Stephen C. Tweedie, Andrea Arcangeli, Jens Axboe, Rik van Riel, linux-mm
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] gfp_mask for address_space
2000-12-04 13:40 ` [RFC] gfp_mask for address_space Stephen C. Tweedie
@ 2000-12-04 13:56 ` Alexander Viro
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Viro @ 2000-12-04 13:56 UTC (permalink / raw)
To: Stephen C. Tweedie; +Cc: Andrea Arcangeli, Jens Axboe, Rik van Riel, linux-mm
On Mon, 4 Dec 2000, Stephen C. Tweedie wrote:
> However, it doesn't actually fix all of the problems. We still have
> balance_dirty() deadlocks even if we avoid memory allocation loops.
I know. However, these are somewhat easier to kill. E.g. we could give
weights to devices (normal => 0, loopback over file on device of level
n => n+1) and split bdflush into per-weight threads. Then we have an
obvious hierarchy (activity of bdflush[n] can't lead to new dirty bh
of weight n and above).
> 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.)
Ditto for loop and the same method can be applied...
I'm actually more interested in experimenting with bitmaps in page
cache - making it GFP_BUFFER should be deadlock-safe, AFAICS, and
ext2/balloc.c would benefit big way from switching to that...
Cheers,
Al
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-04 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20001119114052.B9031@suse.de>
[not found] ` <Pine.GSO.4.21.0012011548370.25379-100000@weyl.math.psu.edu>
2000-12-04 13:40 ` [RFC] gfp_mask for address_space Stephen C. Tweedie
2000-12-04 13:56 ` Alexander Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox