Whamcloud - gitweb
LU-12780 llite: avoid ptlrpc_thread for ll_statahead_thread 59/36259/6
authorMr NeilBrown <neilb@suse.de>
Wed, 23 Oct 2019 00:30:49 +0000 (11:30 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Feb 2020 05:51:03 +0000 (05:51 +0000)
commit6bf49037b3a1345877692a6ba6d92f579a8e2442
treea6ff7948f3c4469ee47896891d8438601d9debfd
parent5b630935452d5d8d7529d9ed267885f1ae11b450
LU-12780 llite: avoid ptlrpc_thread for ll_statahead_thread

Instead of ptlrpc_thread use more direct interfaces.

- Instead of waiting for thread startup to complete, perform
  the startup before starting the thread.
- as nothing waits for the thread to finish we cannot use
  kthread_should_stop().  Instead, set the task pointer
  sai_task to NULL when the thread is finishing up.
- As we don't use kthread_should_stop(), we can safely do cleanup
  in the thread, because it is sure to run.
- use wake_up_process to signal the thread that there
  is work to do.
- the wake_up that is currently at the end of sa_put() becomes
  a little more complicated and is move to after the one place
  where sa_put() is called.

Change-Id: If694dafc6864348fe5203a4935f4c128ce5ff255
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/36259
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_internal.h
lustre/llite/statahead.c