linux-bl808/kernel
Johannes Weiner 9d82c69438 mm: memcontrol: convert anon and file-thp to new mem_cgroup_charge() API
With the page->mapping requirement gone from memcg, we can charge anon and
file-thp pages in one single step, right after they're allocated.

This removes two out of three API calls - especially the tricky commit
step that needed to happen at just the right time between when the page is
"set up" and when it's "published" - somewhat vague and fluid concepts
that varied by page type.  All we need is a freshly allocated page and a
memcg context to charge.

v2: prevent double charges on pre-allocated hugepages in khugepaged

[hannes@cmpxchg.org: Fix crash - *hpage could be ERR_PTR instead of NULL]
  Link: http://lkml.kernel.org/r/20200512215813.GA487759@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Qian Cai <cai@lca.pw>
Link: http://lkml.kernel.org/r/20200508183105.225460-13-hannes@cmpxchg.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-03 20:09:48 -07:00
..
bpf mm: remove vmalloc_user_node_flags 2020-06-02 10:59:11 -07:00
cgroup
configs
debug
dma dma-mapping: use vmap insted of reimplementing it 2020-06-02 10:59:10 -07:00
events mm: memcontrol: convert anon and file-thp to new mem_cgroup_charge() API 2020-06-03 20:09:48 -07:00
gcov
irq
livepatch
locking The biggest change to core locking facilities in this cycle is the introduction 2020-06-01 13:03:31 -07:00
power PM: hibernate: Restrict writes to the resume device 2020-05-27 17:55:59 +02:00
printk The RCU updates for this cycle were: 2020-06-01 12:56:29 -07:00
rcu Merge branch 'WIP.core/rcu' into core/rcu, to pick up two x86/entry dependencies 2020-06-01 11:47:29 +02:00
sched arm64 updates for 5.8 2020-06-01 15:18:27 -07:00
time
trace for-5.8/block-2020-06-01 2020-06-02 15:29:19 -07:00
.gitignore
acct.c
async.c
audit.c audit/stable-5.8 PR 20200601 2020-06-02 17:13:37 -07:00
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c audit: add subj creds to NETFILTER_CFG record to 2020-05-20 18:09:19 -04:00
backtracetest.c
bounds.c
capability.c
compat.c
configs.c
context_tracking.c
cpu.c
cpu_pm.c
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c Merge branch 'uaccess.readdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-06-01 16:11:38 -07:00
extable.c
fail_function.c
fork.c arm64 updates for 5.8 2020-06-01 15:18:27 -07:00
freezer.c
futex.c
gen_kheaders.sh
groups.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec.c
kexec_core.c
kexec_elf.c
kexec_file.c
kexec_internal.h
kheaders.c
kmod.c
kprobes.c kprobes: Prevent probes in .noinstr.text section 2020-05-19 15:56:20 +02:00
ksysfs.c
kthread.c
latencytop.c
Makefile
module-internal.h
module.c Merge branch 'akpm' (patches from Andrew) 2020-06-02 12:21:36 -07:00
module_signature.c
module_signing.c
notifier.c mm: remove vmalloc_sync_(un)mappings() 2020-06-02 10:59:12 -07:00
nsproxy.c
padata.c padata: add basic support for multithreaded jobs 2020-06-03 20:09:45 -07:00
panic.c
params.c
pid.c
pid_namespace.c
profile.c
ptrace.c
range.c
reboot.c printk: Collapse shutdown types into a single dump reason 2020-05-30 10:34:03 -07:00
relay.c
resource.c
rseq.c
scs.c
seccomp.c
signal.c Merge branch 'work.set_fs-exec' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-06-01 16:21:46 -07:00
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
stop_machine.c
sys.c Merge branch 'akpm' (patches from Andrew) 2020-06-02 12:21:36 -07:00
sys_ni.c
sysctl-test.c
sysctl.c
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c
watchdog_hld.c
workqueue.c
workqueue_internal.h