linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]
@ 2001-08-15 17:35 Ben LaHaise
  2001-08-15 17:40 ` [PATCH] Linus Torvalds
  0 siblings, 1 reply; 11+ messages in thread
From: Ben LaHaise @ 2001-08-15 17:35 UTC (permalink / raw)
  To: torvalds, alan; +Cc: linux-mm

Hello,

The patch below enables vma merging for a couple of additional cases with
anon mmaps as glibc has a habit of passing in differing flags for some
cases (ie memory remapping, extending specific malloc blocks, etc).  This
is to help Mozilla which ends up with thousands of vma's that are
sequential and anonymous, but unmerged.  There may still be issues with
mremap, but I think this is a step in the right direction.

		-ben

diff -urN /md0/kernels/2.4/v2.4.8-ac5/mm/mmap.c work-v2.4.8-ac5/mm/mmap.c
--- /md0/kernels/2.4/v2.4.8-ac5/mm/mmap.c	Wed Aug 15 12:57:40 2001
+++ work-v2.4.8-ac5/mm/mmap.c	Wed Aug 15 13:02:35 2001
@@ -309,7 +309,8 @@
 	if (addr && !file && !(vm_flags & VM_SHARED)) {
 		struct vm_area_struct * vma = find_vma(mm, addr-1);
 		if (vma && vma->vm_end == addr && !vma->vm_file &&
-		    vma->vm_flags == vm_flags) {
+		    (vma->vm_flags & ~(MAP_NORESERVE | MAP_FIXED)) ==
+		    (vm_flags & ~(MAP_NORESERVE | MAP_FIXED))) {
 			vma->vm_end = addr + len;
 			goto out;
 		}

--
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-mm.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH]
@ 2001-08-20 14:42 Rik van Riel
  2001-08-20 19:43 ` [PATCH] Marcelo Tosatti
  0 siblings, 1 reply; 11+ messages in thread
From: Rik van Riel @ 2001-08-20 14:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-mm

Hi Alan,

the following patch fixes reclaim_page() and page_launder() to
correctly reactivate a page based one page->count value.

Note that we shouldn't be hitting this code very much with the
current immediate reactivation in __find_page_nolock(), but I
guess it would be useful to have as a safety net against things
like the shmem code and other areas I don't about ;)

regards,

Rik
--
IA64: a worthy successor to i860.


--- linux-2.4.8-ac7/mm/vmscan.c.orig	Mon Aug 20 11:29:24 2001
+++ linux-2.4.8-ac7/mm/vmscan.c	Mon Aug 20 11:30:46 2001
@@ -456,7 +456,7 @@

 		/* Page is or was in use?  Move it to the active list. */
 		if (PageReferenced(page) || page->age > 0 ||
-				(!page->buffers && page_count(page) > 1)) {
+				page_count(page) > (1 + !!page->buffers)) {
 			del_page_from_inactive_clean_list(page);
 			add_page_to_active_list(page);
 			continue;
@@ -594,7 +594,7 @@

 		/* Page is or was in use?  Move it to the active list. */
 		if (PageReferenced(page) || page->age > 0 ||
-				(!page->buffers && page_count(page) > 1) ||
+				page_count(page) > (1 + !!page->buffers) ||
 				page_ramdisk(page)) {
 			del_page_from_inactive_dirty_list(page);
 			add_page_to_active_list(page);

--
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-mm.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-08-20 21:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15 17:35 [PATCH] Ben LaHaise
2001-08-15 17:40 ` [PATCH] Linus Torvalds
2001-08-15 17:53   ` [PATCH] Ben LaHaise
2001-08-15 18:26   ` [PATCH] Daniel Phillips
2001-08-15 19:44   ` [PATCH] mremap merging Ben LaHaise
2001-08-15 22:41     ` [PATCH] mmap tail merging Ben LaHaise
2001-08-15 23:04       ` Rik van Riel
2001-08-16  3:26         ` Ben LaHaise
2001-08-20 14:42 [PATCH] Rik van Riel
2001-08-20 19:43 ` [PATCH] Marcelo Tosatti
2001-08-20 21:34   ` [PATCH] 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