public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Regression: x86/mm: new _PTE_SWP_SOFT_DIRTY bit conflicts with existing use
@ 2013-08-21 13:48 David Vrabel
  2013-08-21 13:53 ` konrad wilk
                   ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: David Vrabel @ 2013-08-21 13:48 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: Andy Lutomirski, Pavel Emelyanov, Andrew Morton, H. Peter Anvin,
	Ingo Molnar, Xen-devel, linux-kernel@vger.kernel.org,
	Linus Torvalds, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	Jan Beulich

All,

179ef71c (mm: save soft-dirty bits on swapped pages) introduces a new
PTE bit on x86 _PTE_SWP_SOFT_DIRTY which has the same value as _PTE_PSE
and _PTE_PAT.

With a Xen PV guest, the use of the _PTE_PAT will result in the page
having unexpected cachability which will introduce a range of subtle
performance and correctness issues.  Xen programs the entry 4 in the PAT
table with WC so a page that was previously WB will end up as WC.

The use of this bit also appears to preclude the use of (transparent)
huge pages by the application.  It is not clear if there is something
else guaranteeing that that there will be no huge pages.

To fix this regression I suggest one or more of:

1. If no other changes are made, at a mimimum, MEM_SOFT_DIRTY must
require !XEN and possibly !TRANSPARENT_HUGEPAGE and !HUGETLBFS.  This
would prevent this option being enabled on the majority of standard
Linux distributions.

2. Find a different PTE bit to (re)use.

3. Avoid clearing the soft dirty bit when repopulating a swapped out page.

4. Redesign the soft dirty tracking to not require the use of
architecture specific PTE bits.  e.g., by using a shadow set of
structures for the soft dirty bit tracking.

David

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2013-08-27 22:05 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 13:48 Regression: x86/mm: new _PTE_SWP_SOFT_DIRTY bit conflicts with existing use David Vrabel
2013-08-21 13:53 ` konrad wilk
2013-08-21 14:11 ` H. Peter Anvin
2013-08-21 14:19   ` Cyrill Gorcunov
2013-08-21 14:22     ` H. Peter Anvin
2013-08-21 14:29       ` Cyrill Gorcunov
2013-08-21 16:30     ` Linus Torvalds
2013-08-21 16:42       ` Cyrill Gorcunov
2013-08-21 23:05       ` Cyrill Gorcunov
2013-08-21 23:42         ` Andi Kleen
2013-08-22  5:49           ` Cyrill Gorcunov
2013-08-22  6:37             ` Minchan Kim
2013-08-22 13:12               ` Cyrill Gorcunov
2013-08-27 22:04       ` Benjamin Herrenschmidt
2013-08-21 14:12 ` Cyrill Gorcunov
2013-08-21 14:22   ` H. Peter Anvin
2013-08-21 14:53   ` Jan Beulich
2013-08-21 14:58     ` H. Peter Anvin
2013-08-21 15:42     ` Cyrill Gorcunov
2013-08-21 16:03       ` Jan Beulich
2013-08-21 16:19         ` Cyrill Gorcunov
2013-08-21 16:56           ` David Vrabel
2013-08-21 17:25             ` Cyrill Gorcunov
2013-08-21 18:17               ` Cyrill Gorcunov
2013-08-21 18:50                 ` H. Peter Anvin
2013-08-21 19:03                   ` Cyrill Gorcunov
2013-08-21 19:07                     ` Andy Lutomirski
2013-08-21 19:20                       ` Cyrill Gorcunov
2013-08-21 19:21                       ` Pavel Emelyanov
2013-08-21 23:04                     ` Linus Torvalds
2013-08-22  0:51                       ` Dave Jones
2013-08-22  5:44                         ` Cyrill Gorcunov
2013-08-22  6:41                         ` Pavel Emelyanov
2013-08-22  7:47                       ` Jan Beulich
2013-08-22  9:32                       ` David Vrabel
2013-08-22 10:16                         ` Pavel Emelyanov
2013-08-22  6:56           ` Jan Beulich
2013-08-22  7:03             ` Cyrill Gorcunov
2013-08-22  7:27               ` Jan Beulich
2013-08-22 11:27                 ` Cyrill Gorcunov
2013-08-22 11:33                   ` Jan Beulich
2013-08-22 12:18                     ` Pavel Emelyanov
2013-08-21 17:28 ` Andy Lutomirski
2013-08-22  7:54   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox