From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Caspar Zhang <caspar@casparzhang.com>
Subject: Re: [PATCH] mempolicy: refix mbind_range() vma issue
Date: Tue, 20 Dec 2011 13:19:15 -0500 [thread overview]
Message-ID: <4EF0D1A3.7010700@gmail.com> (raw)
In-Reply-To: <20111212112000.GB18789@cmpxchg.org>
>> + pgoff = vma->vm_pgoff + ((vmstart - vma->vm_start)>> PAGE_SHIFT);
>> prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags,
>> - vma->anon_vma, vma->vm_file, vma->vm_pgoff,
>> + vma->anon_vma, vma->vm_file, pgoff,
>> new_pol);
>> if (prev) {
>> vma = prev;
>
> This is essentially a revert of the aforementioned commit.
>
> What you added instead is the fixing of @prev: only when mbind is
> vma-aligned can the new area be potentially merged into the preceding
> one. Otherwise that original vma is the one we need to check for
> compatibility with the mbind range and leave the original prev alone:
>
> [prev ][vma ]
> |start
>
> [prev ][vma][mbind vma ]
>
> This should NOT attempt to merge mbind vma with prev (and forget about
> and leak vma, iirc), but check if vma and the mbind vma are compatible
> or should be separate areas.
>
> Could you please add something to that extent to the changelog?
When making new test case, I've found one bug in my patch. So, I've
sent new patch w/ detailed bug explanaion. :)
Thanks.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Caspar Zhang <caspar@casparzhang.com>
Subject: Re: [PATCH] mempolicy: refix mbind_range() vma issue
Date: Tue, 20 Dec 2011 13:19:15 -0500 [thread overview]
Message-ID: <4EF0D1A3.7010700@gmail.com> (raw)
In-Reply-To: <20111212112000.GB18789@cmpxchg.org>
>> + pgoff = vma->vm_pgoff + ((vmstart - vma->vm_start)>> PAGE_SHIFT);
>> prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags,
>> - vma->anon_vma, vma->vm_file, vma->vm_pgoff,
>> + vma->anon_vma, vma->vm_file, pgoff,
>> new_pol);
>> if (prev) {
>> vma = prev;
>
> This is essentially a revert of the aforementioned commit.
>
> What you added instead is the fixing of @prev: only when mbind is
> vma-aligned can the new area be potentially merged into the preceding
> one. Otherwise that original vma is the one we need to check for
> compatibility with the mbind range and leave the original prev alone:
>
> [prev ][vma ]
> |start
>
> [prev ][vma][mbind vma ]
>
> This should NOT attempt to merge mbind vma with prev (and forget about
> and leak vma, iirc), but check if vma and the mbind vma are compatible
> or should be separate areas.
>
> Could you please add something to that extent to the changelog?
When making new test case, I've found one bug in my patch. So, I've
sent new patch w/ detailed bug explanaion. :)
Thanks.
next prev parent reply other threads:[~2011-12-20 18:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 16:55 [PATCH] mempolicy: refix mbind_range() vma issue kosaki.motohiro
2011-12-09 16:55 ` kosaki.motohiro
2011-12-12 11:20 ` Johannes Weiner
2011-12-12 11:20 ` Johannes Weiner
2011-12-20 18:17 ` [PATCH] [v2] " kosaki.motohiro
2011-12-20 18:17 ` kosaki.motohiro
2011-12-20 19:28 ` Johannes Weiner
2011-12-20 19:28 ` Johannes Weiner
2011-12-20 23:37 ` Andrew Morton
2011-12-20 23:37 ` Andrew Morton
2011-12-20 23:54 ` Johannes Weiner
2011-12-20 23:54 ` Johannes Weiner
2011-12-20 18:19 ` KOSAKI Motohiro [this message]
2011-12-20 18:19 ` [PATCH] " 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=4EF0D1A3.7010700@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=caspar@casparzhang.com \
--cc=hannes@cmpxchg.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.