summaryrefslogtreecommitdiff
path: root/fs/notify/fanotify/fanotify.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-02-17 21:11:18 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-19 00:23:24 (GMT)
commit13d34ac6e55b8284c592c67e166ac614b3c4c1d7 (patch)
tree264072d218397d7d4e1ad109f94ac72285c11a22 /fs/notify/fanotify/fanotify.h
parent48f7df329474b49d83d0dffec1b6186647f11976 (diff)
downloadlinux-13d34ac6e55b8284c592c67e166ac614b3c4c1d7.tar.xz
Revert "fsnotify: destroy marks with call_srcu instead of dedicated thread"
This reverts commit c510eff6beba ("fsnotify: destroy marks with call_srcu instead of dedicated thread"). Eryu reported that he was seeing some OOM kills kick in when running a testcase that adds and removes inotify marks on a file in a tight loop. The above commit changed the code to use call_srcu to clean up the marks. While that does (in principle) work, the srcu callback job is limited to cleaning up entries in small batches and only once per jiffy. It's easily possible to overwhelm that machinery with too many call_srcu callbacks, and Eryu's reproduer did just that. There's also another potential problem with using call_srcu here. While you can obviously sleep while holding the srcu_read_lock, the callbacks run under local_bh_disable, so you can't sleep there. It's possible when putting the last reference to the fsnotify_mark that we'll end up putting a chain of references including the fsnotify_group, uid, and associated keys. While I don't see any obvious ways that that could occurs, it's probably still best to avoid using call_srcu here after all. This patch reverts the above patch. A later patch will take a different approach to eliminated the dedicated thread here. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Reported-by: Eryu Guan <guaneryu@gmail.com> Tested-by: Eryu Guan <guaneryu@gmail.com> Cc: Jan Kara <jack@suse.com> Cc: Eric Paris <eparis@parisplace.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/notify/fanotify/fanotify.h')
0 files changed, 0 insertions, 0 deletions