From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030533AbbJ3Iee (ORCPT ); Fri, 30 Oct 2015 04:34:34 -0400 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:32773 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932151AbbJ3Iea convert rfc822-to-8bit (ORCPT ); Fri, 30 Oct 2015 04:34:30 -0400 From: Naoya Horiguchi To: "Kirill A. Shutemov" CC: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , "Hugh Dickins" , Dave Hansen , Mel Gorman , Rik van Riel , Vlastimil Babka , Christoph Lameter , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , "Sasha Levin" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCHv12 26/37] mm: rework mapcount accounting to enable 4k mapping of THPs Thread-Topic: [PATCHv12 26/37] mm: rework mapcount accounting to enable 4k mapping of THPs Thread-Index: AQHRAEsv88Gii0cHZ0Oxr3kSogiQaZ5+Zv4AgAA154CAAOjcgIADCoWAgACzp4A= Date: Fri, 30 Oct 2015 08:33:48 +0000 Message-ID: <20151030083347.GA8259@hori1.linux.bs1.fc.nec.co.jp> References: <1444145044-72349-1-git-send-email-kirill.shutemov@linux.intel.com> <1444145044-72349-27-git-send-email-kirill.shutemov@linux.intel.com> <20151027061800.GA336@hori1.linux.bs1.fc.nec.co.jp> <20151027093055.GA27031@node.shutemov.name> <20151027232421.GA15946@hori1.linux.bs1.fc.nec.co.jp> <20151029215047.GB13368@node.shutemov.name> In-Reply-To: <20151029215047.GB13368@node.shutemov.name> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.6] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <8697FC5661FBFB4F90C830E94D1D80BE@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2015 at 11:50:47PM +0200, Kirill A. Shutemov wrote: ... > > Okay, the problem is that the page was freed under stable_page_flags(). > > Is the code performance sensitive? Can we get reference to the page before > touching it? If not, we can rewrite the helper like this: > > static inline int PageDoubleMap(struct page *page) > { > return PageHead(page) && test_bit(PG_double_map, &page[1].flags); > } > > Just dropping the check would be wrong, I think, as we access the next > page. > I don't think this interface is performance sensitive, but hopefully the impact on other workload is minimum. So I like the above rewritten one. Thanks, Naoya Horiguchi