* [patch] care about the age of the pte even if we are low on memory
@ 1999-08-08 18:38 Andrea Arcangeli
1999-08-09 10:42 ` Neil Conway
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Arcangeli @ 1999-08-08 18:38 UTC (permalink / raw)
To: Linus Torvalds, MOLNAR Ingo, Stephen C. Tweedie; +Cc: linux-mm
I don't know why in the 2.3.x we are swapping out even the young pages.
This is not going to help oom handling at all and it's only reducing of an
order of magnitude the interactive feeling under heavy swapout. I can
notice an huge difference with eyes from clean 2.2.10 to 2.3.13-pre8.
The low_on_memory flag is there only for GFP internals and IMO it
shouldn't be ever looked from other places.
This patch against 2.3.13-pre8 will fix the problem and it will avoid
further mistakes.
diff -urN 2.3.13-pre8/include/linux/mm.h 2.3.13-pre8-low_on_memory/include/linux/mm.h
--- 2.3.13-pre8/include/linux/mm.h Wed Aug 4 12:28:17 1999
+++ 2.3.13-pre8-low_on_memory/include/linux/mm.h Sun Aug 8 20:25:58 1999
@@ -292,8 +292,6 @@
return page;
}
-extern int low_on_memory;
-
/* memory.c & swap.c*/
#define free_page(addr) free_pages((addr),0)
diff -urN 2.3.13-pre8/mm/page_alloc.c 2.3.13-pre8-low_on_memory/mm/page_alloc.c
--- 2.3.13-pre8/mm/page_alloc.c Tue Jul 13 02:02:40 1999
+++ 2.3.13-pre8-low_on_memory/mm/page_alloc.c Sun Aug 8 20:24:03 1999
@@ -194,8 +194,6 @@
set_page_count(map, 1); \
} while (0)
-int low_on_memory = 0;
-
unsigned long __get_free_pages(int gfp_mask, unsigned long order)
{
unsigned long flags;
@@ -221,6 +219,7 @@
*/
if (!(current->flags & PF_MEMALLOC)) {
int freed;
+ static int low_on_memory = 0;
if (nr_free_pages > freepages.min) {
if (!low_on_memory)
diff -urN 2.3.13-pre8/mm/vmscan.c 2.3.13-pre8-low_on_memory/mm/vmscan.c
--- 2.3.13-pre8/mm/vmscan.c Sun Aug 8 17:21:41 1999
+++ 2.3.13-pre8-low_on_memory/mm/vmscan.c Sun Aug 8 20:23:19 1999
@@ -54,7 +54,7 @@
* Dont be too eager to get aging right if
* memory is dangerously low.
*/
- if (!low_on_memory && pte_young(pte)) {
+ if (pte_young(pte)) {
/*
* Transfer the "accessed" bit from the page
* tables to the global page map.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] care about the age of the pte even if we are low on memory
1999-08-08 18:38 [patch] care about the age of the pte even if we are low on memory Andrea Arcangeli
@ 1999-08-09 10:42 ` Neil Conway
1999-08-09 10:46 ` Andrea Arcangeli
0 siblings, 1 reply; 4+ messages in thread
From: Neil Conway @ 1999-08-09 10:42 UTC (permalink / raw)
To: Andrea Arcangeli; +Cc: linux-mm
Andrea Arcangeli wrote:
> @@ -54,7 +54,7 @@
> * Dont be too eager to get aging right if
> * memory is dangerously low.
> */
> - if (!low_on_memory && pte_young(pte)) {
> + if (pte_young(pte)) {
Ouch - let's try to keep those comments up to date folks. Good comments
are better than
none, but out-of-date ones...
Neil
(ps: I realise of course that this is only your v1 patch Andrea;
undoubtedly we can expect another half a dozen versions over the next 48
hours, one of which will contain updated comments ;-)))
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] care about the age of the pte even if we are low on memory
1999-08-09 10:42 ` Neil Conway
@ 1999-08-09 10:46 ` Andrea Arcangeli
1999-08-17 0:29 ` Andrea Arcangeli
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Arcangeli @ 1999-08-09 10:46 UTC (permalink / raw)
To: Neil Conway; +Cc: linux-mm
On Mon, 9 Aug 1999, Neil Conway wrote:
>Ouch - let's try to keep those comments up to date folks. Good comments
You are plain right, excuse me (I have not read the comment). When the
patch will be applyed I'll provide an update to the comment. Thanks for
pointing this out.
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] care about the age of the pte even if we are low on memory
1999-08-09 10:46 ` Andrea Arcangeli
@ 1999-08-17 0:29 ` Andrea Arcangeli
0 siblings, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 1999-08-17 0:29 UTC (permalink / raw)
To: Neil Conway; +Cc: linux-mm, Linus Torvalds
On Mon, 9 Aug 1999, Andrea Arcangeli wrote:
>On Mon, 9 Aug 1999, Neil Conway wrote:
>
>>Ouch - let's try to keep those comments up to date folks. Good comments
>
>You are plain right, excuse me (I have not read the comment). When the
>patch will be applyed I'll provide an update to the comment. Thanks for
>pointing this out.
As Neil pointed out I have not updated the comment, please apply to
2.3.13:
--- 2.3.13/mm/vmscan.c Thu Aug 12 02:53:26 1999
+++ /tmp/vmscan.c Tue Aug 17 02:28:09 1999
@@ -50,10 +50,7 @@
if (pte_val(pte) != pte_val(*page_table))
goto out_failed_unlock;
- /*
- * Dont be too eager to get aging right if
- * memory is dangerously low.
- */
+ /* Don't look at this pte if it's been accessed recently. */
if (pte_young(pte)) {
/*
* Transfer the "accessed" bit from the page
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-08-17 0:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-08 18:38 [patch] care about the age of the pte even if we are low on memory Andrea Arcangeli
1999-08-09 10:42 ` Neil Conway
1999-08-09 10:46 ` Andrea Arcangeli
1999-08-17 0:29 ` Andrea Arcangeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox