From: Andrea Arcangeli <andrea@suse.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Ben LaHaise <bcrl@redhat.com>,
Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: Linux-2.4.5
Date: Sat, 26 May 2001 17:20:02 +0200 [thread overview]
Message-ID: <20010526172002.Z9634@athlon.random> (raw)
In-Reply-To: <20010526170306.X9634@athlon.random> <Pine.LNX.4.21.0105261206260.30264-100000@imladris.rielhome.conectiva>
In-Reply-To: <Pine.LNX.4.21.0105261206260.30264-100000@imladris.rielhome.conectiva>; from riel@conectiva.com.br on Sat, May 26, 2001 at 12:08:34PM -0300
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
On Sat, May 26, 2001 at 12:08:34PM -0300, Rik van Riel wrote:
> On Sat, 26 May 2001, Andrea Arcangeli wrote:
>
> > Others agreed that the real source of the create_buffers could be just
> > too few reserved pages in the unused_list
>
> To quote you, from the message to which I replied with the
> "No Comment" comment:
>
> ------> Andrea Arcangeli wrote:
> Anything supposed to work because there's enough memory between
> zone->pages_min*3/4 and zone->pages_min/4 is just obviously broken
> period.
> ------
What are you smoking again? You said "No Comment(tm) *grin*" to my
suggestion to increase NR_RESERVED (attached).
Andrea
[-- Attachment #2: Type: message/rfc822, Size: 3674 bytes --]
From: Rik van Riel <riel@conectiva.com.br>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Ben LaHaise <bcrl@redhat.com>, Linus Torvalds <torvalds@transmeta.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: Linux-2.4.5
Date: Sat, 26 May 2001 01:45:27 -0300 (BRST)
Message-ID: <Pine.LNX.4.21.0105260137140.30264-100000@imladris.rielhome.conectiva>
On Sat, 26 May 2001, Andrea Arcangeli wrote:
> On Fri, May 25, 2001 at 10:49:38PM -0400, Ben LaHaise wrote:
> > Highmem. 0 free pages in ZONE_NORMAL. Now try to allocate a buffer_head.
>
> That's a longstanding deadlock, it was there the first time I read
> fs/buffer.c, nothing related to highmem, we have it in 2.2 too. Also
> getblk is deadlock prone in a smiliar manner.
Not only this, but the fix is _surprisingly_ simple...
All we need to make sure of is that the following order
of allocations is possible and that we back out instead
of deadlock when we don't succeed at any step.
1) normal user allocation
2) buffer allocation (bounce buffer + bufferhead)
3) allocation from interrupt (for device driver)
This is fixed by the patch I sent because:
1) user allocations stop when we reach zone->pages_min and
keep looping until we freed some memory ... well, these
don't just loop because we can guarantee that freeing
memory with GFP_USER or GFP_KERNEL is possible
2) GFP_BUFFER allocations can allocate down to the point
where free pages go to zone->pages_min * 3 / 4, so we
can continue to swapout highmem pages when userland
allocations have stopped ... this is needed because
otherwise we cannot always make progress on highmem
pages and we could have the effective amount of RAM
in the system reduced to less than 1GB, in really bad
cases not having this could even cause a deadlock
3) If the device driver needs to allocate something, it
has from zone->pages_min*3/4 down to zone->pages_min/4
space to allocate stuff, this should be very useful
for swap or mmap() over the network, or to encrypted
block devices, etc...
> Can you try to simply change NR_RESERVED to say 200*MAX_BUF_PER_PAGE
> and see if it makes a difference?
No Comment(tm) *grin*
cheers,
Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...
http://www.surriel.com/ http://distro.conectiva.com/
Send all your spam to aardvark@nl.linux.org (spam digging piggy)
next prev parent reply other threads:[~2001-05-26 15:27 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-25 20:00 [with-PATCH-really] highmem deadlock removal, balancing & cleanup Rik van Riel
2001-05-25 21:12 ` Linus Torvalds
2001-05-25 22:20 ` Rik van Riel
2001-05-25 23:05 ` Linus Torvalds
2001-05-25 23:13 ` Alan Cox
2001-05-25 23:19 ` Rik van Riel
2001-05-26 0:02 ` Linus Torvalds
2001-05-26 0:07 ` Rik van Riel
2001-05-26 0:16 ` Linus Torvalds
2001-05-26 0:23 ` Linus Torvalds
2001-05-26 0:26 ` Rik van Riel
2001-05-26 0:30 ` Linus Torvalds
2001-05-26 0:29 ` Ben LaHaise
2001-05-26 0:34 ` Linus Torvalds
2001-05-26 0:38 ` Rik van Riel
2001-05-26 1:28 ` Linux-2.4.5 Linus Torvalds
2001-05-26 1:35 ` Linux-2.4.5 Rik van Riel
2001-05-26 1:39 ` Linux-2.4.5 Ben LaHaise
2001-05-26 1:59 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 2:11 ` Linux-2.4.5 Ben LaHaise
2001-05-26 2:38 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 2:49 ` Linux-2.4.5 Ben LaHaise
2001-05-26 3:11 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 4:22 ` Linux-2.4.5 Linus Torvalds
2001-05-26 4:31 ` Linux-2.4.5 Rik van Riel
2001-05-26 8:10 ` Linux-2.4.5 Linus Torvalds
2001-05-26 9:01 ` Linux-2.4.5 Linus Torvalds
2001-05-26 9:18 ` Linux-2.4.5 arjan
2001-05-26 14:18 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 14:21 ` Linux-2.4.5 Rik van Riel
2001-05-26 14:38 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 14:40 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:17 ` Linux-2.4.5 Linus Torvalds
2001-05-26 15:28 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:59 ` Linux-2.4.5 Linus Torvalds
2001-05-26 22:12 ` Linux-2.4.5 Marcelo Tosatti
2001-05-27 6:53 ` Linux-2.4.5 Marcelo Tosatti
2001-06-03 23:32 ` Linux-2.4.5 Linus Torvalds
2001-06-05 2:21 ` Linux-2.4.5 Marcelo Tosatti
2001-05-26 15:09 ` Linux-2.4.5 Linus Torvalds
2001-05-26 15:18 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:24 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 15:26 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:40 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 4:45 ` Linux-2.4.5 Rik van Riel
2001-05-26 4:47 ` Linux-2.4.5 Rik van Riel
2001-05-26 6:07 ` Linux-2.4.5 Ben LaHaise
2001-05-26 14:32 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 14:36 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:03 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 15:08 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:20 ` Andrea Arcangeli [this message]
2001-05-26 15:41 ` Linux-2.4.5 Rik van Riel
2001-05-26 0:42 ` [with-PATCH-really] highmem deadlock removal, balancing & cleanup Andrea Arcangeli
2001-05-26 0:52 ` Ben LaHaise
2001-05-26 1:27 ` Andrea Arcangeli
2001-05-26 1:38 ` Ben LaHaise
2001-05-26 1:49 ` Andrea Arcangeli
2001-05-26 2:01 ` Ben LaHaise
2001-05-26 2:26 ` Andrea Arcangeli
2001-05-26 2:40 ` Ben LaHaise
2001-05-26 1:43 ` Rik van Riel
2001-05-25 22:35 ` Rik van Riel
2001-05-25 23:07 ` Linus Torvalds
[not found] <20010526171459.Y9634@athlon.random>
2001-05-26 15:22 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:30 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 15:51 ` Linux-2.4.5 Rik van Riel
2001-05-26 16:04 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 15:23 ` Linux-2.4.5 Linus Torvalds
2001-05-26 15:31 ` Linux-2.4.5 Rik van Riel
2001-05-26 15:38 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 16:03 ` Linux-2.4.5 Linus Torvalds
2001-05-26 18:11 ` Linux-2.4.5 Ben LaHaise
2001-05-26 18:31 ` Linux-2.4.5 Andrea Arcangeli
2001-05-26 19:42 ` Linux-2.4.5 Ingo Molnar
2001-05-26 19:56 ` Linux-2.4.5 Andrea Arcangeli
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=20010526172002.Z9634@athlon.random \
--to=andrea@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=torvalds@transmeta.com \
/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