Re: [PATCHv3 4/5] mm: make compound_head() robust
From: Christoph Lameter <hidden>
Date: 2015-08-21 21:15:39
Also in:
lkml
On Fri, 21 Aug 2015, Andrew Morton wrote:
On Fri, 21 Aug 2015 22:31:09 +0300 "Kirill A. Shutemov" [off-list ref] wrote:quoted
On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote:quoted
On Fri, 21 Aug 2015, Kirill A. Shutemov wrote:quoted
quoted
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.
virt_to_head_page will run PageTail because it uses compound_head(). And compound_head needs to use the first_page pointer if its a tail page. -- 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>