Re: mmap dirty limits on 32 bit kernels (Was: [BUG] New Kernel Bugs)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Thursday, November 15, 2007 - 2:14 pm

On Thu, 15 Nov 2007, Linus Torvalds wrote:

Examples of non-broken solutions:
 (a) always use lowmem sizes (what we do now)
 (b) always use total mem sizes (sane but potentially dangerous: but the 
     VM pressure should work! It has serious bounce-buffer issues, though, 
     which is why I think it's crazy even if it's otherwise consistent)
 (c) make all dirty counting be *purely* per-bdi, so that everybody can 
     disagree on what the limits are, but at least they also then use 
     different counters

So it's just the "different writers look at the same dirty counts but then 
interpret it to mean totally different things" that I think is so 
fundamentally bogus. I'm not claiming that what we do now is the only way 
to do things, I just don't think your approach is tenable.

Btw, I actually suspect that while (a) is what we do now, for the specific 
case that Bron has, we could have a /proc/sys/vm option to just enable 
(b). So we don't have to have just one consistent model, we can allow odd 
users (and Bron sounds like one - sorry Bron ;) to just force other, odd, 
but consistent models.

I'd also like to point out that while the "bounce buffer" issue is not so 
much a HIGHMEM issue on its own (it's really about the device DMA limits, 
which are _independent_ of HIGHMEM, of course), the reason HIGHMEM is 
special is that without HIGHMEM the bounce buffers generally work 
perfectly fine.

