[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHGf_=oLsK2bk_ym6EZfFD=uRpr33CL+1=nWmf4hrnCxUOFisQ@mail.gmail.com>
Date: Wed, 30 May 2012 15:39:44 -0400
From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
To: Christoph Lameter <cl@...ux.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andrew Morton <akpm@...gle.com>, Dave Jones <davej@...hat.com>,
Mel Gorman <mgorman@...e.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
stable@...r.kernel.org, hughd@...gle.com,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/6] Revert "mm: mempolicy: Let vma_merge and vma_split
handle vma->vm_policy linkages"
On Wed, May 30, 2012 at 3:17 PM, Christoph Lameter <cl@...ux.com> wrote:
> On Wed, 30 May 2012, kosaki.motohiro@...il.com wrote:
>
>> From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
>>
>> commit 05f144a0d5 removed vma->vm_policy updates code and it is a purpose of
>> mbind_range(). Now, mbind_range() is virtually no-op. no-op function don't
>> makes any bugs, I agree. but maybe it is not right fix.
>
> I dont really understand the changelog. But to restore the policy_vma() is
> the right thing to do since there are potential multiple use cases where
> we want to apply a policy to a vma.
>
> Proposed new changelog:
>
> Commit 05f144a0d5 folded policy_vma() into mbind_range(). There are
> other use cases of policy_vma(*) though and so revert a piece of
> that commit in order to have a policy_vma() function again.
>
>> @@ -655,23 +676,9 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
>> if (err)
>> goto out;
>> }
>> -
>> - /*
>> - * Apply policy to a single VMA. The reference counting of
>> - * policy for vma_policy linkages has already been handled by
>> - * vma_merge and split_vma as necessary. If this is a shared
>> - * policy then ->set_policy will increment the reference count
>> - * for an sp node.
>> - */
>
> You are dropping the nice comments by Mel that explain the refcounting.
Because this is not strictly correct. 1) vma_merge() and split_vma() don't
care mempolicy refcount. They only dup and drop it. 2) This mpol_get() is
for vma attaching. This function don't need to care sp_node internal.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists