* Re: [PATCH] ac7: page_launder() & refill_inactive() changes
@ 2001-03-03 21:12 Benjamin Redelings I
2001-03-05 9:36 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Redelings I @ 2001-03-03 21:12 UTC (permalink / raw)
To: linux-mm
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: 7bit
Hi Marcelo:
In the patch you provided, have you perhaps reverse the sense of this
test:
+ if (try_to_free_buffers(page, wait))
+ flushed_pages++;
Should this have a NOT (!) instead?
+ if (!try_to_free_buffers(page, wait))
+ flushed_pages++;
BTW, has anyone done any MM benchmarks of the 2.4.2-ac? against Linus's
tree?
-BenRI
--
"...assisted of course by pride, for we teach them to describe the
Creeping Death, as Good Sense, or Maturity, or Experience."
- "The Screwtape Letters"
Benjamin Redelings I <>< http://www.bol.ucla.edu/~bredelin/
--
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.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ac7: page_launder() & refill_inactive() changes
2001-03-03 21:12 [PATCH] ac7: page_launder() & refill_inactive() changes Benjamin Redelings I
@ 2001-03-05 9:36 ` Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2001-03-05 9:36 UTC (permalink / raw)
To: Benjamin Redelings I; +Cc: linux-mm
On Sat, 3 Mar 2001, Benjamin Redelings I wrote:
>
> Content-Type: text/plain; charset=big5
> Content-Transfer-Encoding: 7bit
>
> Hi Marcelo:
> In the patch you provided, have you perhaps reverse the sense of this
> test:
>
> + if (try_to_free_buffers(page, wait))
> + flushed_pages++;
>
> Should this have a NOT (!) instead?
No.
I changed try_to_free_buffers() to return true if it did IO.
>
> + if (!try_to_free_buffers(page, wait))
> + flushed_pages++;
>
--
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.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ac7: page_launder() & refill_inactive() changes
@ 2001-03-01 21:37 Marcelo Tosatti
0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2001-03-01 21:37 UTC (permalink / raw)
To: Alan Cox; +Cc: Rik van Riel, lkml, linux-mm
Hi,
The following patch changes two things:
- Counts asynchronous ll_rw_block() IO in the flushed pages counter (page_launder)
- Limits the amount of scanned pte's _by user tasks_ inside swap_out()
diff --exclude-from=/home/marcelo/exclude -Nur linux.orig/fs/buffer.c linux/fs/buffer.c
--- linux.orig/fs/buffer.c Thu Mar 1 19:21:02 2001
+++ linux/fs/buffer.c Thu Mar 1 19:33:38 2001
@@ -1399,7 +1399,8 @@
* instead.
*/
if (!offset) {
- if (!try_to_free_buffers(page, 0)) {
+ try_to_free_buffers(page, 0);
+ if (page->buffers) {
atomic_inc(&buffermem_pages);
return 0;
}
@@ -2413,7 +2414,7 @@
spin_unlock(&free_list[index].lock);
write_unlock(&hash_table_lock);
spin_unlock(&lru_list_lock);
- return 1;
+ return 0;
busy_buffer_page:
/* Uhhuh, start writeback so that we don't end up with all dirty pages */
@@ -2428,6 +2429,7 @@
goto cleaned_buffers_try_again;
}
wakeup_bdflush(0);
+ return 1;
}
return 0;
}
diff --exclude-from=/home/marcelo/exclude -Nur linux.orig/mm/vmscan.c linux/mm/vmscan.c
--- linux.orig/mm/vmscan.c Thu Mar 1 19:21:08 2001
+++ linux/mm/vmscan.c Thu Mar 1 19:35:51 2001
@@ -269,7 +269,7 @@
return nr < SWAP_MIN ? SWAP_MIN : nr;
}
-static int swap_out(unsigned int priority, int gfp_mask)
+static int swap_out(unsigned int priority, int gfp_mask, int user)
{
int counter;
int retval = 0;
@@ -280,7 +280,12 @@
retval = swap_out_mm(mm, swap_amount(mm));
/* Then, look at the other mm's */
- counter = (mmlist_nr << SWAP_SHIFT) >> priority;
+
+ if (user)
+ counter = (mmlist_nr) >> priority;
+ else
+ counter = (mmlist_nr << SWAP_SHIFT) >> priority;
+
do {
struct list_head *p;
@@ -535,7 +540,7 @@
* buffer pages
*/
if (page->buffers) {
- int wait, clearedbuf;
+ int wait;
/*
* Since we might be doing disk IO, we have to
* drop the spinlock and take an extra reference
@@ -554,7 +559,8 @@
wait = 0; /* No IO */
/* Try to free the page buffers. */
- clearedbuf = try_to_free_buffers(page, wait);
+ if (try_to_free_buffers(page, wait))
+ flushed_pages++;
/*
* Re-take the spinlock. Note that we cannot
@@ -564,10 +570,8 @@
spin_lock(&pagemap_lru_lock);
/* The buffers were not freed. */
- if (!clearedbuf) {
+ if (page->buffers) {
add_page_to_inactive_dirty_list(page);
- if (wait)
- flushed_pages++;
/* The page was only in the buffer cache. */
} else if (!page->mapping) {
@@ -876,7 +880,7 @@
goto done;
/* If refill_inactive_scan failed, try to page stuff out.. */
- swap_out(DEF_PRIORITY, gfp_mask);
+ swap_out(DEF_PRIORITY, gfp_mask, user);
if (--maxtry <= 0)
return 0;
--
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.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-03-05 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-03 21:12 [PATCH] ac7: page_launder() & refill_inactive() changes Benjamin Redelings I
2001-03-05 9:36 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2001-03-01 21:37 Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox