From: Prasanna Meda <pmeda@akamai.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix madvise vma merging
Date: Fri, 05 Aug 2005 17:08:49 -0700 [thread overview]
Message-ID: <42F3FF90.9C030CEB@akamai.com> (raw)
In-Reply-To: Pine.LNX.4.61.0508051911120.6203@goblin.wat.veritas.com
Hugh Dickins wrote:
> Better late than never, I've at last reviewed the madvise vma merging
> going into 2.6.13. Remove a pointless check and fix two little bugs -
> a simple test (with /proc/<pid>/maps hacked to show ReadHints) showed
> both mismerges in practice: though being madvise, neither was disastrous.
>
> 1. Correct placement of the success label in madvise_behavior: as in
> mprotect_fixup and mlock_fixup, it is necessary to update vm_flags
> when vma_merge succeeds (to handle the exceptional Case 8 noted in
> the comments above vma_merge itself).
>
> 2. Correct initial value of prev when starting part way into a vma: as
> in sys_mprotect and do_mlock, it needs to be set to vma in this case
> (vma_merge handles only that minimum of cases shown in its comments).
>
> 3. If find_vma_prev sets prev, then the vma it returns is prev->vm_next,
> so it's pointless to make that same assignment again in sys_madvise.
Acknowledge corrections 1 and 3 readily. Treated vma_merge
as block box that can handle all cases. Motivation for pointless
case 3 is to skip holes and did not notice that has been covered. Thanks for
corrections.
> (vma_merge handles only that minimum of cases shown in its comments).
>
Correction 2 is tricky. Sometimes it merges similar to case 3,
misses a needed split, where after the fix we can get case 4
merge. If that is what you are saying, we are in agreement. Otherwise,
can you explain the real problem?
Thanks,
Prasanna.
next prev parent reply other threads:[~2005-08-06 0:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 18:24 [PATCH] fix madvise vma merging Hugh Dickins
2005-08-06 0:08 ` Prasanna Meda [this message]
2005-08-06 10:37 ` Hugh Dickins
2005-08-08 19:47 ` Prasanna Meda
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=42F3FF90.9C030CEB@akamai.com \
--to=pmeda@akamai.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
/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