• Sebastian Andrzej Siewior's avatar
    fcoe: convert to kworker · 4b9bc86d
    Sebastian Andrzej Siewior authored
    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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Tested-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    4b9bc86d
Name
Last commit
Last update
..
fc Loading commit data...
fc_encode.h Loading commit data...
fc_frame.h Loading commit data...
fcoe_sysfs.h Loading commit data...
iscsi_if.h Loading commit data...
iscsi_proto.h Loading commit data...
iser.h Loading commit data...
libfc.h Loading commit data...
libfcoe.h Loading commit data...
libiscsi.h Loading commit data...
libiscsi_tcp.h Loading commit data...
libsas.h Loading commit data...
osd_attributes.h Loading commit data...
osd_initiator.h Loading commit data...
osd_ore.h Loading commit data...
osd_protocol.h Loading commit data...
osd_sec.h Loading commit data...
osd_sense.h Loading commit data...
osd_types.h Loading commit data...
sas.h Loading commit data...
sas_ata.h Loading commit data...
scsi.h Loading commit data...
scsi_bsg_iscsi.h Loading commit data...
scsi_cmnd.h Loading commit data...
scsi_common.h Loading commit data...
scsi_dbg.h Loading commit data...
scsi_device.h Loading commit data...
scsi_devinfo.h Loading commit data...
scsi_dh.h Loading commit data...
scsi_driver.h Loading commit data...
scsi_eh.h Loading commit data...
scsi_host.h Loading commit data...
scsi_ioctl.h Loading commit data...
scsi_proto.h Loading commit data...
scsi_tcq.h Loading commit data...
scsi_transport.h Loading commit data...
scsi_transport_fc.h Loading commit data...
scsi_transport_iscsi.h Loading commit data...
scsi_transport_sas.h Loading commit data...
scsi_transport_spi.h Loading commit data...
scsi_transport_srp.h Loading commit data...
scsicam.h Loading commit data...
sg.h Loading commit data...
srp.h Loading commit data...