Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537Ab2E3SgK (ORCPT ); Wed, 30 May 2012 14:36:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38461 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197Ab2E3SgJ (ORCPT ); Wed, 30 May 2012 14:36:09 -0400 Date: Wed, 30 May 2012 20:34:06 +0200 From: Andrea Arcangeli To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter Subject: Re: [PATCH 04/35] autonuma: define _PAGE_NUMA_PTE and _PAGE_NUMA_PMD Message-ID: <20120530183406.GH21339@redhat.com> References: <1337965359-29725-1-git-send-email-aarcange@redhat.com> <1337965359-29725-5-git-send-email-aarcange@redhat.com> <20120530182247.GA28341@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120530182247.GA28341@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1337 Lines: 33 Hi Konrad, On Wed, May 30, 2012 at 02:22:49PM -0400, Konrad Rzeszutek Wilk wrote: > Thank you for loking at this from the xen side. The interesting thing > is that I believe the _PAGE_PAT (or _PAGE_PSE) is actually used on > Xen on PTEs. It is used to mark the pages WC. Oops, I'm using _PAGE_PSE too on the pte, but only when it's unmapped. static inline int pte_numa(pte_t pte) { return (pte_flags(pte) & (_PAGE_NUMA_PTE|_PAGE_PRESENT)) == _PAGE_NUMA_PTE; } And _PAGE_UNUSED2 (_PAGE_IOMAP) is used for the pmd but _PAGE_IOMAP by Xen should only be set on ptes. The only way to use _PAGE_PSE safe on the pte is if the pte is non-present, is this what Xen is also doing? (in turn colliding with pte_numa) Now if I shrink the size of the page_autonuma to one entry per pmd (instead of per pte) I may as well drop pte_numa entirely and only leave pmd_numa. At the moment it's possible to switch between the two models at runtime with sysctl (if one wants to do a more expensive granular tracking). I'm still uncertain on the best way to shrink the page_autonuma size we'll see. -- 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/