]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rdmavt: Handle the kthread worker using the new API
authorPetr Mladek <pmladek@suse.com>
Wed, 19 Oct 2016 12:07:20 +0000 (14:07 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Dec 2016 17:16:11 +0000 (12:16 -0500)
commit178695a89a90444b3a48e598d3ad6aa9ca7a9a94
treed4e67e68a300111713fb5a12132bd060733b8687
parent38c2969ef89f0e2ebdcdbbc2f62b0325bc90e002
IB/rdmavt: Handle the kthread worker using the new API

Use the new API to create and destroy the cq kthread worker.
The API hides some implementation details.

In particular, kthread_create_worker() allocates and initializes
struct kthread_worker. It runs the kthread the right way and stores
task_struct into the worker structure. In addition, the *on_cpu()
variant binds the kthread to the given cpu and the related memory
node.

kthread_destroy_worker() flushes all pending works, stops
the kthread and frees the structure.

This patch does not change the existing behavior. Note that we must
use the on_cpu() variant because the function starts the kthread
and it must bind it to the right CPU before waking. The numa node
is associated for given CPU as well.

Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/cq.c