public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 2/2] implement transport scan callout for iscsi
@ 2005-05-21 21:39 Mike Christie
  2005-05-24 17:09 ` James Bottomley
  0 siblings, 1 reply; 17+ messages in thread
From: Mike Christie @ 2005-05-21 21:39 UTC (permalink / raw)
  To: open-iscsi, linux-scsi

Implement transport specific scanning function for open-iscsi.
This fixes the sysfs layout so it looks like this:

[root@mina host1]# tree
.
`-- session1
    |-- connection1:0
    `-- target1:0:0
        |-- 1:0:0:0

representing the relationship between a session and a target.
open-iscsi/linux-iscsi-5 uses struct devices and driver mode transport
classes like in past sumbitted patches here
http://marc.theaimsgroup.com/?l=linux-scsi&m=111618626124050&w=2

This patches against the subversion source found at
open-iscsi.org or the currect release
http://www.open-iscsi.org/bits/open-iscsi-0.3rc4-325.tar.gz
open-iscsi is not in mainline, but we are trying :). I only
post this to show an example of the callout usage since I do not
have access to a box (or really the serial line to reboot it) with
FC to fix the fc transport class today, and to make sure open-iscsi
is even doing the correct sysfs layout wrt to struct devices and
transport_classes and what should link to what.


Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>


diff -aurp open-iscsi/kernel/scsi_transport_iscsi.c open-iscsi.work/kernel/scsi_transport_iscsi.c
--- open-iscsi/kernel/scsi_transport_iscsi.c	2005-05-21 14:03:04.000000000 -0700
+++ open-iscsi.work/kernel/scsi_transport_iscsi.c	2005-05-21 14:21:00.000000000 -0700
@@ -887,6 +887,15 @@ iscsi_if_rx(struct sock *sk, int len)
 	up(&rx_queue_sema);
 }
 
+static int
+iscsi_scan(struct Scsi_Host *shost, unsigned int channel, unsigned int id,
+	   unsigned int lun, int rescan)
+{
+	struct iscsi_if_session *session = hostdata_session(shost->hostdata);
+	scsi_scan_target(&session->dev, channel, id, lun, rescan);
+	return 0;
+}
+
 /*
  * iSCSI connection attrs
  */
@@ -1039,6 +1048,7 @@ int iscsi_register_transport(struct iscs
 	INIT_LIST_HEAD(&priv->sessions);
 	spin_lock_init(&priv->session_lock);
 	priv->iscsi_transport = tt;
+	priv->t.scan = iscsi_scan;
 
 	/* setup parameters mask */
 	priv->param_mask = 0xFFFFFFFF;
diff -aurp open-iscsi/usr/initiator.c open-iscsi.work/usr/initiator.c
--- open-iscsi/usr/initiator.c	2005-05-21 14:03:05.000000000 -0700
+++ open-iscsi.work/usr/initiator.c	2005-05-21 14:03:50.000000000 -0700
@@ -181,7 +181,7 @@ __session_scan_host(iscsi_session_t *ses
 		/* child */
 		log_debug(4, "scanning host%d using %s",session->id,
 			  sysfs_file);
-		write(fd, "- - -", 5);
+		write(fd, "0 0 -", 5);
 		close(fd);
 		exit(0);
 	}



^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <42936441.0b798bab.39a4.ffff9774SMTPIN_ADDED@mx.googlegroups.com>]
* Re: [PATCH RFC 2/2] implement transport scan callout for iscsi
@ 2005-05-25  2:20 open_iscsi
  0 siblings, 0 replies; 17+ messages in thread
From: open_iscsi @ 2005-05-25  2:20 UTC (permalink / raw)
  To: James Bottomley; +Cc: open-iscsi, Mike Christie, 'SCSI Mailing List'

I would like to correct myself on something I said below ... I said using 
the upper layer to issue commands with multi-pathing would take more 
execution time but I don't believe that is correct.

Another point about multi-connections vs multi-pathing and that is 
sequencing the commands. If you have ordered commands or head of queue tags, 
you would have to go to more work at the upper layer. Also, there is a mode 
page that must be properly set (I can't remember the page or bit now) or 
sequencing can be a problem for simple tags too.

Using multi-pathing for multi-connections is a historical solution. The only 
SCSI protocol other than iSCSI that had multi-connection capability was SSA 
and that would not sequence the commands. If I heard correctly recently, 
there is a Fibre Channel group working on multi-connections for that too.

Eddy

----- Original Message ----- 
From: "open_iscsi" <ESQuicksall_open_iscsi@Comcast.net>
To: "James Bottomley" <James.Bottomley@SteelEye.com>
Cc: <open-iscsi@googlegroups.com>; "Mike Christie" <michaelc@cs.wisc.edu>; 
"'SCSI Mailing List'" <linux-scsi@vger.kernel.org>
Sent: Tuesday, May 24, 2005 9:28 PM
Subject: Re: [PATCH RFC 2/2] implement transport scan callout for iscsi


> But it is not multi-pathing. Multi-pathing belongs at a higher layer.
>
> Yes, you could make multi-pathing perform a similar action but being at a 
> higher layer, it means more operations to achieve the same thing. Also, 
> multi-pathing is better suited for failover than multi-connections.
>
> There is another point here ... an HBA will probably use multi-connections 
> irrespective of what higher layers want.
>
> Regarding the numbers, we get 400,000 IOPS with our hardware solution 
> using multiple connections and multiple micro-engines. I have not tried 
> multi-pathing but I can tell you that I had to count clocks to get that 
> number and found that even a few extra clocks could mean a lot. So since 
> multi-pathing takes a lot of extra clocks, then I think there is a 
> benefit. However with a software solution the extra clocks for the 
> multi-pathing may not be significant.
>
> I would think that you would want to let the lower layers do their best to 
> get the best thruput and leave the failover logic to the upper layers.
>
> Eddy
>
> ----- Original Message ----- 
> From: "James Bottomley" <James.Bottomley@SteelEye.com>
> To: "open_iscsi" <ESQuicksall_open_iscsi@Comcast.net>
> Cc: <open-iscsi@googlegroups.com>; "Mike Christie" <michaelc@cs.wisc.edu>; 
> "'SCSI Mailing List'" <linux-scsi@vger.kernel.org>
> Sent: Tuesday, May 24, 2005 9:00 PM
> Subject: Re: [PATCH RFC 2/2] implement transport scan callout for iscsi
>
>
>> On Tue, 2005-05-24 at 20:25 -0400, open_iscsi wrote:
>>> The MC/S feature of iSCSI is not multi-pathing. Multi-pathing would be 
>>> the
>>> use of multiple sessions to reach the same target. Generally the two
>>> sessions would use the same InitiatorName+ISID but use different Target
>>> Portal Groups at the target. In SCSI terms, it is the same initiator
>>> accessing different SCSI ports.
>>
>> Well, yes, every driver vendor with a multi-path solution in-driver that
>> made a single presentation to the mid-layer has argued that one...
>>
>> The bottom line is that implementation must be in-driver.  So every
>> driver doing it this way has to have their own separate multi-path
>> implementation.  Whether you call it FC/AL or MC/S (or any of the other
>> buzz acronyms) it's still a driver implementation of pathing.
>>
>>> MC/S can be used to improve band width of a session without using
>>> multi-pathing and it belongs in the driver because it is hidden from the
>>> upper layers. Think of it like parallel wires, each carrying separate 
>>> (but
>>> sequenced) commands in parallel.
>>
>> So far, no-one has been able to produce any figures to show that MC/S is
>> significantly better than symmetric active dm-multipath to an iSCSI
>> target, but if you have them, please publish them.
>>
>> Hiding something from the upper layers which the upper layers could do
>> equally well themselves is what's considered wrong: it adds code bloat
>> with no tangible benefit.
>>
>> James
>>
>>
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-05-26  1:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 21:39 [PATCH RFC 2/2] implement transport scan callout for iscsi Mike Christie
2005-05-24 17:09 ` James Bottomley
     [not found] <42936441.0b798bab.39a4.ffff9774SMTPIN_ADDED@mx.googlegroups.com>
2005-05-24 21:01 ` Mike Christie
2005-05-24 23:17   ` James Bottomley
2005-05-25  0:25     ` open_iscsi
2005-05-25  1:00       ` James Bottomley
2005-05-25  1:28         ` open_iscsi
2005-05-25  5:22           ` Dmitry Yusupov
2005-05-25 12:55             ` open_iscsi
2005-05-25 13:00           ` Ming Zhang
2005-05-25 13:08             ` open_iscsi
2005-05-25 15:18         ` Luben Tuikov
2005-05-25 18:04           ` James Bottomley
2005-05-25 18:32             ` Dmitry Yusupov
2005-05-25 19:42               ` James Bottomley
2005-05-26  1:38             ` open_iscsi
  -- strict thread matches above, loose matches on Subject: below --
2005-05-25  2:20 open_iscsi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox