[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130426153104.92450E0085@blue.fi.intel.com>
Date: Fri, 26 Apr 2013 18:31:04 +0300 (EEST)
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Dave Hansen <dave@...1.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
Hugh Dickins <hughd@...gle.com>,
Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
Andi Kleen <ak@...ux.intel.com>,
Matthew Wilcox <matthew.r.wilcox@...el.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Hillf Danton <dhillf@...il.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3, RFC 32/34] thp: handle write-protect exception to
file-backed huge pages
Dave Hansen wrote:
> > + if (!PageAnon(page)) {
> > + add_mm_counter(mm, MM_FILEPAGES, -HPAGE_PMD_NR);
> > + add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);
> > + }
>
> This seems like a bit of a hack. Shouldn't we have just been accounting
> to MM_FILEPAGES in the first place?
No, it's not.
It handles MAP_PRIVATE file mappings. The page was read first and
accounted to MM_FILEPAGES and then COW'ed by anon page here, so we have to
adjust counters. do_wp_page() has similar code.
--
Kirill A. Shutemov
--
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