linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	karl.vogel@pandora.be, linux-mm@kvack.org
Subject: Re: Kernel 2.6.8.1: swap storm of death - nr_requests > 1024 on swap partition
Date: Sun, 29 Aug 2004 16:15:27 +0200	[thread overview]
Message-ID: <20040829141526.GC10955@suse.de> (raw)
In-Reply-To: <20040829033031.01c5f78c.akpm@osdl.org>

On Sun, Aug 29 2004, Andrew Morton wrote:
> William Lee Irwin III <wli@holomorphy.com> wrote:
> >
> >  On Sat, Aug 28, 2004 at 03:13:49PM -0700, Andrew Morton wrote:
> >  > Separate issue.
> > 
> >  It certainly appears to be the deciding factor from the thread.
> > 
> 
> It's all very bizarre.
> 
> If you do a big `usemem -m 250' on a 256MB box, you end up with all memory
> in swapcache _after_ usemem exits.  That's wrong: all the memory which
> usemem allocated should now be free.
> 
> But all that swapcache is reclaimable under memory pressure.  It seems to
> be floating about on the LRU still.
> 
> It only happens with the CFQ elevator, and this backout patch makes it go
> away.

It's not bizarre, if you backout that fix (it is a fix!), ->nr_requests
isn't initialized when cfq gets there. So it'll throttle incorrectly in
may_queue, not a good idea.

> The main effect of this patch is to increase the elevator's nr_requests
> from 128 to 8192.  Something to do with that, I guess.

How do you reach that conclusion?

I think the correct fix, for now, is to remove the 8192 in CFQ. It's not
the right thing to do anyways, it should just be set from user space.
But the patch below should definitely not be backed out.

> --- 25/drivers/block/ll_rw_blk.c~a	2004-08-29 03:21:41.678895384 -0700
> +++ 25-akpm/drivers/block/ll_rw_blk.c	2004-08-29 03:21:50.230595328 -0700
> @@ -1534,6 +1534,9 @@ request_queue_t *blk_init_queue(request_
>  		printk("Using %s io scheduler\n", chosen_elevator->elevator_name);
>  	}
>  
> +	if (elevator_init(q, chosen_elevator))
> +		goto out_elv;
> +
>  	q->request_fn		= rfn;
>  	q->back_merge_fn       	= ll_back_merge_fn;
>  	q->front_merge_fn      	= ll_front_merge_fn;
> @@ -1551,12 +1554,8 @@ request_queue_t *blk_init_queue(request_
>  	blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
>  	blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
>  
> -	/*
> -	 * all done
> -	 */
> -	if (!elevator_init(q, chosen_elevator))
> -		return q;
> -
> +	return q;
> +out_elv:
>  	blk_cleanup_queue(q);
>  out_init:
>  	kmem_cache_free(requestq_cachep, q);

-- 
Jens Axboe

--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-08-29 14:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040824124356.GW2355@suse.de>
     [not found] ` <412CDE7E.9060307@seagha.com>
     [not found]   ` <20040826144155.GH2912@suse.de>
     [not found]     ` <412E13DB.6040102@seagha.com>
     [not found]       ` <412E31EE.3090102@pandora.be>
     [not found]         ` <41308C62.7030904@seagha.com>
     [not found]           ` <20040828125028.2fa2a12b.akpm@osdl.org>
     [not found]             ` <4130F55A.90705@pandora.be>
2004-08-28 21:43               ` Andrew Morton
2004-08-28 21:54                 ` William Lee Irwin III
2004-08-28 22:13                   ` Andrew Morton
2004-08-28 22:28                     ` William Lee Irwin III
2004-08-29 10:30                       ` Andrew Morton
2004-08-29 14:15                         ` Jens Axboe [this message]
2004-08-29 14:17                           ` Jens Axboe
2004-08-29 14:45                             ` Rik van Riel
2004-08-29 20:18                             ` Andrew Morton
2004-08-29 20:30                               ` Jens Axboe
2004-08-29 20:59                                 ` Andrew Morton
2004-08-29 22:17                                   ` William Lee Irwin III
2004-08-29 22:28                                     ` Andrew Morton
2004-08-30  7:41                                       ` Hugh Dickins
2004-08-30 15:20                                   ` Marcelo Tosatti
2004-08-30 18:01                                     ` Karl Vogel
2004-08-30 17:16                                       ` Marcelo Tosatti
2004-08-30 22:59                                         ` Karl Vogel
2004-08-30 20:33                                       ` Marcelo Tosatti
2004-08-30 22:37                                         ` Andrew Morton
2004-08-30 22:17                                           ` Marcelo Tosatti
2004-08-30 23:51                                             ` Andrew Morton
2004-08-31 10:23                                               ` Marcelo Tosatti
2004-08-31 16:02                                                 ` Marcelo Tosatti
2004-08-31 17:50                                                 ` Karl Vogel
2004-08-31 16:52                                                   ` Marcelo Tosatti
2004-08-31 18:24                                                     ` Karl Vogel
2004-08-31 17:25                                                       ` Marcelo Tosatti
2004-08-31 19:36                                                         ` Karl Vogel
2004-09-02  9:05                                                         ` Rik van Riel
2004-08-30 23:02                                         ` Karl Vogel
2004-08-29 16:54                       ` Jens Axboe
2004-08-29 17:52                         ` William Lee Irwin III
2004-08-28 21:59                 ` Karl Vogel
2004-08-29 16:53                 ` Jens Axboe

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=20040829141526.GC10955@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=karl.vogel@pandora.be \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.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