linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ben LaHaise <bcrl@redhat.com>
To: torvalds@transmeta.com, alan@redhat.com
Cc: linux-mm@kvack.org
Subject: [PATCH]
Date: Wed, 15 Aug 2001 13:35:35 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0108151326180.31764-100000@touchme.toronto.redhat.com> (raw)

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/

             reply	other threads:[~2001-08-15 17:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 17:35 Ben LaHaise [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0108151326180.31764-100000@touchme.toronto.redhat.com \
    --to=bcrl@redhat.com \
    --cc=alan@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox