Re: [PATCH 05/12] scsi: iscsi: Run recv path from workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/18/22 11:45 AM, Lee Duncan wrote:
> On 3/7/22 16:27, Mike Christie wrote:
>> We don't always want to run the recv path from the network softirq
>> because when we have to have multiple sessions sharing the same CPUs some
>> sessions can eat up the napi softirq budget and affect other sessions or
>> users. This patch allows us to queue the recv handling to the iscsi
>> workqueue so we can have the scheduler/wq code try to balance the work and
>> CPU use across all sessions's  worker threads.
>>
>> Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
>> ---
>>   drivers/scsi/iscsi_tcp.c | 62 +++++++++++++++++++++++++++++++---------
>>   drivers/scsi/iscsi_tcp.h |  2 ++
>>   2 files changed, 51 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
>> index f274a86d2ec0..261599938fc9 100644
>> --- a/drivers/scsi/iscsi_tcp.c
>> +++ b/drivers/scsi/iscsi_tcp.c
>> @@ -52,6 +52,10 @@ static struct iscsi_transport iscsi_sw_tcp_transport;
>>   static unsigned int iscsi_max_lun = ~0;
>>   module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO);
>>   +static bool iscsi_use_recv_wq;
>> +module_param_named(use_recv_wq, iscsi_use_recv_wq, bool, 0644);
>> +MODULE_PARM_DESC(use_recv_wq, "Set to true to read iSCSI data/headers from the iscsi_q workqueue. The default is false which will perform reads from the network softirq context.");
> 
> I'm just curious why you chose to make this a module parameter, leaving the current default.

If you only have a couple sessions, running from the softirq can
be better can give you better perf sometimes. Users might have
pinned things where the xmit and recv paths are on different CPUs.
If we switch the default then it could cause a regression for those
users.

The modparam use is because users typically know how heavily they
will use iscsi beforehand. Like they know if they are only going
to be using a couple or 10 or 20 sessions for one or 2 apps vs 50+
for heavier storage use.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux