]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fsnotify: destroy marks with call_srcu instead of dedicated thread
authorJeff Layton <jlayton@poochiereds.net>
Sat, 24 Oct 2015 01:37:13 +0000 (21:37 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 24 Oct 2015 02:38:48 +0000 (22:38 -0400)
commit73a084c85e9182919d0116637ec5e01030943452
tree4eeda4e4412d7c4594ba12d027248dfb6962fbbf
parentb805ca58a81a8e408b9ebcacd023e5c6d5d2475e
fsnotify: destroy marks with call_srcu instead of dedicated thread

At the time that this code was originally written, call_srcu didn't
exist, so this thread was required to ensure that we waited for that
SRCU grace period to settle before finally freeing the object.

It does exist now however and we can much more efficiently use call_srcu
to handle this. That also allows us to potentially use srcu_barrier
to ensure that they are all of the callbacks have run before proceeding.
In order to conserve space, we union the rcu_head with the g_list.

This will be necessary for nfsd which will allocate marks from a
dedicated slabcache. We have to be able to ensure that all of the
objects are destroyed before destroying the cache. That's fairly
difficult to ensure with dedicated thread doing the destruction.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/notify/mark.c
include/linux/fsnotify_backend.h