All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow preemption during lazy mmu updates
@ 2009-03-27 18:02 Jeremy Fitzhardinge
  2009-03-27 18:02 ` [PATCH 1/8] mm: disable preemption in apply_to_pte_range Jeremy Fitzhardinge
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Jeremy Fitzhardinge @ 2009-03-27 18:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: the arch/x86 maintainers, Ingo Molnar, Linux Kernel Mailing List,
	Peter Zijlstra, Nick Piggin, Thomas Gleixner

Hi all,

We discussed this series a while ago.  The specific problem
was the need to disable preemption in apply_to_pte_range when using
lazy mmu updates around the callback function.  When used on usermode
addresses there was no problem because it needs to take the pte
lock anyway, but there's no requirement for taking a pte lock when
updating kernel ptes, so it ended up adding a new no-preempt region.

The gist of the series is that if we get preempted while doing an mmu
update, we flush all the pending updates and switch to the next task.
We record that the task was doing a lazy mmu update in its task flags,
and resume lazy updates when we switch back.

All the context-switch time activity happens in the existing
context-switch pvops calls, so there's no cost to non-pvops systems,
or to pvops backends which don't use lazy mmu updates.

I don't think there were any objections to this series, but Ingo would
like to see an Acked by from someone since it gets into the mm side
of things.

(The first patch in the series adds the required preempt disable/enable
and then the rest of the series removes them again.  I think the first
patch is already in mm-.)

Thanks,
	J

 arch/x86/include/asm/paravirt.h    |   22 +++++++-------
 arch/x86/include/asm/pgtable.h     |    2 +
 arch/x86/include/asm/thread_info.h |    2 +
 arch/x86/kernel/kvm.c              |    2 -
 arch/x86/kernel/paravirt.c         |   56 +++++++++++++++++--------------------
 arch/x86/kernel/process_32.c       |    2 -
 arch/x86/kernel/process_64.c       |    2 -
 arch/x86/kernel/vmi_32.c           |   20 ++++++++-----
 arch/x86/lguest/boot.c             |   16 +++++++---
 arch/x86/mm/fault.c                |    6 +--
 arch/x86/mm/highmem_32.c           |    2 -
 arch/x86/mm/iomap_32.c             |    2 -
 arch/x86/mm/pageattr.c             |   14 ---------
 arch/x86/xen/enlighten.c           |   10 ++----
 arch/x86/xen/mmu.c                 |   20 +++++--------
 arch/x86/xen/xen-ops.h             |    1 
 include/asm-frv/pgtable.h          |    4 +-
 include/asm-generic/pgtable.h      |   21 +++++++------
 kernel/sched.c                     |    2 -
 19 files changed, 96 insertions(+), 110 deletions(-)


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

end of thread, other threads:[~2009-04-20  6:05 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 18:02 [PATCH] Allow preemption during lazy mmu updates Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 1/8] mm: disable preemption in apply_to_pte_range Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 2/8] x86/paravirt: remove lazy mode in interrupts Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 3/8] x86/pvops: replace arch_enter_lazy_cpu_mode with arch_start_context_switch Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 4/8] x86/paravirt: flush pending mmu updates on context switch Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 5/8] x86/paravirt: finish change from lazy cpu to context switch start/end Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 6/8] x86/paravirt: allow preemption with lazy mmu mode Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 7/8] mm: allow preemption in apply_to_pte_range Jeremy Fitzhardinge
2009-04-07 21:38   ` Andrew Morton
2009-04-07 21:54     ` Jeremy Fitzhardinge
2009-03-27 18:02 ` [PATCH 8/8] x86/paravirt: use percpu_ rather than __get_cpu_var Jeremy Fitzhardinge
2009-03-27 23:48 ` [PATCH] Allow preemption during lazy mmu updates Peter Zijlstra
2009-04-08 14:54 ` Ingo Molnar
2009-04-08 15:11   ` Peter Zijlstra
2009-04-19 10:15     ` Avi Kivity
2009-04-19 10:47       ` Peter Zijlstra
2009-04-19 23:53       ` Jeremy Fitzhardinge
2009-04-20  6:02         ` Avi Kivity
2009-04-08 17:32   ` Jeremy Fitzhardinge
2009-04-08 18:10     ` David Howells
2009-04-08 18:30       ` [PATCH] FRV: Use <asm-generic/pgtable.h> in NOMMU mode David Howells
2009-04-08 18:35         ` Jeremy Fitzhardinge
2009-04-08 18:47           ` David Howells
2009-04-08 18:44         ` Sam Ravnborg
2009-04-08 18:47           ` David Howells
2009-04-08 20:56             ` Sam Ravnborg
2009-04-08 21:25               ` David Howells
2009-04-08 21:40                 ` Sam Ravnborg
2009-04-08 21:48                   ` David Howells
2009-04-08 22:04                     ` Sam Ravnborg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.