[lkml]   [2012]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/2] x86/mm: remove arch-specific PTE/PMD get-and-clear functions
On Wed, Jun 13, 2012 at 11:20:43AM +0100, David Vrabel wrote:
> This series removes the x86-specific implementation of
> ptep_get_and_clear() and pmdp_get_and_clear().
> The principal reason for this is it allows Xen paravitualized guests
> to batch the PTE clears which is a significant performance
> optimization of munmap() and mremap() -- the number of entries into
> the hypervisor is reduced by about a factor of about 30 (60 in 32-bit
> guests) for munmap().
> There may be minimal gains on native and KVM guests due to the removal
> of the locked xchg.

What about lguest?
> Removal of arch-specific functions where generic ones are suitable
> seems to be a generally useful thing to me.
> The full reasoning for why this is safe is included in the commit
> message of patch 1 but to summarize. The atomic get-and-clear does
> not guarantee that the latest dirty/accessed bits are returned as TLB
> as there is a still a window after the get-and-clear and before the
> TLB flush that the bits may be updated on other processors. So, user
> space applications accessing pages that are being unmapped or remapped
> already have unpredictable behaviour.
> David

 \ /
  Last update: 2012-06-13 16:41    [W:0.132 / U:1.032 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site