lkml.org 
[lkml]   [2003]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Software suspend testing in 2.6.0-test1
Pavel Machek <pavel@ucw.cz> wrote:
>
> > --- linux/mm/vmscan.c.old Thu Jul 17 21:30:09 2003
> > +++ linux/mm/vmscan.c Thu Jul 17 21:29:58 2003
> > @@ -930,7 +930,7 @@
> > }
> > if (all_zones_ok)
> > break;
> > - blk_congestion_wait(WRITE, HZ/10);
> > + blk_congestion_wait(WRITE, HZ/50);
> > }
> > return nr_pages - to_free;
> > }
>
> This is certainly not okay. Andrew, you know more about vm
> internals... What does this ugly constant mean?

Most of the time the timeout is a "can't happen" - blk_congestion_wait() is
terminated by completion of writeout. The timeout is mainly there to
prevent hangs if weird and rare races happen. Otherwise we'd need lots
more locking.

I don't think we want to be calling it at all if reclaim is working well.
Something like this.


diff -puN mm/vmscan.c~a mm/vmscan.c
--- 25/mm/vmscan.c~a Thu Jul 17 13:05:36 2003
+++ 25-akpm/mm/vmscan.c Thu Jul 17 13:05:58 2003
@@ -921,7 +921,7 @@ static int balance_pgdat(pg_data_t *pgda
if (i < ZONE_HIGHMEM) {
reclaim_state->reclaimed_slab = 0;
shrink_slab(max_scan + nr_mapped, GFP_KERNEL);
- to_free += reclaim_state->reclaimed_slab;
+ to_free -= reclaim_state->reclaimed_slab;
}
if (zone->all_unreclaimable)
continue;
@@ -930,7 +930,8 @@ static int balance_pgdat(pg_data_t *pgda
}
if (all_zones_ok)
break;
- blk_congestion_wait(WRITE, HZ/10);
+ if (to_free)
+ blk_congestion_wait(WRITE, HZ/10);
}
return nr_pages - to_free;
}
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.402 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site