From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Shaohua Li <shaohua.li@intel.com>
Subject: Re: [PATCH v3] mm: simplify find_vma_prev
Date: Mon, 12 Dec 2011 14:34:01 -0500 [thread overview]
Message-ID: <4EE65729.9030706@gmail.com> (raw)
In-Reply-To: <CAHGf_=o2C6YniR4+3FAVVZNYb+D=9brkdLgzoRVH95ppPQCgtQ@mail.gmail.com>
(12/12/11 2:24 PM), KOSAKI Motohiro wrote:
>>> Why have you removed this guard? Previously we had pprev==NULL and
>>> returned mm->mmap.
>>> This seems like a semantic change without any explanation. Could you
>>> clarify?
>>
>> Scratch that. I have misread the code. find_vma will return mm->mmap if
>> the given address is bellow all vmas. Sorry about noise.
>>
>> The only concern left would be the caching. Are you sure this will not
>> break some workloads which benefit from mmap_cache usage and would
>> interfere with find_vma_prev callers now? Anyway this could be fixed
>> trivially.
>
> Here is callers list.
>
> find_vma_prev 115 arch/ia64/mm/fault.c vma =
> find_vma_prev(mm, address,&prev_vma);
> find_vma_prev 183 arch/parisc/mm/fault.c vma =
> find_vma_prev(mm, address,&prev_vma);
> find_vma_prev 229 arch/tile/mm/hugetlbpage.c vma =
> find_vma_prev(mm, addr,&prev_vma);
> find_vma_prev 336 arch/x86/mm/hugetlbpage.c if
> (!(vma = find_vma_prev(mm, addr,&prev_vma)))
> find_vma_prev 388 mm/madvise.c vma =
> find_vma_prev(current->mm, start,&prev);
> find_vma_prev 642 mm/mempolicy.c vma = find_vma_prev(mm, start,&prev);
> find_vma_prev 388 mm/mlock.c vma =
> find_vma_prev(current->mm, start,&prev);
> find_vma_prev 265 mm/mprotect.c vma =
> find_vma_prev(current->mm, start,&prev);
>
> In short, find_find_prev() is only used from page fault, madvise, mbind, mlock
> and mprotect. And page fault is only performance impact callsite because other
> don't used frequently on regular workload.
>
> So, I wouldn't say, this patch has zero negative impact, but I think
> it is enough
> small and benefit is enough much.
In addition, other callsite (i.e. madvise, mbind, mlock and mprotect) are
used from syscall. then, an optimal behavior depend on syscall argument.
IOW, we and the kernel can't know it on ahead.
Therefore, this change may increase some applications performance a bit
and may decrease another some applications. I can reasonably guess the
former are much than latter because many app have locality. but I can't
prove it.
Anyway, the impact is enough small, I think. They are rare than page fault.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-12-12 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 21:23 [PATCH v2] " kosaki.motohiro
2011-12-09 21:35 ` Joe Perches
2011-12-09 22:48 ` [PATCH v3] " kosaki.motohiro
2011-12-12 0:49 ` KAMEZAWA Hiroyuki
2011-12-12 9:27 ` KAMEZAWA Hiroyuki
2011-12-12 15:31 ` KOSAKI Motohiro
2011-12-13 4:25 ` KAMEZAWA Hiroyuki
2011-12-12 13:26 ` Michal Hocko
2011-12-12 14:49 ` KOSAKI Motohiro
2011-12-12 19:15 ` Michal Hocko
2011-12-12 19:24 ` KOSAKI Motohiro
2011-12-12 19:34 ` KOSAKI Motohiro [this message]
2011-12-09 22:49 ` [PATCH v2] " KOSAKI Motohiro
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=4EE65729.9030706@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=shaohua.li@intel.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