All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
To: open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	"Nicholas A. Bellinger"
	<nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
Cc: James Bottomley
	<James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
	lsf-pc-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>,
	linux-scsi <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	target-devel
	<target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [Lsf-pc] [LSF/MM TOPIC] iSCSI MQ adoption via MCS discussion
Date: Mon, 12 Jan 2015 14:14:54 -0600	[thread overview]
Message-ID: <54B42B3E.7010108@cs.wisc.edu> (raw)
In-Reply-To: <54B24501.7090801-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On 01/11/2015 03:40 AM, Sagi Grimberg wrote:
> On 1/9/2015 10:19 PM, Mike Christie wrote:
>> On 01/09/2015 12:28 PM, Hannes Reinecke wrote:
>>> On 01/09/2015 07:00 PM, Michael Christie wrote:
>>>>
>>>> On Jan 8, 2015, at 11:03 PM, Nicholas A. Bellinger
>>>> <nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org> wrote:
>>>>
>>>>> On Thu, 2015-01-08 at 15:22 -0800, James Bottomley wrote:
>>>>>> On Thu, 2015-01-08 at 14:57 -0800, Nicholas A. Bellinger wrote:
>>>>>>> On Thu, 2015-01-08 at 14:29 -0800, James Bottomley wrote:
>>>>>>>> On Thu, 2015-01-08 at 14:16 -0800, Nicholas A. Bellinger wrote:
>>>>>
>>>>> <SNIP>
>>>>>
>>>>>>> The point is that a simple session wide counter for command sequence
>>>>>>> number assignment is significantly less overhead than all of the
>>>>>>> overhead associated with running a full multipath stack atop
>>>>>>> multiple
>>>>>>> sessions.
>>>>>>
>>>>>> I don't see how that's relevant to issue speed, which was the
>>>>>> measure we
>>>>>> were using: The layers above are just a hopper.  As long as they're
>>>>>> loaded, the MQ lower layer can issue at full speed.  So as long as
>>>>>> the
>>>>>> multipath hopper is efficient enough to keep the queues loaded
>>>>>> there's
>>>>>> no speed degradation.
>>>>>>
>>>>>> The problem with a sequence point inside the MQ issue layer is
>>>>>> that it
>>>>>> can cause a stall that reduces the issue speed. so the counter
>>>>>> sequence
>>>>>> point causes a degraded issue speed over the multipath hopper
>>>>>> approach
>>>>>> above even if the multipath approach has a higher CPU overhead.
>>>>>>
>>>>>> Now, if the system is close to 100% cpu already, *then* the multipath
>>>>>> overhead will try to take CPU power we don't have and cause a
>>>>>> stall, but
>>>>>> it's only in the flat out CPU case.
>>>>>>
>>>>>>> Not to mention that our iSCSI/iSER initiator is already taking a
>>>>>>> session
>>>>>>> wide lock when sending outgoing PDUs, so adding a session wide
>>>>>>> counter
>>>>>>> isn't adding any additional synchronization overhead vs. what's
>>>>>>> already
>>>>>>> in place.
>>>>>>
>>>>>> I'll leave it up to the iSER people to decide whether they're redoing
>>>>>> this as part of the MQ work.
>>>>>>
>>>>>
>>>>> Session wide command sequence number synchronization isn't
>>>>> something to
>>>>> be removed as part of the MQ work.  It's a iSCSI/iSER protocol
>>>>> requirement.
>>>>>
>>>>> That is, the expected + maximum sequence numbers are returned as
>>>>> part of
>>>>> every response PDU, which the initiator uses to determine when the
>>>>> command sequence number window is open so new non-immediate
>>>>> commands may
>>>>> be sent to the target.
>>>>>
>>>>> So, given some manner of session wide synchronization is required
>>>>> between different contexts for the existing single connection case to
>>>>> update the command sequence number and check when the window opens,
>>>>> it's
>>>>> a fallacy to claim MC/S adds some type of new initiator specific
>>>>> synchronization overhead vs. single connection code.
>>>>
>>>> I think you are assuming we are leaving the iscsi code as it is today.
>>>>
>>>> For the non-MCS mq session per CPU design, we would be allocating and
>>>> binding the session and its resources to specific CPUs. They would only
>>>> be accessed by the threads on that one CPU, so we get our
>>>> serialization/synchronization from that. That is why we are saying we
>>>> do not need something like atomic_t/spin_locks for the sequence number
>>>> handling for this type of implementation.
>>>>
>>> Wouldn't that need to be coordinated with the networking layer?
>>
>> Yes.
>>
>>> Doesn't it do the same thing, matching TX/RX queues to CPUs?
>>
>> Yes.
>>
> 
> Hey Hannes, Mike,
> 
> I would say there is no need for specific coordination from iSCSI PoV.
> This is exactly what flow steering is designed for. As I see it, in
> order to get the TX/RX to match rings, the user can attach 5-tuple rules
> (using standard ethtool) to steer packets to the right rings.
> 
> Sagi.
> 
>>> If so, wouldn't we decrease bandwidth by restricting things to one CPU?
>>
>> We have a session or connection per CPU though, so we end up hitting the
>> same problem you talked about last year where one hctx (iscsi session or
>> connection's socket or nic hw queue) could get overloaded. This is what
>> I meant in my original mail where iscsi would rely on whatever blk/mq
>> load balancers we end up implementing at that layer to balance requests
>> across hctxs.
>>
> 
> I'm not sure I understand,
> 
> The submission flow is CPU bound. In the current single queue model
> both CPU X and CPU Y will end up using a single socket. In the
> multi-queue solution, CPU X will go to socket X and CPU Y will go to
> socket Y. This is equal to what we have today (if only CPU X is active)
> or better (if more CPUs are active).
> 
> Am I missing something?

I did not take Hannes's comment as comparing what we have today vs the
proposal. I thought he was referring to the problem he was talking about
at LSF last year and saying there could be cases where we want to spread
IO across CPUs/queues and some cases where we would want to execute on
the CPU we were originally submitted on. I was just saying the iscsi
layer would not control that and would rely on the blk/mq layer to
handle this or tell us what to do similar to what we do for the
rq_affinity setting.

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2015-01-12 20:14 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 16:25 [LSF/MM TOPIC] iSCSI MQ adoption via MCS discussion Sagi Grimberg
     [not found] ` <54AD5DDD.2090808-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-01-07 16:57   ` Hannes Reinecke
     [not found]     ` <54AD6563.4040603-l3A5Bk7waGM@public.gmane.org>
2015-01-07 21:39       ` Mike Christie
2015-01-08  7:50         ` Bart Van Assche
2015-01-08 13:45           ` Sagi Grimberg
     [not found]             ` <54AE8A02.1030100-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-01-08 14:11               ` Bart Van Assche
     [not found]                 ` <54AE9010.5080609-HInyCGIudOg@public.gmane.org>
2015-01-08 15:57                   ` Paul Koning
2015-01-09 11:39                 ` Sagi Grimberg
2015-01-09 13:31                   ` Bart Van Assche
     [not found]                     ` <5EE87F5E6631894E80EB1A63198F964D040A6A8F-cXZ6iGhjG0hm/BozF5lIdDJ2aSJ780jGSxCzGc5ayCJWk0Htik3J/w@public.gmane.org>
2015-01-11  9:52                       ` Sagi Grimberg
2015-01-14  4:16             ` Vladislav Bolkhovitin
2015-01-08 22:16           ` Nicholas A. Bellinger
2015-01-08 22:29             ` James Bottomley
2015-01-08 22:57               ` Nicholas A. Bellinger
     [not found]                 ` <1420757822.2842.39.camel-XoQW25Eq2zviZyQQd+hFbcojREIfoBdhmpATvIKMPHk@public.gmane.org>
2015-01-08 23:22                   ` [Lsf-pc] " James Bottomley
2015-01-09  5:03                     ` Nicholas A. Bellinger
2015-01-09  6:25                       ` James Bottomley
     [not found]                       ` <1420779808.21830.21.camel-XoQW25Eq2zviZyQQd+hFbcojREIfoBdhmpATvIKMPHk@public.gmane.org>
2015-01-09 18:00                         ` Michael Christie
2015-01-09 18:28                           ` Hannes Reinecke
     [not found]                             ` <54B01DBD.5020707-l3A5Bk7waGM@public.gmane.org>
2015-01-09 18:34                               ` James Bottomley
2015-01-09 20:19                               ` Mike Christie
     [not found]                                 ` <54B037BF.1010903-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2015-01-11  9:40                                   ` Sagi Grimberg
2015-01-12 12:56                                     ` Bart Van Assche
     [not found]                                       ` <54B3C47E.6010109-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-01-13  9:46                                         ` Sagi Grimberg
     [not found]                                     ` <54B24501.7090801-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-01-12 20:14                                       ` Mike Christie [this message]
     [not found]                           ` <38CE4ECA-D155-4BF9-9D6D-E1A01ADA05E4-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2015-01-11  9:23                             ` Sagi Grimberg
     [not found]                               ` <54B24117.7050204-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-01-12 20:05                                 ` Mike Christie
     [not found]                                   ` <54B428F2.2010507-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2015-01-13  9:55                                     ` Sagi Grimberg
2015-01-08 23:26                 ` Mike Christie
     [not found]                   ` <54AF122C.9070703-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2015-01-09 11:17                     ` Sagi Grimberg
2015-01-08 23:01           ` Mike Christie
2015-01-08 14:50         ` James Bottomley
2015-01-08 17:25           ` Sagi Grimberg
     [not found]         ` <54ADA777.6090801-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2015-01-08 23:40           ` Mike Christie
2015-01-07 17:22   ` Lee Duncan
2015-01-07 19:11     ` [Lsf-pc] " Jan Kara
2015-01-07 16:58 ` Nicholas A. Bellinger

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=54B42B3E.7010108@cs.wisc.edu \
    --to=michaelc-hcno3ddehluvc3sceru5cw@public.gmane.org \
    --cc=James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lsf-pc-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org \
    --cc=open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.