summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-03-02 10:31:25 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-06 04:20:22 -0800
commit1a6cc3b1a903b6a133467dccb05ad938c852680c (patch)
tree258768939823daa7c077e91e02a376e587444ff6 /samples
parentf8b1c4a8d83cbb80222e4b51cc55f37b5a9087de (diff)
staging: lustre: obdclass: use workqueue for zombie management.
obdclass currently maintains two lists of data structures (imports and exports), and a kthread which will free anything on either list. The thread is woken whenever anything is added to either list. This is exactly the sort of thing that workqueues exist for. So discard the zombie kthread and the lists and locks, and create a single workqueue. Each obd_import and obd_export gets a work_struct to attach to this workqueue. This requires a small change to import_sec_validate_get() which was testing if an obd_import was on the zombie list. This cannot have every safely found it to be on the list (as it could be freed asynchronously) so it must be dead code. We could use system_wq instead of creating a dedicated zombie_wq, but as we occasionally want to flush all pending work, it is a little nicer to only have to wait for our own work items. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions