kernel_optimize_test/fs
Shakeel Butt ec16545096 memcg, fsnotify: no oom-kill for remote memcg charging
Commit d46eb14b73 ("fs: fsnotify: account fsnotify metadata to
kmemcg") added remote memcg charging for fanotify and inotify event
objects.  The aim was to charge the memory to the listener who is
interested in the events but without triggering the OOM killer.
Otherwise there would be security concerns for the listener.

At the time, oom-kill trigger was not in the charging path.  A parallel
work added the oom-kill back to charging path i.e.  commit 29ef680ae7
("memcg, oom: move out_of_memory back to the charge path").  So to not
trigger oom-killer in the remote memcg, explicitly add
__GFP_RETRY_MAYFAIL to the fanotigy and inotify event allocations.

Link: http://lkml.kernel.org/r/20190514212259.156585-2-shakeelb@google.com
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Roman Gushchin <guro@fb.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-12 11:05:43 -07:00
..
9p 9p: pass the correct prototype to read_cache_page 2019-07-12 11:05:43 -07:00
adfs
affs
afs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
autofs
befs
bfs
btrfs \n 2019-07-10 20:09:17 -07:00
cachefiles
ceph Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
cifs Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
coda
configfs \n 2019-07-10 20:09:17 -07:00
cramfs
crypto Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
debugfs
devpts
dlm
ecryptfs Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
efivarfs
efs
exportfs
ext2 \n 2019-07-10 20:27:07 -07:00
ext4 Many bug fixes and cleanups, and an optimization for case-insensitive 2019-07-10 21:06:01 -07:00
f2fs
fat
freevxfs
fscache Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
fuse Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
gfs2 Some relatively minor changes for gfs2: 2019-07-10 21:20:05 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2
jffs2 jffs2: pass the correct prototype to read_cache_page 2019-07-12 11:05:43 -07:00
jfs
kernfs
lockd
minix
nfs Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
nfs_common
nfsd nfsd: Make __get_nfsdfs_client() static 2019-07-09 19:36:33 -04:00
nilfs2
nls
notify memcg, fsnotify: no oom-kill for remote memcg charging 2019-07-12 11:05:43 -07:00
ntfs
ocfs2 ocfs2: use kmemdup rather than duplicating its implementation 2019-07-12 11:05:41 -07:00
omfs
openpromfs
orangefs
overlayfs
proc \n 2019-07-10 20:09:17 -07:00
pstore
qnx4
qnx6
quota \n 2019-07-10 20:27:07 -07:00
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs \n 2019-07-10 20:09:17 -07:00
ubifs fscrypt updates for v5.3 2019-07-10 20:51:03 -07:00
udf \n 2019-07-10 20:27:07 -07:00
ufs
unicode Many bug fixes and cleanups, and an optimization for case-insensitive 2019-07-10 21:06:01 -07:00
xfs Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2019-07-10 21:42:03 -07:00
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c
d_path.c
dax.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c
fsopen.c
inode.c Changes to copy_file_range for 5.3 from Dave and Amir: 2019-07-10 20:32:37 -07:00
internal.h
io_uring.c
ioctl.c
iomap.c New for 5.3: 2019-07-10 20:29:45 -07:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c Highlights: 2019-07-10 21:22:43 -07:00
Makefile
mbcache.c
mount.h
mpage.c
namei.c
namespace.c
no-block.c
nsfs.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c