LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 1/1] MM: detach_vmas_to_be_unmapped fix
@ 2007-02-21 18:06 akuster
2007-02-21 20:59 ` Ingo Oeser
0 siblings, 1 reply; 4+ messages in thread
From: akuster @ 2007-02-21 18:06 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm
---
mm/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN mm/mmap.c~Avoiding-mmap-fragmentation_fixup mm/mmap.c
--- linux-2.6_clean/mm/mmap.c~Avoiding-mmap-fragmentation_fixup 2007-02-21 09:49:32.000000000 -0800
+++ linux-2.6_clean-akuster/mm/mmap.c 2007-02-21 09:51:26.000000000 -0800
@@ -1720,9 +1720,9 @@ detach_vmas_to_be_unmapped(struct mm_str
*insertion_point = vma;
tail_vma->vm_next = NULL;
if (mm->unmap_area == arch_unmap_area)
- addr = prev ? prev->vm_end : mm->mmap_base;
+ addr = prev ? prev->vm_start : mm->mmap_base;
else
- addr = vma ? vma->vm_start : mm->mmap_base;
+ addr = vma ? vma->vm_end : mm->mmap_base;
mm->unmap_area(mm, addr);
mm->mmap_cache = NULL; /* Kill the cache. */
}
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] MM: detach_vmas_to_be_unmapped fix
2007-02-21 18:06 [patch 1/1] MM: detach_vmas_to_be_unmapped fix akuster
@ 2007-02-21 20:59 ` Ingo Oeser
2007-02-23 16:27 ` akuster
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Oeser @ 2007-02-21 20:59 UTC (permalink / raw)
To: akuster; +Cc: linux-kernel, akpm
Hi,
On Wednesday, 21. February 2007, akuster@mvista.com wrote:
>
> ---
>
> mm/mmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -puN mm/mmap.c~Avoiding-mmap-fragmentation_fixup mm/mmap.c
> --- linux-2.6_clean/mm/mmap.c~Avoiding-mmap-fragmentation_fixup 2007-02-21 09:49:32.000000000 -0800
> +++ linux-2.6_clean-akuster/mm/mmap.c 2007-02-21 09:51:26.000000000 -0800
> @@ -1720,9 +1720,9 @@ detach_vmas_to_be_unmapped(struct mm_str
> *insertion_point = vma;
> tail_vma->vm_next = NULL;
> if (mm->unmap_area == arch_unmap_area)
> - addr = prev ? prev->vm_end : mm->mmap_base;
> + addr = prev ? prev->vm_start : mm->mmap_base;
> else
> - addr = vma ? vma->vm_start : mm->mmap_base;
> + addr = vma ? vma->vm_end : mm->mmap_base;
> mm->unmap_area(mm, addr);
> mm->mmap_cache = NULL; /* Kill the cache. */
> }
Please comment, why you think this is necessary.
Thanks & Regards
Ingo Oeser
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] MM: detach_vmas_to_be_unmapped fix
2007-02-21 20:59 ` Ingo Oeser
@ 2007-02-23 16:27 ` akuster
2007-02-27 20:27 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: akuster @ 2007-02-23 16:27 UTC (permalink / raw)
To: Ingo Oeser; +Cc: linux-kernel, akpm
Ingo Oeser wrote:
> Hi,
>
> On Wednesday, 21. February 2007, akuster@mvista.com wrote:
>> ---
>>
>> mm/mmap.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff -puN mm/mmap.c~Avoiding-mmap-fragmentation_fixup mm/mmap.c
>> --- linux-2.6_clean/mm/mmap.c~Avoiding-mmap-fragmentation_fixup 2007-02-21 09:49:32.000000000 -0800
>> +++ linux-2.6_clean-akuster/mm/mmap.c 2007-02-21 09:51:26.000000000 -0800
>> @@ -1720,9 +1720,9 @@ detach_vmas_to_be_unmapped(struct mm_str
>> *insertion_point = vma;
>> tail_vma->vm_next = NULL;
>> if (mm->unmap_area == arch_unmap_area)
>> - addr = prev ? prev->vm_end : mm->mmap_base;
>> + addr = prev ? prev->vm_start : mm->mmap_base;
>> else
>> - addr = vma ? vma->vm_start : mm->mmap_base;
>> + addr = vma ? vma->vm_end : mm->mmap_base;
>> mm->unmap_area(mm, addr);
>> mm->mmap_cache = NULL; /* Kill the cache. */
>> }
>
> Please comment, why you think this is necessary.
Yes that would help.
On Feb. 16th I asked a question and got no response. Here is what should
have been included with the above patch.
Wolfgang Wander submitted a fix to address a mmap fragmentation issue.
The git patch ( 1363c3cd8603a913a27e2995dccbd70d5312d8e6 ) is somewhat
different and yields different results when running Wolfgang's test case
leakme.c.
IMHO, the vm start and end address are swapped in arch_unmap_area and
arch_unmap_area_topdown functions.
Prior to this patch arch_unmap_area() used area->vm_start and
arch_unmap_area_topdown used area->vm_end in the git patch the following
change showed up.
if (mm->unmap_area == arch_unmap_area)
addr = prev ? prev->vm_start : mm->mmap_base;
else
addr = vma ? vma->vm_end : mm->mmap_base;
Using Wolfgang Wander's leakme.c test, I get the same results seen with
his original "Avoiding mmap fragmentation" patch as I do after swapping
the start & end address in the above code segment. The patch I
submitted addresses this typo issue.
TIA,
Armin
>
>
> Thanks & Regards
>
> Ingo Oeser
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] MM: detach_vmas_to_be_unmapped fix
2007-02-23 16:27 ` akuster
@ 2007-02-27 20:27 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2007-02-27 20:27 UTC (permalink / raw)
To: akuster; +Cc: ioe-lkml, linux-kernel
> On Fri, 23 Feb 2007 08:27:00 -0800 akuster <akuster@mvista.com> wrote:
> Wolfgang Wander submitted a fix to address a mmap fragmentation issue.
> The git patch ( 1363c3cd8603a913a27e2995dccbd70d5312d8e6 ) is somewhat
> different and yields different results when running Wolfgang's test case
> leakme.c.
>
> IMHO, the vm start and end address are swapped in arch_unmap_area and
> arch_unmap_area_topdown functions.
>
> Prior to this patch arch_unmap_area() used area->vm_start and
> arch_unmap_area_topdown used area->vm_end in the git patch the following
> change showed up.
>
> if (mm->unmap_area == arch_unmap_area)
> addr = prev ? prev->vm_start : mm->mmap_base;
> else
> addr = vma ? vma->vm_end : mm->mmap_base;
>
> Using Wolfgang Wander's leakme.c test, I get the same results seen with
> his original "Avoiding mmap fragmentation" patch as I do after swapping
> the start & end address in the above code segment. The patch I
> submitted addresses this typo issue.
That's still not an adequate or terribly useful changlog, sorry.
Please tell us exactly what this patch does, without referring to some other
patch which I cannot remember nor presently access.
I particular, before-and-after testing results would be useful so we can
see what the effect of this change is.
Also, please send a Signed-of-by: for this work, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-27 20:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-21 18:06 [patch 1/1] MM: detach_vmas_to_be_unmapped fix akuster
2007-02-21 20:59 ` Ingo Oeser
2007-02-23 16:27 ` akuster
2007-02-27 20:27 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).