Re: [RFC] mm: change find_vma() function

From: yalin wang
Date: Tue Dec 22 2015 - 00:31:36 EST



> On Dec 15, 2015, at 19:53, Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> wrote:
>
> On Tue, Dec 15, 2015 at 02:41:21PM +0800, yalin wang wrote:
>>> On Dec 15, 2015, at 05:11, Kirill A. Shutemov <kirill@xxxxxxxxxxxxx> wrote:
>>> Anyway, I don't think it's possible to gain anything measurable from this
>>> optimization.
>>>
>> the advantage is that if addr donât belong to any vma, we donât need loop all vma,
>> we can break earlier if we found the most closest vma which vma->end_add > addr,
>
> Do you have any workload which can demonstrate the advantage?
>
> â
i add the log in find_vma() to see the call stack ,
it is very efficient in mmap() / munmap / do_execve() / get_unmaped_area() /
mem_cgroup_move_task()->walk_page_range()->find_vma() call ,

in most time the loop will break after search about 7 vm,
i donât consider the cache pollution problem in this patch,
yeah, this patch will check the vm_prev->vm_end for every loop,
but this only happened when tmp->vm_end > addr ,
if you donât not check this , you will continue to loop to check next rb ,
this will also pollute the cache ,

so the question is which one is better ?
i donât have a better method to test this .
Any good ideas about this ?
how to test it ?

Thanks







--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/