linux_old1/drivers/scsi/bnx2fc
Sebastian Andrzej Siewior 4b9bc86d5a fcoe: convert to kworker
The driver creates its own per-CPU threads which are updated based on
CPU hotplug events. It is also possible to use kworkers and remove some
of the kthread infrastrucure.

The code checked ->thread to decide if there is an active per-CPU
thread. By using the kworker infrastructure this is no longer
possible (or required). The thread pointer is saved in `kthread' instead
of `thread' so anything trying to use thread is caught by the
compiler. Currently only the bnx2fc driver is using struct fcoe_percpu_s
and the kthread member.

After a CPU went offline, we may still enqueue items on the "offline"
CPU. This isn't much of a problem. The work will be done on a random
CPU. The allocated crc_eof_page page won't be cleaned up. It is probably
expected that the CPU comes up at some point so it should not be a
problem. The crc_eof_page memory is released of course once the module
is removed.

This patch was only compile-tested due to -ENODEV.

Cc: Vasu Dev <vasu.dev@intel.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: fcoe-devel@open-fcoe.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-07-12 23:16:31 -04:00
..
57xx_hsi_bnx2fc.h bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
Kconfig bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
Makefile [SCSI] bnx2fc: Reduce object size by consolidating formats 2012-07-20 08:58:17 +01:00
bnx2fc.h bnx2fc: Update version number to 2.10.3. 2016-04-15 16:53:11 -04:00
bnx2fc_constants.h bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
bnx2fc_debug.c bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
bnx2fc_debug.h bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
bnx2fc_els.c bnx2fc: Remove explicit logouts. 2015-11-09 17:31:34 -08:00
bnx2fc_fcoe.c fcoe: convert to kworker 2016-07-12 23:16:31 -04:00
bnx2fc_hwi.c bnx2fc: Remove 'NetXtreme II' from source files. 2015-11-09 17:29:04 -08:00
bnx2fc_io.c bnx2fc: replace printk() with BNX2FC_IO_DBG() 2016-07-12 23:16:31 -04:00
bnx2fc_tgt.c bnx2fc: Remove explicit logouts. 2015-11-09 17:31:34 -08:00