Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966084AbbKFAcO (ORCPT ); Thu, 5 Nov 2015 19:32:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49981 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965927AbbKFAcM (ORCPT ); Thu, 5 Nov 2015 19:32:12 -0500 Date: Thu, 5 Nov 2015 16:32:11 -0800 From: Andrew Morton To: "Kirill A. Shutemov" Cc: Andrea Arcangeli , Hugh Dickins , Naoya Horiguchi , Sasha Levin , Minchan Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vladimir Davydov Subject: Re: [PATCH 4/4] mm: prepare page_referenced() and page_idle to new THP refcounting Message-Id: <20151105163211.608eec970de21a95faf6e156@linux-foundation.org> In-Reply-To: <1446564375-72143-5-git-send-email-kirill.shutemov@linux.intel.com> References: <1446564375-72143-1-git-send-email-kirill.shutemov@linux.intel.com> <1446564375-72143-5-git-send-email-kirill.shutemov@linux.intel.com> 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: 1267 Lines: 35 On Tue, 3 Nov 2015 17:26:15 +0200 "Kirill A. Shutemov" wrote: > I've missed two simlar codepath which need some preparation to work well > with reworked THP refcounting. > > Both page_referenced() and page_idle_clear_pte_refs_one() assume that > THP can only be mapped with PMD, so there's no reason to look on PTEs > for PageTransHuge() pages. That's no true anymore: THP can be mapped > with PTEs too. > > The patch removes PageTransHuge() test from the functions and opencode > page table check. x86_64 allnoconfig: In file included from mm/rmap.c:47: include/linux/mm.h: In function 'page_referenced': include/linux/mm.h:448: error: call to '__compiletime_assert_448' declared with attribute error: BUILD_BUG failed make[1]: *** [mm/rmap.o] Error 1 make: *** [mm/rmap.o] Error 2 because #else /* CONFIG_TRANSPARENT_HUGEPAGE */ #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) btw, total_mapcount() is far too large to be inlined and page_mapcount() is getting pretty bad too. -- 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/