Whamcloud - gitweb
LU-14428 libcfs: simplify task management in tracefile.c 92/41492/7
authorMr NeilBrown <neilb@suse.de>
Tue, 9 Feb 2021 02:33:31 +0000 (13:33 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:10:53 +0000 (02:10 +0000)
commit6c5e6dd777a49ab06c38b880990b15393509ca87
tree8e27b7cae3e2964fbe6b8dcd3150373322f6d9b5
parent9eb9474c41c823c70f34e6bb102a8861ca21a3d1
LU-14428 libcfs: simplify task management in tracefile.c

The waitqueue, mutex, and two completions are not needed.
We can use kthread_stop/kthread_should_stop to synchronize
shutdown, cmpxchg() to ensure only one task is started, and a simple
wake_up_process() to wake the process.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I45390c2cb58b09a85033a7006412a0e2033130c5
Reviewed-on: https://review.whamcloud.com/41492
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/tracefile.c
libcfs/libcfs/tracefile.h