Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757945AbYBDWBW (ORCPT ); Mon, 4 Feb 2008 17:01:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753718AbYBDWBL (ORCPT ); Mon, 4 Feb 2008 17:01:11 -0500 Received: from smtp109.sbc.mail.mud.yahoo.com ([68.142.198.208]:20787 "HELO smtp109.sbc.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754629AbYBDWBJ (ORCPT ); Mon, 4 Feb 2008 17:01:09 -0500 X-YMail-OSG: UD.95WYVM1ktXbBiI1SmMy.eLDNDHtnCDXKV5lh7odEOmXggraSATglwhtUnuqm9YUfpyGXyqvW8Hy2.Qk3jPmBoU0aCyXwDOPt9ujgk9iPCEFMRyMw- X-Yahoo-Newman-Property: ymail-3 Subject: Re: Integration of SCST in the mainstream Linux kernel From: "Nicholas A. Bellinger" To: Linus Torvalds Cc: "J. Bruce Fields" , James Bottomley , Vladislav Bolkhovitin , Bart Van Assche , Andrew Morton , FUJITA Tomonori , linux-scsi@vger.kernel.org, scst-devel@lists.sourceforge.net, Linux Kernel Mailing List , Mike Christie In-Reply-To: References: <47A05CBD.5050803@vlnb.net> <47A7049A.9000105@vlnb.net> <1202139015.3096.5.camel@localhost.localdomain> <47A73C86.3060604@vlnb.net> <1202144767.3096.38.camel@localhost.localdomain> <47A7488B.4080000@vlnb.net> <1202145901.3096.49.camel@localhost.localdomain> <1202151989.11265.576.camel@haakon2.linux-iscsi.org> <20080204210121.GF18682@fieldses.org> Content-Type: text/plain Date: Mon, 04 Feb 2008 14:00:31 -0800 Message-Id: <1202162431.11265.641.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2903 Lines: 61 On Mon, 2008-02-04 at 13:24 -0800, Linus Torvalds wrote: > > On Mon, 4 Feb 2008, J. Bruce Fields wrote: > > > > I'd assumed the move was primarily because of the difficulty of getting > > correct semantics on a shared filesystem > > .. not even shared. It was hard to get correct semantics full stop. > > Which is a traditional problem. The thing is, the kernel always has some > internal state, and it's hard to expose all the semantics that the kernel > knows about to user space. > > So no, performance is not the only reason to move to kernel space. It can > easily be things like needing direct access to internal data queues (for a > iSCSI target, this could be things like barriers or just tagged commands - > yes, you can probably emulate things like that without access to the > actual IO queues, but are you sure the semantics will be entirely right? > > The kernel/userland boundary is not just a performance boundary, it's an > abstraction boundary too, and these kinds of protocols tend to break > abstractions. NFS broke it by having "file handles" (which is not > something that really exists in user space, and is almost impossible to > emulate correctly), and I bet the same thing happens when emulating a SCSI > target in user space. > > Maybe not. I _rally_ haven't looked into iSCSI, I'm just guessing there > would be things like ordering issues. > . The iSCSI CDBs and write immediate, unsoliciated, or soliciated data payloads may be received out of order across communication paths (which may be going over different subnets) within the nexus, but the execution of the CDB to SCSI Target Port must be in the same order as it came down from the SCSI subsystem on the initiator port. In iSCSI and iSER terms, this is called Command Sequence Number (CmdSN) ordering, and is enforced within each nexus. The initiator node will be assigning the CmdSNs as the CDBs come down, and when communication paths fail, unacknowledged CmdSNs will be retried on a different communication path when using iSCSI/iSER connection recovery. Already acknowledged CmdSNs will be explictly retried using a iSCSI specific task management function called TASK_REASSIGN. This along with CSM-I and CSM-E statemachines are collectly known as ErrorRecoveryLevel=2 in iSCSI. Anyways, here is a great visual of a modern iSCSI Target processor and SCSI Target Engine. The CmdSN ordering is representd by the oval across across iSCSI connections going to various network portals groups on the left side of the diagram. Thanks Eddy Q! http://www.haifa.il.ibm.com/satran/ips/EddyQuicksall-iSCSI-in-diagrams/portal_groups.pdf --nab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/