From: Rik van Riel <riel@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Hugh Dickins <hughd@google.com>, Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH 1/4] hugetlb, rmap: always use anon_vma root pointer
Date: Fri, 10 Sep 2010 22:09:32 -0400 [thread overview]
Message-ID: <4C8AE4DC.3030308@redhat.com> (raw)
In-Reply-To: <20100910235022.74ec04de@basil.nowhere.org>
On 09/10/2010 05:50 PM, Andi Kleen wrote:
> On Fri, 10 Sep 2010 10:19:24 -0700
> Linus Torvalds<torvalds@linux-foundation.org> wrote:
>
>> On Thu, Sep 9, 2010 at 9:23 PM, Naoya Horiguchi
>> <n-horiguchi@ah.jp.nec.com> wrote:
>>> This patch applies Andrea's fix given by the following patch into
>>> hugepage rmapping code:
>>>
>>> commit 288468c334e98aacbb7e2fb8bde6bc1adcd55e05
>>> Author: Andrea Arcangeli<aarcange@redhat.com>
>>> Date: Mon Aug 9 17:19:09 2010 -0700
>>>
>>> This patch uses anon_vma->root and avoids unnecessary overwriting
>>> when anon_vma is already set up.
>>
>> Btw, why isn't the code in __page_set_anon_rmap() also doing this
>> cleaner version (ie a single "if (PageAnon(page)) return;" up front)?
>
> Perhaps I misunderstand the question, but __page_set_anon_rmap
> should handle Anon pages, shouldn't it?
__page_set_anon_rmap sets the page->mapping to be
a pointer to the anon_vma & PAGE_MAPPING_ANON.
PageAnon tests for page->mapping & PAGE_MAPPING_ANON,
ie. whether page->mapping is already pointing to an
anon_vma.
If it is, __page_set_anon_rmap should leave the page
mapping pointer alone.
--
All rights reversed
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-09-11 2:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 4:23 [PATCH 0/4] hugetlb, rmap: fixes and cleanups Naoya Horiguchi
2010-09-10 4:23 ` [PATCH 1/4] hugetlb, rmap: always use anon_vma root pointer Naoya Horiguchi
2010-09-10 14:37 ` Andrea Arcangeli
2010-09-10 14:40 ` Rik van Riel
2010-09-10 17:19 ` Linus Torvalds
2010-09-10 21:50 ` Andi Kleen
2010-09-10 22:07 ` Linus Torvalds
2010-09-11 2:09 ` Rik van Riel [this message]
2010-09-10 4:23 ` [PATCH 2/4] hugetlb, rmap: use hugepage_add_new_anon_rmap() in hugetlb_cow() Naoya Horiguchi
2010-09-10 14:39 ` Andrea Arcangeli
2010-09-10 14:40 ` Rik van Riel
2010-09-10 4:23 ` [PATCH 3/4] hugetlb, rmap: fix confusing page locking " Naoya Horiguchi
2010-09-10 14:41 ` Rik van Riel
2010-09-10 17:15 ` Linus Torvalds
2010-09-23 23:50 ` Naoya Horiguchi
2010-09-10 4:23 ` [PATCH 4/4] hugetlb, rmap: add BUG_ON(!PageLocked) in hugetlb_add_anon_rmap() Naoya Horiguchi
2010-09-10 14:42 ` Rik van Riel
2010-09-10 14:44 ` Andrea Arcangeli
2010-09-10 9:04 ` [PATCH 0/4] hugetlb, rmap: fixes and cleanups Andi Kleen
2010-09-10 11:47 ` Naoya Horiguchi
2010-09-10 14:30 ` Andi Kleen
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=4C8AE4DC.3030308@redhat.com \
--to=riel@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=peterz@infradead.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).