linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kswapd performance fix
@ 2000-02-24 23:30 Rik van Riel
  2000-02-25 10:26 ` Stephen C. Tweedie
  0 siblings, 1 reply; 3+ messages in thread
From: Rik van Riel @ 2000-02-24 23:30 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux MM, Linux Kernel

Hi Alan,

here's a one-liner that makes kswapd a little bit faster
by not dirtying cache lines needlessly any more.

The patch should apply to any 2.2 or 2.3 kernel, but for
2.3 it'll have the interesting side effect of nullifying
the (minimal) page aging that's going on there.

Expect a patch for the newest 2.3 tomorrow :)
(if I'm not in a moving frenzy and packing my things
like I should be doing by now)

cheers,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.


--- linux/mm/vmscan.c.orig	Thu Feb 24 22:56:42 2000
+++ linux/mm/vmscan.c	Thu Feb 24 23:14:13 2000
@@ -55,7 +55,6 @@
 		 */
 		set_pte(page_table, pte_mkold(pte));
 		flush_tlb_page(vma, address);
-		set_bit(PG_referenced, &page_map->flags);
 		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

* Re: [PATCH] kswapd performance fix
  2000-02-24 23:30 [PATCH] kswapd performance fix Rik van Riel
@ 2000-02-25 10:26 ` Stephen C. Tweedie
  2000-02-25 11:55   ` Rik van Riel
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen C. Tweedie @ 2000-02-25 10:26 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Alan Cox, Linux MM, Stephen Tweedie <sct@redhat.com> Linux Kernel

Hi,

On Fri, 25 Feb 2000 00:30:59 +0100 (CET), Rik van Riel
<riel@nl.linux.org> said:

> The patch should apply to any 2.2 or 2.3 kernel, but for
> 2.3 it'll have the interesting side effect of nullifying
> the (minimal) page aging that's going on there.

Have you actually tested the impact of this under a variety of load
conditions?  In the past we have seen such apparently trivial changes
completely break the VM balance under certain loads.

--Stephen
--
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] kswapd performance fix
  2000-02-25 10:26 ` Stephen C. Tweedie
@ 2000-02-25 11:55   ` Rik van Riel
  0 siblings, 0 replies; 3+ messages in thread
From: Rik van Riel @ 2000-02-25 11:55 UTC (permalink / raw)
  To: Stephen C. Tweedie
  Cc: Alan Cox, Linux MM, Stephen Tweedie <sct@redhat.com> Linux Kernel

On Fri, 25 Feb 2000, Stephen C. Tweedie wrote:
> On Fri, 25 Feb 2000 00:30:59 +0100 (CET), Rik van Riel
> <riel@nl.linux.org> said:
> 
> > The patch should apply to any 2.2 or 2.3 kernel, but for
> > 2.3 it'll have the interesting side effect of nullifying
> > the (minimal) page aging that's going on there.
> 
> Have you actually tested the impact of this under a variety of
> load conditions?  In the past we have seen such apparently trivial
> changes completely break the VM balance under certain loads.

The PG_referenced bit isn't used for anything except for
NRU/LRU page reclaiming in shrink_mmap().

However, shrink_mmap() will skip over any pages that are
still mapped by processes _and_ when we unmap the page
from the (next to) last user we set the PG_referenced bit.

The PG_referenced bit is also not used at all by shrink_mmap(),
unless (page->count == 1); shm_swap() doesn't use the referenced
bit at all.

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

--
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:[~2000-02-25 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-24 23:30 [PATCH] kswapd performance fix Rik van Riel
2000-02-25 10:26 ` Stephen C. Tweedie
2000-02-25 11:55   ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox