From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
david@lang.hm, Christoph Lameter <cl@linux.com>,
Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@google.com>, Dave Jones <davej@redhat.com>,
Mel Gorman <mgorman@suse.de>,
stable@vger.kernel.org, hughd@google.com, sivanich@sgi.com
Subject: Re: [PATCH 0/6] mempolicy memory corruption fixlet
Date: Wed, 06 Jun 2012 15:10:53 -0400 [thread overview]
Message-ID: <4FCFAB3D.6080000@gmail.com> (raw)
In-Reply-To: <20120605121711.bb392118.akpm@linux-foundation.org>
(6/5/12 3:17 PM), Andrew Morton wrote:
> On Tue, 5 Jun 2012 12:02:25 -0700
> Linus Torvalds<torvalds@linux-foundation.org> wrote:
>
>> I'm coming back to this email thread, because I didn't apply the
>> series due to all the ongoing discussion and hoping that somebody
>> would put changelog fixes and ack notices etc together.
>>
>> I'd also really like to know that the people who saw the problem that
>> caused the current single patch (that this series reverts) would test
>> the whole series. Maybe that happened and I didn't notice it in the
>> threads, but I don't think so.
I'm not surprised this. If many people are interesting to review this area,
mempolicy wouldn't have break so a lot.
>> In fact, right now I'm assuming that the series will eventually come
>> to me through Andrew. Andrew, correct?
>
> yup.
>
> I expect there will be a v2 series (at least). It's unclear what
> we'll be doing with [2/6]: whether the patch will be reworked, or
> whether Andi misunderstood its effects?
Maybe because Andi didn't join bug fix works in this area for several years?
Currently, mbind(2) is completely broken. A primary role of mbind(2) is to
update memory policy of some vmas and Mel's fix remvoed it. Then, mbind is
almostly no-op. it's a regression.
I'm not clear which point you seems unclear. So, let's repeat a description of
[2/6].
There are two problem now, alloc_pages_vma() has strong and wrong assumption.
vma->policy never have MPOL_F_SHARED and shared_policy->policy must have it.
And, cpusets rebinding ignore mpol->refcnt and updates it forcibly.
The final point is to implement cow. But for it, we need rewrite mpol->rebind
family completely. It doesn't fit for 3.5 timeframe.
The downside of patch [2/6] is very small. because,
A memplicy is only shared three cases, 1) mbind() updates multiple
vmas 2) mbind() updates shmem vma 3) A shared policy splits into two regions
by a part region update.
All of them are rare. Because nobody hit kernel panic until now. Then I don't
think my patch increase memory footprint.
next prev parent reply other threads:[~2012-06-06 19:10 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 9:02 [PATCH 0/6] mempolicy memory corruption fixlet kosaki.motohiro
2012-05-30 9:02 ` [PATCH 1/6] Revert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages" kosaki.motohiro
2012-05-30 19:17 ` Christoph Lameter
2012-05-30 19:39 ` KOSAKI Motohiro
2012-05-30 19:44 ` Christoph Lameter
2012-05-31 6:49 ` KOSAKI Motohiro
2012-05-30 9:02 ` [PATCH 2/6] mempolicy: Kill all mempolicy sharing kosaki.motohiro
2012-05-30 19:41 ` Christoph Lameter
2012-05-30 19:46 ` KOSAKI Motohiro
2012-05-30 19:48 ` Andi Kleen
2012-05-30 20:31 ` Andi Kleen
2012-05-30 20:58 ` KOSAKI Motohiro
2012-05-30 9:02 ` [PATCH 3/6] mempolicy: fix a race in shared_policy_replace() kosaki.motohiro
2012-05-30 9:02 ` [PATCH 4/6] mempolicy: fix refcount leak in mpol_set_shared_policy() kosaki.motohiro
2012-05-30 9:02 ` [PATCH 5/6] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() kosaki.motohiro
2012-05-30 20:37 ` Andi Kleen
2012-05-30 9:02 ` [PATCH 6/6] MAINTAINERS: Added MEMPOLICY entry kosaki.motohiro
2012-05-30 19:27 ` Christoph Lameter
2012-05-30 18:26 ` [PATCH 0/6] mempolicy memory corruption fixlet Linus Torvalds
2012-05-30 18:34 ` Christoph Lameter
2012-05-30 18:46 ` Andi Kleen
2012-05-30 18:50 ` Christoph Lameter
2012-05-30 19:32 ` Andi Kleen
2012-05-30 19:42 ` Christoph Lameter
2012-05-30 19:52 ` Andi Kleen
2012-05-30 20:00 ` KOSAKI Motohiro
2012-05-30 21:22 ` Ben Hutchings
2012-05-30 21:25 ` KOSAKI Motohiro
2012-05-30 19:54 ` KOSAKI Motohiro
2012-05-30 20:10 ` Andi Kleen
2012-05-30 20:16 ` KOSAKI Motohiro
2012-06-01 0:45 ` david
2012-06-01 13:51 ` Christoph Lameter
2012-06-01 19:31 ` david
2012-06-01 19:37 ` KOSAKI Motohiro
2012-06-05 19:02 ` Linus Torvalds
2012-06-05 19:17 ` Andrew Morton
2012-06-06 19:10 ` KOSAKI Motohiro [this message]
2012-05-30 19:03 ` Linus Torvalds
2012-05-30 20:10 ` 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=4FCFAB3D.6080000@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=akpm@google.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cl@linux.com \
--cc=davej@redhat.com \
--cc=david@lang.hm \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=sivanich@sgi.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).