* Count swap faults which need to read data from the swap area as major faults
@ 2001-04-03 23:11 Marcelo Tosatti
2001-04-04 1:08 ` Rik van Riel
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2001-04-03 23:11 UTC (permalink / raw)
To: Alan Cox, Rik van Riel, Stephen C. Tweedie; +Cc: linux-mm
Hi,
Right now we are not accounting faults which nee to read data from swap as
major faults.
The following patch should fix that.
Against -ac28. (probably applies against 2.4.3-ac2)
--- linux/mm/memory.c.orig Tue Apr 3 21:30:03 2001
+++ linux/mm/memory.c Tue Apr 3 21:32:18 2001
@@ -1112,6 +1112,7 @@
{
struct page *page;
pte_t pte;
+ int ret = 1;
spin_unlock(&mm->page_table_lock);
page = lookup_swap_cache(entry);
@@ -1125,6 +1126,9 @@
return -1;
}
+ /* Had to read the page from swap area: Major fault */
+ ret = 2;
+
flush_page_to_ram(page);
flush_icache_page(vma, page);
}
@@ -1160,7 +1164,7 @@
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, pte);
- return 1; /* Minor fault */
+ return ret;
}
/*
--
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] 2+ messages in thread
* Re: Count swap faults which need to read data from the swap area as major faults
2001-04-03 23:11 Count swap faults which need to read data from the swap area as major faults Marcelo Tosatti
@ 2001-04-04 1:08 ` Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2001-04-04 1:08 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Alan Cox, Stephen C. Tweedie, linux-mm
On Tue, 3 Apr 2001, Marcelo Tosatti wrote:
> Right now we are not accounting faults which nee to read data from
> swap as major faults.
>
> The following patch should fix that.
Looks good....
regards,
Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/
--
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] 2+ messages in thread
end of thread, other threads:[~2001-04-04 1:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-03 23:11 Count swap faults which need to read data from the swap area as major faults Marcelo Tosatti
2001-04-04 1:08 ` 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