]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: clear pmd_numa before invalidating
authorMel Gorman <mgorman@suse.de>
Mon, 16 Dec 2013 23:44:43 +0000 (10:44 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 16 Dec 2013 23:44:43 +0000 (10:44 +1100)
commit38eef1a41e54841a38cd0198e8a59a0ffa922093
tree81d37160104736e857eccea39295f1122f2dfe45
parentf09801997c4ae387088ffada54a3f91fadc4769a
mm: clear pmd_numa before invalidating

On x86, PMD entries are similar to _PAGE_PROTNONE protection and are
handled as NUMA hinting faults.  The following two page table protection
bits are what defines them

_PAGE_NUMA:set _PAGE_PRESENT:clear

A PMD is considered present if any of the _PAGE_PRESENT, _PAGE_PROTNONE,
_PAGE_PSE or _PAGE_NUMA bits are set.  If pmdp_invalidate encounters a
pmd_numa, it clears the present bit leaving _PAGE_NUMA which will be
considered not present by the CPU but present by pmd_present.  The
existing caller of pmdp_invalidate should handle it but it's an
inconsistent state for a PMD.  This patch keeps the state consistent when
calling pmdp_invalidate.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/pgtable-generic.c