The problem with HIGHMEM is that it causes various metadata (dentries, 
inodes, page struct tables etc) to eat up memory "prime real estate" under 
the same kind of conditions that also dirty a lot of memory. So the reason 
we disallow HIGHMEM from dirty limits is only *partly* the per-device or 
mapping DMA limits, and to a large degree the fact that non-highmem memory 
is special in general, and it is usually the non-highmem areas that are 
constrained - and need to be protected.

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] New Kernel Bugs, Natalie Protasevich, (Mon Nov 12, 11:42 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 4:15 am)
Re: [BUG] New Kernel Bugs, Jens Axboe, (Tue Nov 13, 4:24 am)
Re: [BUG] New Kernel Bugs, Evgeniy Polyakov, (Tue Nov 13, 4:33 am)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 4:39 am)
Re: [BUG] New Kernel Bugs, Jarek Poplawski, (Tue Nov 13, 4:47 am)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 4:49 am)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 4:58 am)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 5:12 am)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 5:32 am)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Tue Nov 13, 6:40 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 6:58 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 7:08 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 7:18 am)
Re: [BUG] New Kernel Bugs, Bartlomiej Zolnierki ..., (Tue Nov 13, 8:21 am)
Re: [BUG] New Kernel Bugs, Giacomo A. Catenazzi, (Tue Nov 13, 8:24 am)
Re: [BUG] New Kernel Bugs, James Bottomley, (Tue Nov 13, 8:33 am)
Re: [BUG] New Kernel Bugs, Alan Cox, (Tue Nov 13, 8:36 am)
Re: [BUG] New Kernel Bugs, Benoit Boissinot, (Tue Nov 13, 8:52 am)
Re: [BUG] New Kernel Bugs, Ray Lee, (Tue Nov 13, 8:57 am)
Re: [BUG] New Kernel Bugs, Thomas Gleixner, (Tue Nov 13, 9:07 am)
Re: [BUG] New Kernel Bugs, Thomas Gleixner, (Tue Nov 13, 9:08 am)
Re: [BUG] New Kernel Bugs, Randy Dunlap, (Tue Nov 13, 9:43 am)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Tue Nov 13, 9:46 am)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Tue Nov 13, 9:49 am)
Re: [BUG] New Kernel Bugs, Randy Dunlap, (Tue Nov 13, 9:55 am)
Re: [BUG] New Kernel Bugs, Nick Piggin, (Tue Nov 13, 9:56 am)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 10:01 am)
Re: [BUG] New Kernel Bugs, Theodore Tso, (Tue Nov 13, 10:13 am)
Re: [BUG] New Kernel Bugs, Alan Cox, (Tue Nov 13, 10:30 am)
Re: [BUG] New Kernel Bugs, Larry Finger, (Tue Nov 13, 10:33 am)
Re: [BUG] New Kernel Bugs, Martin Bligh, (Tue Nov 13, 10:46 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 10:47 am)
Re: [BUG] New Kernel Bugs, Jan Kara, (Tue Nov 13, 10:49 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 10:50 am)
Re: [BUG] New Kernel Bugs, Romano Giannetti, (Tue Nov 13, 10:50 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 10:54 am)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 10:56 am)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 11:04 am)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 11:10 am)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 11:12 am)
Re: [BUG] New Kernel Bugs, Peter Zijlstra, (Tue Nov 13, 11:17 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 11:18 am)
Re: [BUG] New Kernel Bugs, Alan Cox, (Tue Nov 13, 11:25 am)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 11:36 am)
Re: [BUG] New Kernel Bugs, Matthew Wilcox, (Tue Nov 13, 11:39 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 11:43 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 11:47 am)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 11:47 am)
Re: [BUG] New Kernel Bugs, Matthew Wilcox, (Tue Nov 13, 11:49 am)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 11:54 am)
Re: [BUG] New Kernel Bugs, Theodore Tso, (Tue Nov 13, 11:55 am)
Re: [BUG] New Kernel Bugs, Gabriel C, (Tue Nov 13, 11:57 am)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 12:02 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 12:04 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 12:12 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 12:26 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 12:30 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 12:32 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 12:37 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 12:46 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 1:00 pm)
Re: [BUG] New Kernel Bugs, Christian Kujau, (Tue Nov 13, 1:00 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 1:04 pm)
Re: [BUG] New Kernel Bugs, Larry Finger, (Tue Nov 13, 1:07 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 1:13 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 1:13 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 1:18 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 1:52 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 2:04 pm)
Re: [BUG] New Kernel Bugs, Alan Cox, (Tue Nov 13, 2:12 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 2:20 pm)
Re: [BUG] New Kernel Bugs, Jörn, (Tue Nov 13, 2:33 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Tue Nov 13, 2:37 pm)
Re: [BUG] New Kernel Bugs, Christian Kujau, (Tue Nov 13, 2:56 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 2:56 pm)
Re: [BUG] New Kernel Bugs, Frans Pop, (Tue Nov 13, 3:03 pm)
Re: [BUG] New Kernel Bugs, Rafael J. Wysocki, (Tue Nov 13, 3:09 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 3:18 pm)
Re: [BUG] New Kernel Bugs, Jörn, (Tue Nov 13, 3:24 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 3:29 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 3:32 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 3:34 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 3:43 pm)
Re: [BUG] New Kernel Bugs, Thomas Gleixner, (Tue Nov 13, 3:46 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 4:09 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 4:17 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 4:29 pm)
Re: [BUG] New Kernel Bugs, Mark Lord, (Tue Nov 13, 4:37 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 4:38 pm)
Re: [BUG] New Kernel Bugs, Russell King, (Tue Nov 13, 4:40 pm)
Re: [BUG] New Kernel Bugs, Denys Vlasenko, (Tue Nov 13, 5:34 pm)
Re: [BUG] New Kernel Bugs, Denys Vlasenko, (Tue Nov 13, 5:39 pm)
Re: [BUG] New Kernel Bugs, Denys Vlasenko, (Tue Nov 13, 5:41 pm)
Re: [BUG] New Kernel Bugs, Chuck Ebbert, (Tue Nov 13, 5:52 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 6:10 pm)
Re: [BUG] New Kernel Bugs, Stephen Hemminger, (Tue Nov 13, 6:11 pm)
Re: [BUG] New Kernel Bugs, Peter Stuge, (Tue Nov 13, 6:18 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 6:55 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 6:56 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 7:10 pm)
Re: [BUG] New Kernel Bugs, Andrew Morton, (Tue Nov 13, 7:27 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 8:47 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 10:07 pm)
Re: [BUG] New Kernel Bugs, Sam Ravnborg, (Tue Nov 13, 10:56 pm)
Re: [BUG] New Kernel Bugs, Sam Ravnborg, (Tue Nov 13, 10:59 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Tue Nov 13, 11:13 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Wed Nov 14, 12:27 am)
Re: [BUG] New Kernel Bugs, Denys Vlasenko, (Wed Nov 14, 12:46 am)
Moderated list (Was: Re: [BUG] New Kernel Bugs), Takashi Iwai, (Wed Nov 14, 1:25 am)
Re: [BUG] New Kernel Bugs, Russell King, (Wed Nov 14, 1:30 am)
Re: Moderated list (Was: Re: [BUG] New Kernel Bugs), Takashi Iwai, (Wed Nov 14, 2:47 am)
Re: [BUG] New Kernel Bugs, Russell King, (Wed Nov 14, 2:55 am)
Re: [BUG] New Kernel Bugs, David Miller, (Wed Nov 14, 3:07 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Wed Nov 14, 4:46 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, David Miller, (Wed Nov 14, 4:56 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, David Miller, (Wed Nov 14, 5:01 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Wed Nov 14, 5:09 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Wed Nov 14, 5:12 am)
Re: Moderated list (Was: Re: [BUG] New Kernel Bugs), Rene Herman, (Wed Nov 14, 5:21 am)
Re: [BUG] New Kernel Bugs, Jiri Kosina, (Wed Nov 14, 5:46 am)
Re: [BUG] New Kernel Bugs, Pavel Machek, (Wed Nov 14, 6:24 am)
Re: [BUG] New Kernel Bugs, Matthew Wilcox, (Wed Nov 14, 6:30 am)
Re: [BUG] New Kernel Bugs, Hannes Reinecke, (Wed Nov 14, 6:35 am)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 7:08 am)
Re: [BUG] New Kernel Bugs, Fabio Comolli, (Wed Nov 14, 7:14 am)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 7:30 am)
Re: [BUG] New Kernel Bugs, Larry Finger, (Wed Nov 14, 7:49 am)
Re: [BUG] New Kernel Bugs, Jan Evert van Grootheest, (Wed Nov 14, 9:55 am)
Re: [BUG] New Kernel Bugs, Randy Dunlap, (Wed Nov 14, 10:38 am)
Re: [BUG] New Kernel Bugs, J. Bruce Fields, (Wed Nov 14, 11:23 am)
Re: [BUG] New Kernel Bugs, Kok, Auke, (Wed Nov 14, 11:27 am)
Re: [BUG] New Kernel Bugs, Russell King, (Wed Nov 14, 12:52 pm)
Re: [BUG] New Kernel Bugs, Linus Torvalds, (Wed Nov 14, 12:54 pm)
Re: [BUG] New Kernel Bugs, David Miller, (Wed Nov 14, 12:56 pm)
Re: [BUG] New Kernel Bugs, James Bottomley, (Wed Nov 14, 1:09 pm)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 1:16 pm)
Re: [BUG] New Kernel Bugs, Randy Dunlap, (Wed Nov 14, 1:29 pm)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 1:37 pm)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 1:48 pm)
Re: [BUG] New Kernel Bugs, Ingo Molnar, (Wed Nov 14, 1:54 pm)
Re: [BUG] New Kernel Bugs, david, (Wed Nov 14, 2:05 pm)
Re: [BUG] New Kernel Bugs, Denys Vlasenko, (Wed Nov 14, 2:39 pm)
Re: [BUG] New Kernel Bugs, Gabriel C, (Wed Nov 14, 2:58 pm)
Re: [BUG] New Kernel Bugs, Heikki Orsila, (Wed Nov 14, 3:22 pm)
Re: Moderated list, David Miller, (Wed Nov 14, 4:23 pm)
Re: [BUG] New Kernel Bugs, Daniel Barkalow, (Wed Nov 14, 4:23 pm)
Re: [BUG] New Kernel Bugs, Bron Gondwana, (Wed Nov 14, 9:07 pm)
Re: [alsa-devel] [BUG] New Kernel Bugs, Bron Gondwana, (Wed Nov 14, 9:16 pm)
Re: [BUG] New Kernel Bugs, Linus Torvalds, (Wed Nov 14, 9:24 pm)
Re: [BUG] New Kernel Bugs, Bron Gondwana, (Wed Nov 14, 10:25 pm)
Re: [BUG] New Kernel Bugs, Linus Torvalds, (Wed Nov 14, 10:35 pm)
Re: [BUG] New Kernel Bugs, Linus Torvalds, (Wed Nov 14, 10:53 pm)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Wed Nov 14, 10:59 pm)
Re: [alsa-devel] [BUG] New Kernel Bugs, Takashi Iwai, (Thu Nov 15, 2:34 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Bron Gondwana, (Thu Nov 15, 5:02 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Thu Nov 15, 5:26 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Jörn, (Thu Nov 15, 6:00 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Olivier Galibert, (Thu Nov 15, 6:17 am)
Re: [alsa-devel] [BUG] New Kernel Bugs, Rene Herman, (Thu Nov 15, 7:29 am)
Re: [BUG] New Kernel Bugs, Daniel Barkalow, (Thu Nov 15, 9:19 am)
Re: [BUG] Strange 1-second pauses during Resume-from-RAM, Pavel Machek, (Thu Nov 15, 11:14 am)
Re: [BUG] New Kernel Bugs, Ben Dooks, (Thu Nov 15, 1:16 pm)
Re: [BUG] Strange 1-second pauses during Resume-from-RAM, Rafael J. Wysocki, (Thu Nov 15, 1:27 pm)
Re: mmap dirty limits on 32 bit kernels (Was: [BUG] New Ke ..., Linus Torvalds, (Thu Nov 15, 2:14 pm)
Re: [BUG] New Kernel Bugs, Romano Giannetti, (Fri Nov 16, 1:20 am)
Re: [BUG] Strange 1-second pauses during Resume-from-RAM, Mike Galbraith, (Fri Nov 16, 4:53 am)
[patch] snd hda suspend latency: shorten codec read, Ingo Molnar, (Fri Nov 16, 5:58 am)
Re: [patch] snd hda suspend latency: shorten codec read, Rafael J. Wysocki, (Fri Nov 16, 6:31 am)
Re: [patch] snd hda suspend latency: shorten codec read, Takashi Iwai, (Fri Nov 16, 7:21 am)
Re: [BUG] New Kernel Bugs, Daniel Barkalow, (Fri Nov 16, 11:20 am)
Re: [BUG] New Kernel Bugs, Theodore Tso, (Fri Nov 16, 12:46 pm)
Use *poof* for linux-omap (Was: [BUG] New Kernel Bugs), Tony Lindgren, (Fri Nov 16, 3:16 pm)
Re: Use *poof* for linux-omap, David Miller, (Fri Nov 16, 5:45 pm)
Re: [BUG] New Kernel Bugs, Adrian Bunk, (Sat Nov 17, 5:20 am)
Re: size of git repository (was Re: [BUG] New Kernel Bugs), James Bottomley, (Sun Nov 18, 7:35 am)
Re: Use *poof* for linux-omap, Tony Lindgren, (Sun Nov 18, 1:01 pm)
[PATCH 1/1] mm: add dirty_highmem option, Bron Gondwana, (Wed Nov 21, 8:42 pm)
Re: [PATCH 1/1] mm: add dirty_highmem option, Linus Torvalds, (Mon Nov 26, 10:53 am)
Re: [PATCH 1/1] mm: add dirty_highmem option, Bron Gondwana, (Mon Nov 26, 6:30 pm)
Re: [PATCH 1/1] mm: add dirty_highmem option, Andrew Morton, (Mon Nov 26, 9:54 pm)
Re: [PATCH 1/1] mm: add dirty_highmem option, Bron Gondwana, (Mon Nov 26, 10:24 pm)
Re: [PATCH 1/1] mm: add dirty_highmem option, Andrew Morton, (Mon Nov 26, 10:53 pm)