On 01/16/2017 08:53 PM, Dupuis, Chad wrote:
> From: "Dupuis, Chad" <chad.dup...@cavium.com>
> 
> The QLogic FastLinQ Driver for FCoE (qedf) is the FCoE specific module for 
> 41000
> Series Converged Network Adapters by QLogic. This patch consists of following
> changes:
> 
> - MAINTAINERS Makefile and Kconfig changes for qedf
> - PCI driver registration
> - libfc/fcoe host level initialization
> - SCSI host template initialization and callbacks
> - Debugfs and log level infrastructure
> - Link handling
> - Firmware interface structures
> - QED core module initialization
> - Light L2 interface callbacks
> - I/O request initialization
> - Firmware I/O completion handling
> - Firmware ELS request/response handling
> - FIP request/response handled by the driver itself
> 
> Signed-off-by: Nilesh Javali <nilesh.jav...@cavium.com>
> Signed-off-by: Manish Rangankar <manish.rangan...@cavium.com>
> Signed-off-by: Saurav Kashyap <saurav.kash...@cavium.com>
> Signed-off-by: Arun Easi <arun.e...@cavium.com>
> Signed-off-by: Chad Dupuis <chad.dup...@cavium.com>

[ .. ]

> +/* Main thread to process skb's from light-L2 interface */
> +static int qedf_ll2_recv_thread(void *arg)
> +{
> +     struct qedf_ctx *qedf = (struct qedf_ctx *)arg;
> +     struct qedf_skb_work *work, *work_tmp;
> +     unsigned long flags;
> +
> +     set_user_nice(current, -20);
> +     set_current_state(TASK_INTERRUPTIBLE);
> +
> +     while (!kthread_should_stop()) {
> +             schedule();
> +             if (!list_empty(&qedf->ll2_skb_list)) {
> +                     list_for_each_entry_safe(work, work_tmp,
> +                         &qedf->ll2_skb_list, list) {
> +                     spin_lock_irqsave(&qedf->ll2_lock, flags);
> +                             list_del(&work->list);
> +                             spin_unlock_irqrestore(&qedf->ll2_lock, flags);
> +                             qedf_ll2_process_skb(qedf, work->skb);
> +                             kfree(work);
> +                     }
> +             }
> +             __set_current_state(TASK_INTERRUPTIBLE);
> +     }
> +
> +     __set_current_state(TASK_RUNNING);
> +     return 0;
> +}
> +
Please: don't.

The RT folks are trying to get rid of kthreads altogether as it's a
nightmare to get it to work with cpu hotplugging.
Please convert to workqueues.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Teamlead Storage & Networking
h...@suse.de                                   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Reply via email to