From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Hannes Reinecke <hare@suse.de>
Cc: Bart Van Assche <bvanassche@acm.org>,
linux-scsi@vger.kernel.org,
scst-devel <scst-devel@lists.sourceforge.net>
Subject: Re: [Scst-devel] Fwd: Re: linuxcon 2010...
Date: Tue, 07 Sep 2010 17:20:32 +0400 [thread overview]
Message-ID: <4C863C20.2080004@vlnb.net> (raw)
In-Reply-To: <AANLkTi=zS=zTFZ-93vdMwPo1wcRsoLL9fnm5rxNT+4WH@mail.gmail.com>
Bart Van Assche, on 09/07/2010 10:45 AM wrote:
> On Tue, Sep 7, 2010 at 8:29 AM, Hannes Reinecke<hare@suse.de> wrote:
>>
>> Bart Van Assche wrote:
>> [ ... ]
>>> You seem to have missed the start of this thread. The design of SCST
>>> is significantly more advanced than that of LIO, and it has already
>>> been explained in this thread why
>>> (http://www.spinics.net/lists/linux-scsi/msg45856.html).
>>>
>> Hmm. That link seems to be misrouted. I was hoping for a design
>> overview of SCST there; however it's just a complain to
>> James Bottomley etc.
>>
>> Care to send the correct link?
>
> An SCST design overview diagram together with SCST API documentation
> can be found here: http://scst.sourceforge.net/scst_pg.html (sorry for
> the language imperfections on this page, which should not affect
> readability though).
For iSCSI-like transports, which support immediate/unsolicited data,
additional description of the processing flow is here.
In short, in this flow target drivers called by the SCST core
(preprocessing_done() callback) after preprocessing of this command
finished and the command has allocated buffer, so now the driver can
continue processing of the command and transfer in its buffer
immediate/unsolicited data, if there are any.
In details it is as the following:
After iSCSI-SCST received new command in scsi_cmnd_start() it calls
scst_rx_cmd() to create scst_cmd then after it initialized necessary
fields in it (CDB, task attribute, expected data direction, etc.) it
calls scst_cmd_init_stage1_done() to notify SCST that scst_cmd
initialization finished and its processing can be started. Then SCST
parses SCSI CDB to determines data transfer length and direction (this
is necessary to prevent various DoS'es from remote initiators like
sending a command with wrong data direction; try this in the
pass-through case and you will see what happens) and allocates necessary
data buffer. From this point the following 2 scenarios are possible:
1. Regular path, when SCST does all the processing directly as simple
function calls. SCST in the end of processing calls
iscsi_preprocessing_done() callback, which sets scst_state and returns.
Following the call stack the execution flow will return to
scsi_cmnd_start() and continue there.
2. During processing SCST has to change context (switch to another
thread). It can be necessary, e.g., to handle some management activity.
Here everything is the same as in (1) above, but after
scst_cmd_init_stage1_done() returned scsi_cmnd_start() returns 1 and
further processing of this connection is suspended. Then
iscsi_preprocessing_done() will resume it. Then process_read_io() will
call cmnd_rx_continue().
Then iSCSI-SCST will do necessary checks and if all correct:
- For READ commands and commands without data transfers, calls in
iscsi_restart_cmnd() scst_restart_cmd() to tell SCST to start command's
execution.
- Fro WRITE commands it receives immediate data, sends the necessary
R2T PDUs (send_r2t()), receives data for them and then calls
scst_restart_cmd().
Then, after the command is finished, SCST returns to iSCSI-SCST status
of the command's execution in iscsi_xmit_response() callback, which
using send_data_rsp() makes the necessary Data-In PDUs and then either
directly sends them using iscsi_try_local_processing()->iscsi_send() (to
minimize latency) or passes to the write thread.
Other internal SCST processing is as shown on the "The commands
processing flow" in http://scst.sourceforge.net/scst_pg.html.
Thanks,
Vlad
next prev parent reply other threads:[~2010-09-07 13:20 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 14:58 [Scst-devel] Fwd: Re: linuxcon 2010 Chetan Loke
2010-08-18 14:58 ` Chetan Loke
2010-08-18 15:11 ` James Bottomley
[not found] ` <AANLkTimJGxn=5kEMH68XVWqFcYG3vpfLjLjZpFGqhG_4@mail.gmail.com>
2010-08-18 15:30 ` Bart Van Assche
2010-08-18 15:30 ` Bart Van Assche
2010-08-18 16:04 ` Chetan Loke
2010-08-18 16:18 ` James Bottomley
2010-08-18 17:50 ` Vladislav Bolkhovitin
2010-08-19 1:18 ` jack wang
2010-08-19 1:18 ` jack wang
2010-08-19 21:20 ` Dirk Meister
2010-08-19 22:29 ` Nicholas A. Bellinger
2010-08-21 18:42 ` Vladislav Bolkhovitin
2010-08-21 20:25 ` Nicholas A. Bellinger
2010-08-24 18:08 ` Vladislav Bolkhovitin
2010-08-21 20:43 ` James Bottomley
2010-08-22 7:39 ` Bart Van Assche
2010-08-22 20:29 ` James Bottomley
2010-08-23 13:47 ` Joe Landman
2010-08-23 15:12 ` Bart Van Assche
2010-08-23 15:12 ` Bart Van Assche
[not found] ` <AANLkTim-M6dfLvJQnbieFqZCGG33E+-i+u_soCq2p9f1@mail.gmail.com>
2010-08-23 16:07 ` Chetan Loke
2010-08-23 18:03 ` Chetan Loke
2010-08-23 18:03 ` Chetan Loke
2010-08-24 7:25 ` Pasi Kärkkäinen
2010-08-24 7:25 ` Pasi Kärkkäinen
2010-08-24 14:43 ` Linux I/O subsystem performance (was: linuxcon 2010...) Vladislav Bolkhovitin
2010-08-24 14:43 ` Vladislav Bolkhovitin
2010-08-24 14:55 ` Matthew Wilcox
2010-08-24 17:51 ` Linux I/O subsystem performance Vladislav Bolkhovitin
2010-08-24 20:40 ` Matthew Wilcox
2010-08-24 14:55 ` [Scst-devel] Fwd: Re: linuxcon 2010 Chetan Loke
[not found] ` <4C7404C4.4040704@vlnb.net>
2010-08-24 20:31 ` Linux I/O subsystem performance (was: linuxcon 2010...) Chris Worley
2010-08-24 20:31 ` Chris Worley
2010-08-25 19:12 ` Linux I/O subsystem performance Vladislav Bolkhovitin
2010-09-16 15:05 ` Linux I/O subsystem performance (was: linuxcon 2010...) Chris Worley
2010-09-16 15:05 ` Chris Worley
2010-08-23 19:41 ` [Scst-devel] Fwd: Re: linuxcon 2010 Vladislav Bolkhovitin
2010-08-24 14:41 ` Vladislav Bolkhovitin
2010-08-24 14:51 ` Chris Weiss
2010-08-24 14:56 ` Matthew Wilcox
2010-08-25 22:20 ` Konrad Rzeszutek Wilk
2010-08-25 22:45 ` Ted Ts'o
2010-08-24 14:57 ` James Bottomley
2010-08-24 19:48 ` Vladislav Bolkhovitin
2010-08-24 21:23 ` Nicholas A. Bellinger
2010-08-26 20:11 ` Vladislav Bolkhovitin
2010-08-26 21:23 ` Nicholas A. Bellinger
2010-08-28 17:32 ` Vladislav Bolkhovitin
2010-08-28 20:47 ` Nicholas A. Bellinger
2010-08-30 20:47 ` Vladislav Bolkhovitin
2010-08-30 21:46 ` Nicholas A. Bellinger
2010-09-02 19:38 ` Vladislav Bolkhovitin
2010-09-02 19:38 ` Vladislav Bolkhovitin
2010-09-02 20:25 ` Nicholas A. Bellinger
2010-09-05 20:18 ` Dmitry Torokhov
2010-09-05 21:50 ` Nicholas A. Bellinger
2010-09-05 23:13 ` Mark Deneen
2010-09-06 0:12 ` Nicholas A. Bellinger
2010-09-06 0:58 ` Mark Deneen
2010-09-06 1:34 ` Nicholas A. Bellinger
2010-09-06 5:04 ` Dmitry Torokhov
2010-09-05 23:41 ` Dmitry Torokhov
2010-09-05 23:59 ` Nicholas A. Bellinger
2010-09-06 4:56 ` Dmitry Torokhov
2010-09-06 10:39 ` James Bottomley
2010-09-06 11:02 ` Bart Van Assche
2010-09-06 11:02 ` Bart Van Assche
2010-09-06 11:27 ` James Bottomley
2010-09-06 15:26 ` Vladislav Bolkhovitin
2010-09-06 21:47 ` Vladislav Bolkhovitin
2010-09-06 21:55 ` Nicholas A. Bellinger
2010-09-06 22:14 ` david
2010-09-07 0:44 ` Dmitry Torokhov
2010-09-07 3:45 ` Chetan Loke
2010-09-07 6:15 ` Bart Van Assche
2010-09-07 6:08 ` Bart Van Assche
2010-09-07 6:26 ` Dmitry Torokhov
2010-09-07 6:29 ` Hannes Reinecke
2010-09-07 6:45 ` Bart Van Assche
2010-09-07 13:20 ` Vladislav Bolkhovitin [this message]
2010-09-07 20:14 ` Vladislav Bolkhovitin
2010-09-07 20:14 ` Vladislav Bolkhovitin
2010-09-06 21:16 ` Greg KH
2010-09-06 17:28 ` Chetan Loke
2010-09-06 17:28 ` Chetan Loke
2010-09-06 21:52 ` Vladislav Bolkhovitin
2010-09-06 21:52 ` Vladislav Bolkhovitin
2010-08-20 13:46 ` Ruben Laban
2010-08-18 17:51 ` Chetan Loke
2010-08-18 16:19 ` Bart Van Assche
2010-08-18 16:19 ` Bart Van Assche
2010-08-18 16:28 ` Joe Landman
2010-08-18 17:52 ` Vladislav Bolkhovitin
2010-08-18 15:12 ` Chetan Loke
2010-08-18 17:52 ` Vladislav Bolkhovitin
-- strict thread matches above, loose matches on Subject: below --
2010-08-20 17:40 Ari Lemmke
2010-08-16 16:20 Fwd: Re: [Scst-devel] " Vladislav Bolkhovitin
2010-08-17 20:30 ` James Bottomley
2010-08-18 17:52 ` Vladislav Bolkhovitin
2010-08-18 20:43 ` James Bottomley
2010-08-21 18:51 ` Vladislav Bolkhovitin
2010-08-21 20:38 ` James Bottomley
2010-08-22 22:10 ` [Scst-devel] Fwd: " Gennadiy Nerubayev
2010-08-22 22:10 ` Gennadiy Nerubayev
2010-08-23 16:59 ` James Bottomley
2010-08-23 17:44 ` Bart Van Assche
2010-08-23 17:44 ` Bart Van Assche
2010-08-23 17:58 ` James Bottomley
2010-08-23 20:11 ` Bart Van Assche
2010-08-23 20:11 ` Bart Van Assche
2010-08-23 20:21 ` James Bottomley
2010-08-23 19:40 ` Vladislav Bolkhovitin
2010-08-23 20:38 ` James Bottomley
2010-08-24 10:32 ` Bart Van Assche
2010-08-24 10:32 ` Bart Van Assche
2010-08-24 13:01 ` Chris Weiss
2010-08-24 13:01 ` Chris Weiss
2010-08-24 19:53 ` Vladislav Bolkhovitin
2010-08-23 19:40 ` Vladislav Bolkhovitin
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=4C863C20.2080004@vlnb.net \
--to=vst@vlnb.net \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=scst-devel@lists.sourceforge.net \
/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.