lkml.org 
[lkml]   [2001]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] swap-speedup-2.4.3-B3 (fwd)
On Thu, 26 Apr 2001, Marcelo Tosatti wrote:

> > (I can get it to under 9 with MUCH extremely ugly tinkering. I've done
> > this enough to know that I _should_ be able to do 8 1/2 minutes ~easily)
>
> Which kind of changes you're doing to get better performance on this test?

:)

2.4.4.pre7.virgin
real 11m33.589s
user 7m57.790s
sys 0m38.730s

2.4.4.pre7.sillyness
real 9m30.336s
user 7m55.270s
sys 0m38.510s

--- mm/vmscan.c.org Thu Apr 26 06:35:19 2001
+++ mm/vmscan.c Thu Apr 26 08:25:52 2001
@@ -72,8 +72,7 @@
set_pte(page_table, swp_entry_to_pte(entry));
drop_pte:
mm->rss--;
- if (!page->age)
- deactivate_page(page);
+ age_page_down(page);
UnlockPage(page);
page_cache_release(page);
return;
@@ -282,7 +281,7 @@

/* Always start by trying to penalize the process that is allocating memory */
if (mm)
- retval = swap_out_mm(mm, swap_amount(mm));
+ return swap_out_mm(mm, swap_amount(mm));

/* Then, look at the other mm's */
counter = mmlist_nr >> priority;
@@ -642,6 +641,10 @@
struct page * page;
int maxscan, page_active = 0;
int ret = 0;
+ static unsigned long lastscan;
+
+ if (lastscan == jiffies)
+ return 0;

/* Take the lock while messing with the list... */
spin_lock(&pagemap_lru_lock);
@@ -695,6 +698,7 @@
break;
}
}
+ lastscan = jiffies;
spin_unlock(&pagemap_lru_lock);

return ret;
@@ -791,35 +795,13 @@
#define DEF_PRIORITY (6)
static int refill_inactive(unsigned int gfp_mask, int user)
{
- int count, start_count, maxtry;
-
- count = inactive_shortage() + free_shortage();
- if (user)
- count = (1 << page_cluster);
- start_count = count;
-
- maxtry = 6;
- do {
- if (current->need_resched) {
- __set_current_state(TASK_RUNNING);
- schedule();
- }
-
- while (refill_inactive_scan(DEF_PRIORITY, 1)) {
- if (--count <= 0)
- goto done;
- }
+ int shortage = inactive_shortage();

+ if (refill_inactive_scan(DEF_PRIORITY, 0) < shortage)
/* If refill_inactive_scan failed, try to page stuff out.. */
swap_out(DEF_PRIORITY, gfp_mask);

- if (--maxtry <= 0)
- return 0;
-
- } while (inactive_shortage());
-
-done:
- return (count < start_count);
+ return 0;
}

static int do_try_to_free_pages(unsigned int gfp_mask, int user)
-
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 12:52    [W:1.828 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site