Michal Hocko
1860033237
mm: make PR_SET_THP_DISABLE immediately active
...
PR_SET_THP_DISABLE has a rather subtle semantic. It doesn't affect any
existing mapping because it only updated mm->def_flags which is a
template for new mappings.
The mappings created after prctl(PR_SET_THP_DISABLE) have VM_NOHUGEPAGE
flag set. This can be quite surprising for all those applications which
do not do prctl(); fork() & exec() and want to control their own THP
behavior.
Another usecase when the immediate semantic of the prctl might be useful
is a combination of pre- and post-copy migration of containers with
CRIU. In this case CRIU populates a part of a memory region with data
that was saved during the pre-copy stage. Afterwards, the region is
registered with userfaultfd and CRIU expects to get page faults for the
parts of the region that were not yet populated. However, khugepaged
collapses the pages and the expected page faults do not occur.
In more general case, the prctl(PR_SET_THP_DISABLE) could be used as a
temporary mechanism for enabling/disabling THP process wide.
Implementation wise, a new MMF_DISABLE_THP flag is added. This flag is
tested when decision whether to use huge pages is taken either during
page fault of at the time of THP collapse.
It should be noted, that the new implementation makes PR_SET_THP_DISABLE
master override to any per-VMA setting, which was not the case
previously.
Fixes: a0715cc226 ("mm, thp: add VM_INIT_DEF_MASK and PRCTL_THP_DISABLE")
Link: http://lkml.kernel.org/r/1496415802-30944-1-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-10 16:32:31 -07:00
..
bpf
Merge branch 'work.memdup_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-05 16:05:24 -07:00
cgroup
mm, cpuset: always use seqlock when changing task's nodemask
2017-07-06 16:24:34 -07:00
configs
config: android-base: disable CONFIG_NFSD and CONFIG_NFS_FS
2017-06-09 11:47:38 +02:00
debug
events
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2017-07-05 12:31:59 -07:00
gcov
gcov: support GCC 7.1
2017-05-12 15:57:15 -07:00
irq
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2017-07-09 10:24:46 -07:00
livepatch
livepatch: Fix stacking of patches with respect to RCU
2017-06-20 10:42:19 +02:00
locking
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2017-07-09 10:47:50 -07:00
power
kernel/power/snapshot.c: use linux/set_memory.h
2017-07-06 16:24:30 -07:00
printk
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk
2017-07-05 11:11:26 -07:00
rcu
rcu: Remove RCU CPU stall warnings from Tiny RCU
2017-06-08 18:52:45 -07:00
sched
sched/fair: Fix load_balance() affinity redo path
2017-07-05 16:28:48 +02:00
time
Merge branch 'timers-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-05 15:34:35 -07:00
trace
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2017-07-09 10:49:47 -07:00
.gitignore
acct.c
async.c
async: Adjust system_state checks
2017-05-23 10:01:37 +02:00
audit.c
Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit
2017-07-05 11:24:05 -07:00
audit.h
audit: style fix
2017-06-12 18:07:43 -04:00
audit_fsnotify.c
Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
2017-05-03 11:05:15 -07:00
audit_tree.c
Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
2017-05-03 11:05:15 -07:00
audit_watch.c
Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
2017-05-03 11:05:15 -07:00
auditfilter.c
audit: kernel generated netlink traffic should have a portid of 0
2017-05-02 10:16:05 -04:00
auditsc.c
Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/audit
2017-07-05 11:24:05 -07:00
backtracetest.c
bounds.c
capability.c
compat.c
Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-06 20:57:13 -07:00
configs.c
context_tracking.c
cpu.c
smp/hotplug: Move unparking of percpu threads to the control CPU
2017-07-06 10:55:10 +02:00
cpu_pm.c
crash_core.c
ia64: reuse append_elf_note() and final_note() functions
2017-05-08 17:15:11 -07:00
crash_dump.c
cred.c
doc: ReSTify credentials.txt
2017-05-18 10:30:19 -06:00
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c
fix waitid(2) breakage
2017-07-08 11:26:39 -04:00
extable.c
kernel/extable.c: mark core_kernel_text notrace
2017-07-06 16:24:29 -07:00
fork.c
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2017-07-09 10:52:16 -07:00
freezer.c
futex.c
There has been a fair amount of activity in the docs tree this time
2017-07-03 21:13:25 -07:00
futex_compat.c
groups.c
mm, vmalloc: use __GFP_HIGHMEM implicitly
2017-05-08 17:15:13 -07:00
hung_task.c
kernel/hung_task.c: defer showing held locks
2017-05-08 17:15:10 -07:00
irq_work.c
jump_label.c
jump_label: Reorder hotplug lock and jump_label_lock
2017-05-26 10:10:45 +02:00
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kcov: simplify interrupt check
2017-05-08 17:15:12 -07:00
kexec.c
kexec_core.c
objtool, x86: Add several functions and files to the objtool whitelist
2017-06-30 10:19:19 +02:00
kexec_file.c
kimage_file_prepare_segments(): don't open-code memdup_user()
2017-06-30 02:04:10 -04:00
kexec_internal.h
kmod.c
kprobes.c
kprobes: Ensure that jprobe probepoints are at function entry
2017-07-08 11:05:35 +02:00
ksysfs.c
crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE
2017-05-08 17:15:11 -07:00
kthread.c
latencytop.c
Makefile
crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE
2017-05-08 17:15:11 -07:00
membarrier.c
memremap.c
mm, memory_hotplug: replace for_device by want_memblock in arch_add_memory
2017-07-06 16:24:32 -07:00
module-internal.h
module.c
Merge branch 'akpm' (patches from Andrew)
2017-07-06 22:27:08 -07:00
module_signing.c
notifier.c
nsproxy.c
padata.c
padata: Avoid nested calls to cpus_read_lock() in pcrypt_init_padata()
2017-05-26 10:10:37 +02:00
panic.c
params.c
pid.c
mm: update callers to use HASH_ZERO flag
2017-07-06 16:24:33 -07:00
pid_namespace.c
pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
2017-05-13 17:26:01 -05:00
profile.c
ptrace.c
ptrace: Properly initialize ptracer_cred on fork
2017-05-23 07:40:44 -05:00
range.c
reboot.c
relay.c
Merge branch 'work.splice' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-05-02 11:38:06 -07:00
resource.c
seccomp.c
seccomp: Switch from atomic_t to recount_t
2017-06-26 09:24:00 -07:00
signal.c
Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2017-07-06 20:57:13 -07:00
smp.c
smp, cpumask: Use non-atomic cpumask_{set,clear}_cpu()
2017-05-23 10:01:32 +02:00
smpboot.c
smpboot.h
softirq.c
stacktrace.c
stop_machine.c
stop_machine: Provide stop_machine_cpuslocked()
2017-05-26 10:10:36 +02:00
sys.c
mm: make PR_SET_THP_DISABLE immediately active
2017-07-10 16:32:31 -07:00
sys_ni.c
sysctl.c
proc/sysctl: fix the int overflow for jiffies conversion
2017-05-08 17:15:10 -07:00
sysctl_binary.c
sysctl: switch to use uuid_t
2017-06-05 16:59:15 +02:00
task_work.c
taskstats.c
taskstats: add e/u/stime for TGID command
2017-05-08 17:15:12 -07:00
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c
watchdog_hld.c
workqueue.c
sched/wait: Rename wait_queue_t => wait_queue_entry_t
2017-06-20 12:18:27 +02:00
workqueue_internal.h