Re: [PATCH V2 net-next 2/2] net: qrtr: Add support for processing DEL_PROC type control message

From: Chris Lew
Date: Mon Sep 25 2023 - 19:55:52 EST




On 9/23/2023 6:49 PM, Sricharan Ramabadhran wrote:
   */
  struct qrtr_node {
      struct mutex ep_lock;
@@ -134,6 +138,9 @@ struct qrtr_node {
      struct sk_buff_head rx_queue;
      struct list_head item;
+    struct kthread_worker kworker;
+    struct task_struct *task;
+    struct kthread_work read_data;

I think our own kthread here might have been overkill. I forget why we needed it instead of using a workqueue.

  I added a workqueue here because endpoint post is getting called from
  atomic contexts and below DEL_PROC handling acquires qrtr_tx_lock.


Got it, I think deferring the processing makes sense. I was more focusing on the fact that we are creating our own kthread instead of using the system workqueues.

Prior to commit e04df98adf7d ("net: qrtr: Remove receive worker"), this was a work_struct. I think we should keep it as a work_struct until we can motivate why a qrtr_node needs it's own kthread.