All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Lee Duncan <lduncan@suse.com>,
	cleech@redhat.com, martin.petersen@oracle.com,
	linux-scsi@vger.kernel.org, jejb@linux.ibm.com
Subject: Re: [PATCH 05/12] scsi: iscsi: Run recv path from workqueue
Date: Fri, 18 Mar 2022 17:11:24 -0500	[thread overview]
Message-ID: <44c2c232-baf2-f415-b7c0-efbe27bbbd89@oracle.com> (raw)
In-Reply-To: <b10127f9-9818-e595-5e12-1052e9478978@suse.com>

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@oracle.com>
>> ---
>>   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.

  reply	other threads:[~2022-03-18 22:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  0:27 [[PATCH 00/12] misc iscsi patches Mike Christie
2022-03-08  0:27 ` [PATCH 01/12] scsi: iscsi: Merge suspend fields Mike Christie
2022-03-08 18:47   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 02/12] scsi: iscsi: Rename iscsi_conn_queue_work Mike Christie
2022-03-08 18:49   ` Lee Duncan
2022-03-09  0:55   ` Wu Bo
2022-03-08  0:27 ` [PATCH 03/12] scsi: iscsi: Add recv workqueue helpers Mike Christie
2022-03-10 22:50   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 04/12] scsi: iscsi: Allow a recv and xmit work to run Mike Christie
2022-03-08 19:00   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 05/12] scsi: iscsi: Run recv path from workqueue Mike Christie
2022-03-18 16:45   ` Lee Duncan
2022-03-18 22:11     ` Mike Christie [this message]
2022-03-08  0:27 ` [PATCH 06/12] scsi: iscsi_tcp: Use sendpage for the PDU header Mike Christie
2022-03-12 19:42   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 07/12] scsi: iscsi_tcp: Drop target_alloc use Mike Christie
2022-03-09  1:31   ` Wu Bo
2022-03-12 19:43   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 08/12] scsi: iscsi: remove unneeded task state check Mike Christie
2022-03-09  1:33   ` Wu Bo
2022-03-14 17:13   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 09/12] scsi: iscsi: Remove iscsi_get_task back_lock requirement Mike Christie
2022-03-14 17:44   ` Lee Duncan
2022-03-18 17:31   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 10/12] scsi: iscsi: Try to avoid taking back_lock in xmit path Mike Christie
2022-03-18 17:37   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 11/12] scsi: libiscsi: improve conn_send_pdu API Mike Christie
2022-03-18 16:49   ` Lee Duncan
2022-03-08  0:27 ` [PATCH 12/12] scsi: iscsi: Fix race between recovery and task xmit Mike Christie
2022-03-14 17:46   ` Lee Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44c2c232-baf2-f415-b7c0-efbe27bbbd89@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=cleech@redhat.com \
    --cc=jejb@linux.ibm.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.