All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Ben LaHaise <bcrl@redhat.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Rik van Riel <riel@conectiva.com.br>,
	linux-kernel@vger.kernel.org
Subject: Re: Linux-2.4.5
Date: Sat, 26 May 2001 04:38:35 +0200	[thread overview]
Message-ID: <20010526043835.R9634@athlon.random> (raw)
In-Reply-To: <20010526035936.P9634@athlon.random> <Pine.LNX.4.33.0105252206550.3806-100000@toomuch.toronto.redhat.com>
In-Reply-To: <Pine.LNX.4.33.0105252206550.3806-100000@toomuch.toronto.redhat.com>; from bcrl@redhat.com on Fri, May 25, 2001 at 10:11:40PM -0400

On Fri, May 25, 2001 at 10:11:40PM -0400, Ben LaHaise wrote:
> On Sat, 26 May 2001, Andrea Arcangeli wrote:
> 
> > Now if you send some debugging info with deadlocks you gets with 2.4.5
> > vanilla I will be certainly interested to found their source. Also Rik
> > just said to have a fix for other bugs in that area, I didn't checked
> > that part.
> 
> In the red hat tree, we fixed the problem by adding __GFP_FAIL to
> GFP_BUFFER, as well as adding a yield to alloc_pages.  Think of what
> happens when you try to allocate a buffer_head to swap out a page when
> you're out of memory.  See below.

Allocating a buffer head during out of memory is always been deadlock
prone, 2.2 always had the same problem too. I'm not sure why you are
telling me this, I didn't changed anything that happens to be in the
swapout path (besides removing the deadlock in create_bounces with
evolution of first Ingo's patch but that is not specific to the
swapout). I only changed the getblk path (which is not used by the
swapout, at least unless you swapout on a file not on a blkdev, but even
in that case the change is fine).

About yelding interally to alloc_pages it would make sense if we
had a private pool internally to the allocator, otherwise with current
code you definitely want to return a faliure fast to the caller so the
caller will try the private pool before the yield.

btw in the below patch __GFP_FAIL is a noop.

> 
> 		-ben
> 
> diff -ur v2.4.4-ac9/include/linux/mm.h work/include/linux/mm.h
> --- v2.4.4-ac9/include/linux/mm.h	Mon May 14 15:22:17 2001
> +++ work/include/linux/mm.h	Mon May 14 18:33:21 2001
> @@ -528,7 +528,7 @@
> 
> 
>  #define GFP_BOUNCE	(__GFP_HIGH | __GFP_FAIL)
> -#define GFP_BUFFER	(__GFP_HIGH | __GFP_WAIT)
> +#define GFP_BUFFER	(__GFP_HIGH | __GFP_FAIL | __GFP_WAIT)
>  #define GFP_ATOMIC	(__GFP_HIGH)
>  #define GFP_USER	(             __GFP_WAIT | __GFP_IO)
>  #define GFP_HIGHUSER	(             __GFP_WAIT | __GFP_IO | __GFP_HIGHMEM)
> diff -ur v2.4.4-ac9/mm/vmscan.c work/mm/vmscan.c
> --- v2.4.4-ac9/mm/vmscan.c	Mon May 14 14:57:00 2001
> +++ work/mm/vmscan.c	Mon May 14 16:43:05 2001
> @@ -636,6 +636,12 @@
>  	 */
>  	shortage = free_shortage();
>  	if (can_get_io_locks && !launder_loop && shortage) {
> +		if (gfp_mask & __GFP_WAIT) {
> +			__set_current_state(TASK_RUNNING);
> +			current->policy |= SCHED_YIELD;
> +			schedule();
> +		}
> +
>  		launder_loop = 1;
> 
>  		/*
> 


Andrea

  reply	other threads:[~2001-05-26  2:39 UTC|newest]

Thread overview: 77+ 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 20:00 ` 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                     ` Andrea Arcangeli [this message]
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                                     ` Linux-2.4.5 Andrea Arcangeli
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=20010526043835.R9634@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.