Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752612AbbHUTfB (ORCPT ); Fri, 21 Aug 2015 15:35:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37120 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbbHUTfA (ORCPT ); Fri, 21 Aug 2015 15:35:00 -0400 Date: Fri, 21 Aug 2015 12:34:58 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: Christoph Lameter , "Kirill A. Shutemov" , Hugh Dickins , Andrea Arcangeli , Dave Hansen , Vlastimil Babka , Johannes Weiner , Michal Hocko , David Rientjes , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv3 4/5] mm: make compound_head() robust Message-Id: <20150821123458.b3a6947135d5b506a34abc61@linux-foundation.org> In-Reply-To: <20150821193109.GA14785@node.dhcp.inet.fi> References: <1439976106-137226-1-git-send-email-kirill.shutemov@linux.intel.com> <1439976106-137226-5-git-send-email-kirill.shutemov@linux.intel.com> <20150820163643.dd87de0c1a73cb63866b2914@linux-foundation.org> <20150821121028.GB12016@node.dhcp.inet.fi> <20150821193109.GA14785@node.dhcp.inet.fi> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1270 Lines: 31 On Fri, 21 Aug 2015 22:31:09 +0300 "Kirill A. Shutemov" wrote: > On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: > > On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: > > > > > > Is this really true? For example if it's a slab page, will that page > > > > ever be inspected by code which is looking for the PageTail bit? > > > > > > +Christoph. > > > > > > What we know for sure is that space is not used in tail pages, otherwise > > > it would collide with current compound_dtor. > > > > Sl*b allocators only do a virt_to_head_page on tail pages. > > The question was whether it's safe to assume that the bit 0 is always zero > in the word as this bit will encode PageTail(). That wasn't my question actually... What I'm wondering is: if this page is being used for slab, will any code path ever run PageTail() against it? If not, we don't need to be concerned about that bit. And slab was just the example I chose. The same question petains to all other uses of that union. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/