linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	hch@lst.de, hare@suse.de, agrover@redhat.com,
	michaelc@cs.wisc.edu, bharrosh@panasas.com,
	akpm@linux-foundation.org, martin.svec@zoner.cz,
	jxm@risingtidesystems.com, "J.H." <warthog9@kernel.org>
Subject: Re: [PATCH-v5 07/13] iscsi-target: Add iSCSI Login Negotiation + Parameter logic
Date: Sat, 28 May 2011 13:31:31 -0500	[thread overview]
Message-ID: <1306607491.5630.45.camel@mulgrave.site> (raw)
In-Reply-To: <1306543947.23461.313.camel@haakon2.linux-iscsi.org>

On Fri, 2011-05-27 at 17:52 -0700, Nicholas A. Bellinger wrote:
> On Fri, 2011-05-27 at 18:23 -0500, James Bottomley wrote:
> > On Thu, 2011-05-26 at 17:07 -0700, Nicholas A. Bellinger wrote:
> > > On Fri, 2011-05-27 at 08:47 +0900, FUJITA Tomonori wrote:
> > > > On Thu, 26 May 2011 16:28:10 -0700
> > > > "Nicholas A. Bellinger" <nab@linux-iscsi.org> wrote:
> > > > 
> > > > > As we have discussed at length over the years, the split needs to be all
> > > > > userspace or all kernelspace, and when implementations start doing
> > > > > things in-between they quickly get painful to debug, maintain and
> > > > > extend.  I have no interest in trying to evolve this further when LIO
> > > > 
> > > > Sorry, I disagree. As I explained, once user space passes established nexuses
> > > > to kernel, kernel handles all. I don't think it's painful.
> > > > 
> > > > 
> > > 
> > > Then we are going to have to agree to disgree on this for an individual
> > > target endpoint context and being able to manage (via configfs) a
> > > complete set of iscsi-target features with native python library code.
> > > 
> > > As for moving the mainline iscsi-target efforts to a more complex
> > > default direction is something that we (speaking as LIO maintainer and
> > > on behalf of RisingTide userspace) do not have an interest for an
> > > initial merge.  We owe our users a complete set of functional and stable
> > > kernel and userspace library+shell, and not an untested design with
> > > undetermined time-frame for deployment.
> > 
> > OK, so I understand the commercial imperatives.  However, when a trusted
> > reviewer raises issues, and I check and find myself agreeing, I need
> > them addressed to make forward progress.
> > 
> 
> It's more than that.  It's about the future maintainability of the
> target kernel code.  Doing this reset to push the entire iSCSI login
> into userspace for drivers/target/iscsi/ is technically the wrong
> direction.

You've stated this many times, but never actually given an explanation
of why.

>    We already have a userspace target, and going down this
> direction (again) for iscsi-target is not making forward progress.

This isn't the correct way to look at it.  The choice isn't all in
userspace or all in kernel space.  For performance, the key idea is to
have all the fast paths in kernel space.  However, login is hardly a
fast path.  It's done once at start of day, then occasionally on
connection reset.

Moving some code to userspace doesn't mean all has to move.

> > The issue is simple:
> > 
> >       * We can put all the auth mechanisms in the kernel, so we need a
> >         userspace upcall anyway
> >       * Since we have to have an upcall, it should be the default path
> >         for everything (so it gets well tested).
> > 
> > Just saying "everything has to be in the kernel because mixed
> > user/kernel code is too complex" doesn't fly because we already have a
> > growing list of counter examples, some of which were cited.
> > 
> 
> I am not saying that everything has to be in the kernel.  I am saying
> that the main iSCSI login state machines that *do* *not* effect
> authentication payloads of the iSCSI login process need to be in kernel
> for a kernel-level iscsi-target stack in order to properly support the
> real-time management of the /sys/kernel/config/target/iscsi/ control
> plane.

So what I hear you say is that the login process has to be in-kernel
because otherwise we can't control it from configfs.

I don't think this to be true: you can still have a configfs based
control plane and just do user space upcalls for the pieces that aren't
in-kernel.  I agree with the goal of single control plane, but if
configfs is causing us to be inflexible, I think configfs, rather than
the design, needs to change.

> Being able to support the proper shutdown of all outstanding I/O across
> N:M mapped iSCSI network portals <-> iSCSI TargetName
> +TargetPortalGroupTag endpoints is already not trivial, and wanting to
> move existing iscsi_target_login_thread() logic to (multi-threaded..?)
> userspace where we now have to sychronize with everything going on in
> the kernel is where there is a serious technical problem with what you
> are suggesting that is now required for an initial iscsi-target merge.

I really don't see this.  The broad abstract state machine looks like


|Target Configuration and initialisation|
   |
   |      +----------------------------- (relogin)
   V      V                            |
|Login (userspace)| ----> |Operation (Kernel)| -> |Termination|

That's nicely separable and doesn't really involve state
synchronisation.  Nothing really says that Termination has to be in
userspace (or kernel space).

James



  reply	other threads:[~2011-05-28 18:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20  3:37 [PATCH-v5 00/13] iscsi-target: initial .40-rc1 merge Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 01/13] iscsi: Resolve iscsi_proto.h naming conflicts with drivers/target/iscsi Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 02/13] iscsi: Add Serial Number Arithmetic LT and GT into iscsi_proto.h Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 03/13] iscsi-target: Add iSCSI fabric support for target v4 Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 04/13] iscsi-target: Add TCM v4 compatiable ConfigFS control plane Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 05/13] iscsi-target: Add configfs fabric dependent statistics Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 06/13] iscsi-target: Add TPG and Device logic Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 07/13] iscsi-target: Add iSCSI Login Negotiation + Parameter logic Nicholas A. Bellinger
2011-05-26 16:46   ` James Bottomley
2011-05-26 19:07     ` Nicholas A. Bellinger
2011-05-26 19:29       ` FUJITA Tomonori
2011-05-26 19:49         ` Nicholas A. Bellinger
2011-05-26 20:14           ` James Bottomley
2011-05-26 21:33             ` Nicholas A. Bellinger
2011-05-26 23:04               ` James Bottomley
2011-05-26 23:28                 ` Nicholas A. Bellinger
2011-05-26 23:47                   ` FUJITA Tomonori
2011-05-27  0:07                     ` Nicholas A. Bellinger
2011-05-27 23:23                       ` James Bottomley
2011-05-28  0:52                         ` Nicholas A. Bellinger
2011-05-28 18:31                           ` James Bottomley [this message]
2011-05-28 20:05                             ` Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 08/13] iscsi-target: Add CHAP Authentication support using libcrypto Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 09/13] iscsi-target: Add Sequence/PDU list + DataIN response logic Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 10/13] iscsi-target: Add iSCSI Error Recovery Hierarchy support Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 11/13] iscsi-target: Add support for task management operations Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 12/13] iscsi-target: Add misc utility and debug logic Nicholas A. Bellinger
2011-05-20  3:37 ` [PATCH-v5 13/13] iscsi-target: Add Makefile/Kconfig and update TCM top level Nicholas A. Bellinger
2011-05-24  6:06 ` [PATCH-v5 00/13] iscsi-target: initial .40-rc1 merge Nicholas A. Bellinger
2011-05-26  2:34   ` 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=1306607491.5630.45.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=agrover@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bharrosh@panasas.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jxm@risingtidesystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.svec@zoner.cz \
    --cc=michaelc@cs.wisc.edu \
    --cc=nab@linux-iscsi.org \
    --cc=warthog9@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).