Re: [PATCHv12 26/37] mm: rework mapcount accounting to enable 4k mapping of THPs

From: Naoya Horiguchi
Date: Fri Oct 30 2015 - 04:34:40 EST


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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/