linux-stable/arch/s390
Martin Schwidefsky 64f31d5802 s390/mm: simplify the TLB flushing code
ptep_flush_lazy and pmdp_flush_lazy use mm->context.attach_count to
decide between a lazy TLB flush vs an immediate TLB flush. The field
contains two 16-bit counters, the number of CPUs that have the mm
attached and can create TLB entries for it and the number of CPUs in
the middle of a page table update.

The __tlb_flush_asce, ptep_flush_direct and pmdp_flush_direct functions
use the attach counter and a mask check with mm_cpumask(mm) to decide
between a local flush local of the current CPU and a global flush.

For all these functions the decision between lazy vs immediate and
local vs global TLB flush can be based on CPU masks. There are two
masks:  the mm->context.cpu_attach_mask with the CPUs that are actively
using the mm, and the mm_cpumask(mm) with the CPUs that have used the
mm since the last full flush. The decision between lazy vs immediate
flush is based on the mm->context.cpu_attach_mask, to decide between
local vs global flush the mm_cpumask(mm) is used.

With this patch all checks will use the CPU masks, the old counter
mm->context.attach_count with its two 16-bit values is turned into a
single counter mm->context.flush_count that keeps track of the number
of CPUs with incomplete page table updates. The sole user of this
counter is finish_arch_post_lock_switch() which waits for the end of
all page table updates.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-06-13 15:58:22 +02:00
..
appldata s390: appldata: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
boot kbuild: delete unnecessary "@:" 2016-04-20 10:36:57 +02:00
configs s390/config: update default configuration 2016-05-23 09:11:37 +02:00
crypto s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
hypfs mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
include s390/mm: simplify the TLB flushing code 2016-06-13 15:58:22 +02:00
kernel s390/mm: simplify the TLB flushing code 2016-06-13 15:58:22 +02:00
kvm s390/time: remove ETR support 2016-06-13 15:58:21 +02:00
lib s390/spinlock: avoid yield to non existent cpu 2016-04-15 18:01:48 +02:00
mm s390/mm: simplify the TLB flushing code 2016-06-13 15:58:22 +02:00
net s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop 2016-05-19 09:14:27 +02:00
numa s390/numa: move numa_init_late() from device to arch_initcall 2016-01-26 12:45:24 +01:00
oprofile s390/oprofile: add z13/z13s model numbers 2016-02-24 12:18:10 +01:00
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-05-18 12:17:16 -07:00
tools s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00
defconfig s390/config: update default configuration 2016-05-23 09:11:37 +02:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
Kconfig.debug arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug 2016-01-09 06:30:49 -08:00
Makefile s390/facilities: add helper tool to generate facility lists 2015-12-18 14:59:20 +01:00