From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751000AbbCDU4u (ORCPT ); Wed, 4 Mar 2015 15:56:50 -0500 Received: from mta-out1.inet.fi ([62.71.2.203]:55876 "EHLO jenni1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750722AbbCDU4t (ORCPT ); Wed, 4 Mar 2015 15:56:49 -0500 Date: Wed, 4 Mar 2015 22:56:14 +0200 From: "Kirill A. Shutemov" To: Christoph Lameter Cc: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Dave Hansen , Hugh Dickins , Mel Gorman , Rik van Riel , Vlastimil Babka , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 03/24] mm: avoid PG_locked on tail pages Message-ID: <20150304205614.GA19606@node.dhcp.inet.fi> References: <1425486792-93161-1-git-send-email-kirill.shutemov@linux.intel.com> <1425486792-93161-4-git-send-email-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2015 at 12:48:54PM -0600, Christoph Lameter wrote: > On Wed, 4 Mar 2015, Kirill A. Shutemov wrote: > > > index c851ff92d5b3..58b98bced299 100644 > > --- a/include/linux/page-flags.h > > +++ b/include/linux/page-flags.h > > @@ -207,7 +207,8 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; } > > > > struct page; /* forward declaration */ > > > > -TESTPAGEFLAG(Locked, locked) > > +#define PageLocked(page) test_bit(PG_locked, &compound_head(page)->flags) > > + > > PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) > > Hmmm... Now one of the pageflag functions operates on the head page unlike > the other pageflag functions that only operate on the flag indicated. > > Given that pageflags provide a way to implement checks for head / tail > pages this seems to be a bad idea. I agree, I need to take more systematic look on page flags vs. compound pages. I'll try to come up with something before the summit. -- Kirill A. Shutemov