All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [SPDK] SPDK + user space appliance
@ 2018-05-10  6:34 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-05-10  6:34 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 29528 bytes --]

Hi Shahar,


First I apologize I didn't look the patch in detail before reply.


I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi Ben,


You make a good point.

We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.

But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).


Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.


In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.

All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.


I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.


Shahar



________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 46270 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-07-16 22:58 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-07-16 22:58 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 34971 bytes --]

Hi Shahar,


Sorry for my late reply and I have no update in your area. I wish you will find anyone and go forward along with SPDK.


Thanks,

Shuhei


________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
送信日�: 2018年7月12日 23:34:05
宛先: Storage Performance Development Kit
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi,


There hasn't been any activity here for some time.


Shuhei - is there any update?

Is there anyone else on the list who can benefit from an interface to integrate the SPDK target to an existing application?


If there is no use for this interface to others, then we will port it out of SPDK and attempt to use a vanilla spdk so that we can be up to speed with the community, allowing us to both contribute, and fix bugs without needing to change the code base as we currently do.


Thanks,

Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.salzman(a)kaminario.com>
Sent: Sunday, May 13, 2018 11:46:46 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Thanks!

Waiting for your input.

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 <shuheimatsumoto(a)gmail.com>
Sent: Friday, May 11, 2018 4:11:14 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

Thank you for reply to my feedback.

I’m sorry but I don’t have enough to describe about the following now,
I will read your update and If I have anything hereafter I’ll update to you.

Thanks,
Shuhei

On May 10, 2018, at 22:33, Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> wrote:

Hi Shuhei,

You raise some good comments.
If possible, I'd also like feadback on bdev_user.h and how you envision it.
This is probably the most important aspect, and everything else is the gritty details.

Shahar
________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com<mailto:shuhei.matsumoto.xt(a)hitachi.com>>
Sent: Thursday, May 10, 2018 10:36:26 AM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

I wrote a comment in your patch.

Unfortunately the value is not be clear for me yet.
I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.
However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.

I'm happy if you revise me when I'm wrong.

Thanks,
Shuhei


________________________________
差出人: 松本周平 / MATSUMOTO,SHUUHEI
送信日�: 2018年5月10日 15:34
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: RE: [SPDK] SPDK + user space appliance

Hi Shahar,

First I apologize I didn't look the patch in detail before reply.

I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> が Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: [!]Re: [SPDK] SPDK + user space appliance

Hi Ben,

You make a good point.
We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.
But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).

Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.

In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.
All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.

I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.

Shahar


________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com<mailto:walker(a)intel.com>>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Harris, James R
> > <james.r.harris(a)intel.com<mailto:james.r.harris(a)intel.com>>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org<https://clicktime.symantec.com/a/1/heVORVBnkieaS_34_H5LgN8fa691mZ82Ne1Y9W6eo64=?d=eQbogKyK9KCPBU5kjge1fT8zv7bRJWFlVLH6UzaOv9aNsKbV_F86iIWl_reN3wnlJfyUI37S4B0rCI4sxoE8hjwYrDNu2D4ztBIpBfqkpdb5-dYHfv_rIFCUZ-olv-vxkVEUWaIBjAOnyr_VX93CHwkZ9ELr1f41QOryI5AQKO9Gz4l9izT3i5h_cxdsZYugWE08OHPODZViiOohOw272PbYTMOt-qShEdUg9ajLxtL7_Dr5RsY9LAinAkBghqwfMQwsoQZFRohggiCzbdNXyGZ0KOVJMO89wdLa2EQNooeck43fS5V3GacDpa1jhS0bcDkExLEB62U_eVZRd75NEm3zsffla29pUlwgQPSyKtbfiBRpZBfAn1hLuFaHYDkKlTEuYLEN0qE4Wo8DVQwdOCUl4bQp2JmIQ1yE-KhX835-PiI%3D&u=http%3A%2F%2F01.org> on behalf of benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com<mailto:rkamp(a)intel.com>>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io<https://clicktime.symantec.com/a/1/YdnlSjBG3DAjnyA-dKCypQL_tOX96nTvdp_JEpeCOrY=?d=eQbogKyK9KCPBU5kjge1fT8zv7bRJWFlVLH6UzaOv9aNsKbV_F86iIWl_reN3wnlJfyUI37S4B0rCI4sxoE8hjwYrDNu2D4ztBIpBfqkpdb5-dYHfv_rIFCUZ-olv-vxkVEUWaIBjAOnyr_VX93CHwkZ9ELr1f41QOryI5AQKO9Gz4l9izT3i5h_cxdsZYugWE08OHPODZViiOohOw272PbYTMOt-qShEdUg9ajLxtL7_Dr5RsY9LAinAkBghqwfMQwsoQZFRohggiCzbdNXyGZ0KOVJMO89wdLa2EQNooeck43fS5V3GacDpa1jhS0bcDkExLEB62U_eVZRd75NEm3zsffla29pUlwgQPSyKtbfiBRpZBfAn1hLuFaHYDkKlTEuYLEN0qE4Wo8DVQwdOCUl4bQp2JmIQ1yE-KhX835-PiI%3D&u=http%3A%2F%2Fwww.spdk.io>
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/thqaF6NUhGx561e1RnYe2sjE3FOYTcS-CM--vHW3qPc=?d=eQbogKyK9KCPBU5kjge1fT8zv7bRJWFlVLH6UzaOv9aNsKbV_F86iIWl_reN3wnlJfyUI37S4B0rCI4sxoE8hjwYrDNu2D4ztBIpBfqkpdb5-dYHfv_rIFCUZ-olv-vxkVEUWaIBjAOnyr_VX93CHwkZ9ELr1f41QOryI5AQKO9Gz4l9izT3i5h_cxdsZYugWE08OHPODZViiOohOw272PbYTMOt-qShEdUg9ajLxtL7_Dr5RsY9LAinAkBghqwfMQwsoQZFRohggiCzbdNXyGZ0KOVJMO89wdLa2EQNooeck43fS5V3GacDpa1jhS0bcDkExLEB62U_eVZRd75NEm3zsffla29pUlwgQPSyKtbfiBRpZBfAn1hLuFaHYDkKlTEuYLEN0qE4Wo8DVQwdOCUl4bQp2JmIQ1yE-KhX835-PiI%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 71931 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-07-12 14:34 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-07-12 14:34 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 32890 bytes --]

Hi,


There hasn't been any activity here for some time.


Shuhei - is there any update?

Is there anyone else on the list who can benefit from an interface to integrate the SPDK target to an existing application?


If there is no use for this interface to others, then we will port it out of SPDK and attempt to use a vanilla spdk so that we can be up to speed with the community, allowing us to both contribute, and fix bugs without needing to change the code base as we currently do.


Thanks,

Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.salzman(a)kaminario.com>
Sent: Sunday, May 13, 2018 11:46:46 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Thanks!

Waiting for your input.

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 <shuheimatsumoto(a)gmail.com>
Sent: Friday, May 11, 2018 4:11:14 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

Thank you for reply to my feedback.

I’m sorry but I don’t have enough to describe about the following now,
I will read your update and If I have anything hereafter I’ll update to you.

Thanks,
Shuhei

On May 10, 2018, at 22:33, Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> wrote:

Hi Shuhei,

You raise some good comments.
If possible, I'd also like feadback on bdev_user.h and how you envision it.
This is probably the most important aspect, and everything else is the gritty details.

Shahar
________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com<mailto:shuhei.matsumoto.xt(a)hitachi.com>>
Sent: Thursday, May 10, 2018 10:36:26 AM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

I wrote a comment in your patch.

Unfortunately the value is not be clear for me yet.
I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.
However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.

I'm happy if you revise me when I'm wrong.

Thanks,
Shuhei


________________________________
差出人: 松本周平 / MATSUMOTO,SHUUHEI
送信日�: 2018年5月10日 15:34
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: RE: [SPDK] SPDK + user space appliance

Hi Shahar,

First I apologize I didn't look the patch in detail before reply.

I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> が Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: [!]Re: [SPDK] SPDK + user space appliance

Hi Ben,

You make a good point.
We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.
But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).

Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.

In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.
All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.

I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.

Shahar


________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com<mailto:walker(a)intel.com>>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Harris, James R
> > <james.r.harris(a)intel.com<mailto:james.r.harris(a)intel.com>>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org<http://01.org> on behalf of benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com<mailto:rkamp(a)intel.com>>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io<http://www.spdk.io>
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 68902 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-13  8:46 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-13  8:46 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 32095 bytes --]

Thanks!

Waiting for your input.

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 <shuheimatsumoto(a)gmail.com>
Sent: Friday, May 11, 2018 4:11:14 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

Thank you for reply to my feedback.

I’m sorry but I don’t have enough to describe about the following now,
I will read your update and If I have anything hereafter I’ll update to you.

Thanks,
Shuhei

On May 10, 2018, at 22:33, Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> wrote:

Hi Shuhei,

You raise some good comments.
If possible, I'd also like feadback on bdev_user.h and how you envision it.
This is probably the most important aspect, and everything else is the gritty details.

Shahar
________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com<mailto:shuhei.matsumoto.xt(a)hitachi.com>>
Sent: Thursday, May 10, 2018 10:36:26 AM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

I wrote a comment in your patch.

Unfortunately the value is not be clear for me yet.
I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.
However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.

I'm happy if you revise me when I'm wrong.

Thanks,
Shuhei


________________________________
差出人: 松本周平 / MATSUMOTO,SHUUHEI
送信日�: 2018年5月10日 15:34
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: RE: [SPDK] SPDK + user space appliance

Hi Shahar,

First I apologize I didn't look the patch in detail before reply.

I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> が Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: [!]Re: [SPDK] SPDK + user space appliance

Hi Ben,

You make a good point.
We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.
But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).

Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.

In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.
All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.

I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.

Shahar


________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com<mailto:walker(a)intel.com>>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Harris, James R
> > <james.r.harris(a)intel.com<mailto:james.r.harris(a)intel.com>>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org<http://01.org> on behalf of benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com<mailto:rkamp(a)intel.com>>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io<http://www.spdk.io>
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 66099 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-11 13:11 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-05-11 13:11 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 32253 bytes --]

Hi Shahar,

Thank you for reply to my feedback.

I’m sorry but I don’t have enough to describe about the following now,
I will read your update and If I have anything hereafter I’ll update to you. 

Thanks,
Shuhei

> On May 10, 2018, at 22:33, Shahar Salzman <shahar.salzman(a)kaminario.com> wrote:
> 
> Hi Shuhei,
> 
> You raise some good comments.
> If possible, I'd also like feadback on bdev_user.h and how you envision it.
> This is probably the most important aspect, and everything else is the gritty details.
> 
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com>
> Sent: Thursday, May 10, 2018 10:36:26 AM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Shahar,
> 
> I wrote a comment in your patch.
> 
> Unfortunately the value is not be clear for me yet.
> I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.
> However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.
> 
> I'm happy if you revise me when I'm wrong.
> 
> Thanks,
> Shuhei
> 
> 
> 差出人: 松本周平 / MATSUMOTO,SHUUHEI
> 送信日時: 2018年5月10日 15:34
> 宛先: spdk(a)lists.01.org
> 件名: RE: [SPDK] SPDK + user space appliance
>  
> Hi Shahar,
> 
> First I apologize I didn't look the patch in detail before reply.
> 
> I know updating SPDK from 17.07 to 18.01 is not easy task.
> However creating own framework only on the DPDK lockless ring looks cumbersome for me.
> 
> Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately. 
> 
> Thanks,
> Shuhei
> 
> 差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
> 送信日時: 2018年5月10日 4:45
> 宛先: spdk(a)lists.01.org
> 件名: [!]Re: [SPDK] SPDK + user space appliance
>  
> Hi Ben,
> 
> You make a good point.
> We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.
> But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).
> 
> Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.
> 
> In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.
> All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.
> 
> I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.
> 
> Shahar
> 
> 
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
> Sent: Wednesday, May 9, 2018 7:52:38 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> > Hi Ben,
> > 
> > To answer your question first, the main reason to have a generic spdk IO API
> > for storage appliance is being able to maintain functionality over versions.
> > We started with our module in version 17.07, but when we started integrating
> > it into 17.07.01, and the 18.X version we started running into issues. Since
> > the bdev layer is internal to spdk, it makes sense that it will change both in
> > functionality and in interface from time to time especially in NVMeF where the
> > specifications are so young, which is the reason that we would like to have an
> > API which is more stable over versions.
> > As a storage appliance, the requirements are fairly stable, and at least in
> > the case of SCSI, a thin "glue API" had been enough to get the core appliance
> > work with multiple frontend targets (e.g. both SCSI and internal replication).
> > I believe that the same method can be applied to NVMEF.
> > In addition, I think that our use case is not unique to the way we are
> > integrating spdk, which means that the work we put in can benefit other users,
> > and hopefully via their experience, the code can become more robust and
> > useful.
> 
> Thank you for this - now everything is much clearer. I totally agree with what
> you're saying about the API being unstable and internal. That makes it quite
> difficult to write a bdev module that continues to function across releases.
> However, I don't think trading one API (the bdev module API) for another (the
> proposed bdev user API) fixes anything at a fundamental level. This is because
> the API changes we've made to the bdev module API are necessary to correctly
> implement some types of bdev modules (although probably not yours currently).
> Over time, you'll just end up propagating all of those changes into the newly
> proposed bdev user API in order to make it suitable for general use and we won't
> be in any better of a spot than we are today.
> 
> I do think this is a problem that needs to be solved as soon as possible though.
>  The solution, in my mind, is to start the work of defining a public bdev module
> API in include/spdk/bdev_module.h. It will take some work to define the API in a
> way that as many of the implementation details are hidden as possible, but it is
> worth the effort. Most of the module API currently resides in
> include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
> need to become public.
> 
> Once we have a well defined public interface, we can take steps to avoid
> breaking it going forward. I'm giving a talk on API stability at the SPDK summit
> next week that will touch on some of the strategies we plan to employ to keep
> APIs stable over time.
> 
> I'll wait for more feedback to see if we can build some consensus about the best
> path forward here. I'm interested to see if there are any other perspectives
> that may view this a bit differently.
> 
> > 
> > Shahar
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> > .walker(a)intel.com>
> > Sent: Tuesday, May 8, 2018 8:30:20 PM
> > To: spdk(a)lists.01.org
> > Subject: Re: [SPDK] SPDK + user space appliance
> >  
> > On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > > Hi Jim and Ben,
> > > 
> > > For the threading issue, I agree that there is something not very clean in
> > the
> > > interface, as there is an assumption on how the user implements it. As I did
> > > in the bdev_user_example, we also use a ring in order to place all the
> > > incoming IO without delaying the reactor, and then use multiple pollers to
> > > actually handle the IO (deduplication, compression, HA etc.). This is why
> > > there are 2 distinct interfaces - submit_io callback, and
> > > the bdev_user_submit_completion interface which (normally) is called on
> > > another thread (not the original poller), and passed back to the reactor via
> > > the completion queue on the bdev_user_io_channel, and the registered poller
> > > thread which takes from the user completion queue.
> > > Do you think that a cleaner interface would be modifying the submit_io
> > > callback to a poll_io interface which checks a bdev_user internal ring for
> > IO?
> > > Or do you think that the current interface is OK provided good
> > documentation?
> > > 
> > > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> > in
> > > order to register my volumes, I don't really like this since it forces me to
> > > (eventually) add another async callback in my app to verify that device
> > > registration was successful (and this just adds more conditions, futures
> > etc.
> > > in the application). Is there a way to call spdk interfaces directly with a
> > > "non-spdk" thread (i.e. TLS is not initialized)?
> > 
> > I'm not so much concerned yet with the interface you've defined, but rather
> > understanding the whole approach at a high level. The SPDK bdev layer is
> > designed for custom bdev modules to be added, so my primary question is why
> > write a generic bdev_user module as opposed to writing a "your custom storage
> > backend" module? I think this is the key piece, and understanding the process
> > you went through as you designed this will probably yield a whole bunch of
> > good
> > improvements to the current bdev module system.
> > 
> > Thanks,
> > Ben
> > 
> > 
> > > 
> > > Hope this answers the questions,
> > > Shahar
> > 
> > 
> > 
> > > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > > <james.r.harris(a)intel.com>
> > > Sent: Monday, May 7, 2018 9:18:20 PM
> > > To: Storage Performance Development Kit
> > > Subject: Re: [SPDK] SPDK + user space appliance
> > >  
> > > There are also calls such as spdk_call_unaffinitized() and
> > > spdk_unaffinitize_thread() which have been added to enable cases where a
> > bdev
> > > module may need to spawn non-polling threads and don’t want those threads to
> > > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > > uses these (see git commit fa5206c4) since rbd_open is a blocking call. 
> > (Note
> > > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> > > 
> > > -Jim
> > > 
> > > 
> > > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> > s.
> > > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> > > 
> > >     Hi Shahar,
> > >     
> > >     Thank you for submitting the patch. I've looked through it in detail and
> > I
> > > think
> > >     I understand the purpose of this code, but I'm going to explain it back
> > to
> > > you
> > >     so you can correct me where I'm wrong.
> > >     
> > >     I think this code solves two distinct problems:
> > >     
> > >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > > and you
> > >     want the code that does that to live outside of the SPDK repository.
> > >     
> > >     2) Your custom back-end library isn't suitable for use in a run-to-
> > > completion
> > >     model. By that I mean that you can't just call your library directly on
> > > the
> > >     thread that originally receives the spdk_bdev_io request because your
> > > library
> > >     either blocks or generally takes too long to return from the submission
> > > call
> > >     (maybe it is doing inline compression or something). Instead, you need
> > to
> > >     shuttle those requests off to separate threads for handling.
> > >     
> > >     As far as point #1, today the SPDK build system does not nicely
> > > accommodate bdev
> > >     modules whose code lives outside of SPDK. SPDK expects them to be in
> > >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> > to
> > > the
> > >     build system and it's one we've been intending to make for some time.
> > >     
> > >     For point #2, this is likely the case for a large number of storage
> > back-
> > > ends,
> > >     but I think the proper way to solve it is probably back-end specific and
> > > not
> > >     general purpose. As a counter-point, SPDK already integrates with a
> > number
> > > of
> > >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> > and
> > > none
> > >     of those ended up needing to pass messages to other threads. They all
> > > support
> > >     asynchronous operations, though. I could imagine writing a bdev module
> > > that
> > >     ultimately makes POSIX preadv calls, for instance. That would need to be
> > >     implemented with a thread pool and each bdev_io gets funneled off to a
> > > thread in
> > >     the pool to perform the blocking operation.
> > >     
> > >     Ok - I explained what I think I'm understanding. Now tell me where I
> > went
> > > wrong
> > >     :)
> > >     
> > >     Thanks,
> > >     Ben
> > >     
> > >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> > >     > Hi,
> > >     > 
> > >     > I pushed the code for review, thanks Daniel for the help.
> > >     > 
> > >     > In a nutshell:
> > >     > - bdev_user - an API for a user appliance to use spdk as an
> > iSCSI/NVMeF
> > > target
> > >     > - bdev_user_example - reference application
> > >     > - The API relies on rings in order to submit/complete IOs
> > >     > - User appliance registers callbacks for submit_io (should we have
> > >     > read/write/other instead?)
> > >     > - User appliance registers its devices so that they may be added to an
> > >     > existing namespace (I am using RPC to do the management)
> > >     > 
> > >     > Thanks,
> > >     > Shahar
> > >     > 
> > >     > 
> > >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > > <daniel.ve
> > >     > rkamp(a)intel.com>
> > >     > Sent: Thursday, May 3, 2018 8:50 PM
> > >     > To: Storage Performance Development Kit
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > Hi Shahar,
> > >     >  
> > >     > The target branch for the push should be ‘refs/for/master’, not
> > ‘master’
> > > – if
> > >     > you configured a remote as specified in http://www.spdk.io/development <https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
> SPDK Development <https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
> www.spdk.io
> The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...
> 
> 
> > /
> > > it
> > >     > should look like:
> > >     >  
> > >     > [remote "review"]
> > >     >   url = https://review.gerrithub.io/spdk/spdk <https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> > >     >   push = HEAD:refs/for/master
> > >     >  
> > >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org <mailto:spdk-bounces(a)lists.01.org>] On Behalf Of Shahar
> > > Salzman
> > >     > Sent: Thursday, May 3, 2018 1:00 AM
> > >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > Hi Ben,
> > >     >  
> > >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > > not
> > >     > have push rights for gerrithub:
> > >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> > >     > HEAD:master
> > >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io <https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>': 
> > >     > Counting objects: 109, done.
> > >     > Compressing objects: 100% (22/22), done.
> > >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> > >     > Total 22 (delta 14), reused 0 (delta 0)
> > >     > remote: Resolving deltas: 100% (14/14)
> > >     > remote: Branch refs/heads/master:
> > >     > remote: You are not allowed to perform this operation.
> > >     > remote: To push into this reference you need 'Push' rights.
> > >     > remote: User: ShaharSalzman-K
> > >     > remote: Please read the documentation and contact an administrator
> > >     > remote: if you feel the configuration is incorrect
> > >     > remote: Processing changes: refs: 1, done    
> > >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk <https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> > >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > > access
> > >     > denied)
> > >     > error: failed to push some refs to ' <applewebdata://F3DF8C0F-6C2E-4FD3-9552-A798FEFC7777>https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> > ri
> > > thub.i
> > >     > o/a/spdk/spdk'
> > >     >  
> > >     > Am I doing something incorrect, or is this just a permission issue?
> > >     >  
> > >     > Thanks,
> > >     > Shahar
> > >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > > <shahar.sal
> > >     > zman(a)kaminario.com>
> > >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> > >     > To: Storage Performance Development Kit
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > Hi Ben,
> > >     >  
> > >     > The code is currently working on v17.07, we are planning on bumping
> > the
> > >     > version to one of the latest stable versions (18.01?) + master.
> > >     > It will take me (hopefully) a few days to update the code and have our
> > >     > internal CI start running on this version, not sure it would be
> > useful,
> > > but I
> > >     > can get our working 17.07 code (+ reference application) for review
> > much
> > >     > faster.
> > >     > What is the best course of action?
> > >     >  
> > >     > Shahar
> > >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > > <benjamin
> > >     > .walker(a)intel.com>
> > >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> > >     > To: Storage Performance Development Kit
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > Hi Shahar,
> > >     >  
> > >     > Would you be willing to submit your bdev module as a patch on
> > GerritHub?
> > > That
> > >     > way everyone can take a look and provide feedback. If you don’t want
> > it
> > > to run
> > >     > the tests, you can put [RFC] and the beginning of the commit message.
> > >     >  
> > >     > Thanks,
> > >     > Ben
> > >     >  
> > >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org <mailto:spdk-bounces(a)lists.01.org>] On Behalf Of Shahar
> > > Salzman
> > >     > Sent: Monday, April 23, 2018 8:45 AM
> > >     > To: spdk(a)lists.01.org
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > Hi Ben,
> > >     >  
> > >     > Bumping this thread since I've been having some new thoughts on the
> > > issue now
> > >     > that we are starting integration with newer spdk versions.
> > >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > > bdev
> > >     > module is pretty tightly integrated into spdk, perhaps we made some
> > > false
> > >     > assumptions writing the module, but it seems some of the newer spdk
> > > features
> > >     > are complicating the integration.
> > >     > My question is, if this passthrough module is useful, wouldn't it be
> > > better to
> > >     > maintain it as part of spdk so that we can catch issues as soon as
> > they
> > > show
> > >     > up?
> > >     > We would be happy to help with maintaining this module, the module
> > with
> > > is
> > >     > currently part of our CI with our "frozen" spdk version, but once
> > > integrated
> > >     > into the newer version we choose, I'll add it to the CI our CI as
> > well.
> > >     >  
> > >     > Shahar
> > >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > > <benjamin
> > >     > .walker(a)intel.com>
> > >     > Sent: Friday, February 2, 2018 11:43:58 PM
> > >     > To: spdk(a)lists.01.org
> > >     > Subject: Re: [SPDK] SPDK + user space appliance
> > >     >  
> > >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> > >     > > Hi Ben,
> > >     > > 
> > >     > > Would you also like to take a look at the bdev_user module?
> > >     > > It still needs some patching (as some of the stuff is still hard
> > > coded), but
> > >     > I
> > >     > > think we can get most of it cleaned up in a couple of days.
> > >     > > 
> > >     > > In any case, is it the intention that the user write his own bdev
> > > module, or
> > >     > > would this user appliance glue be a useful generic module?
> > >     > 
> > >     > For existing storage stacks that serve block I/O, like the internals
> > of
> > > a SAN,
> > >     > the idea is that you write your own bdev module to forward I/O coming
> > > out of
> > >     > the
> > >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > > mostly
> > >     > as-is.
> > >     > 
> > >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> > won't
> > >     > integrate nicely directly into an existing storage application because
> > > they
> > >     > spawn their own threads and allocate their own memory. To support
> > that,
> > > the
> > >     > libraries may be consumed directly instead of the applications
> > > (lib/iscsi,
> > >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > > threads,
> > >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > > See
> > >     > 
> > >     > http://www.spdk.io/doc/concurrency.html <https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> > >     > 
> > >     > We don't currently have a way to write a custom bdev module that
> > resides
> > >     > outside
> > >     > of the SPDK source tree, but it's very possible to add support for
> > that.
> > > But
> > >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > > writing
> > >     > a
> > >     > bdev module is the recommended way of interacting with the bottom end
> > of
> > > the
> > >     > SPDK bdev layer. I think that's what you really want to be doing in
> > your
> > > code,
> > >     > from what I can tell.
> > >     > 
> > >     > I hope that helps!
> > >     > _______________________________________________
> > >     > SPDK mailing list
> > >     > SPDK(a)lists.01.org
> > >     > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > >     > 
> > >     > _______________________________________________
> > >     > SPDK mailing list
> > >     > SPDK(a)lists.01.org
> > >     > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > >     _______________________________________________
> > >     SPDK mailing list
> > >     SPDK(a)lists.01.org
> > >     https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > >     
> > > 
> > > _______________________________________________
> > > SPDK mailing list
> > > SPDK(a)lists.01.org
> > > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > > _______________________________________________
> > > SPDK mailing list
> > > SPDK(a)lists.01.org
> > > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk <https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 65918 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-10 13:33 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-10 13:33 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 30663 bytes --]

Hi Shuhei,


You raise some good comments.

If possible, I'd also like feadback on bdev_user.h and how you envision it.

This is probably the most important aspect, and everything else is the gritty details.


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com>
Sent: Thursday, May 10, 2018 10:36:26 AM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance


Hi Shahar,


I wrote a comment in your patch.


Unfortunately the value is not be clear for me yet.

I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.

However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.

I'm happy if you revise me when I'm wrong.

Thanks,
Shuhei


________________________________
差出人: 松本周平 / MATSUMOTO,SHUUHEI
送信日�: 2018年5月10日 15:34
宛先: spdk(a)lists.01.org
件名: RE: [SPDK] SPDK + user space appliance


Hi Shahar,


First I apologize I didn't look the patch in detail before reply.


I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi Ben,


You make a good point.

We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.

But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).


Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.


In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.

All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.


I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.


Shahar



________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 50085 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-10  7:36 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-05-10  7:36 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 30153 bytes --]

Hi Shahar,


I wrote a comment in your patch.


Unfortunately the value is not be clear for me yet.

I may understand if you redirect IO from SPDK to application in the layer upon the bdev layer, that is nvmf passthrough without bdev.

However if you go through bdev layer, conversion from bdev_io to alternative software protocol will be done.

I'm happy if you revise me when I'm wrong.

Thanks,
Shuhei


________________________________
差出人: 松本周平 / MATSUMOTO,SHUUHEI
送信日�: 2018年5月10日 15:34
宛先: spdk(a)lists.01.org
件名: RE: [SPDK] SPDK + user space appliance


Hi Shahar,


First I apologize I didn't look the patch in detail before reply.


I know updating SPDK from 17.07 to 18.01 is not easy task.
However creating own framework only on the DPDK lockless ring looks cumbersome for me.

Thanks for your interesting proposal again and I'm sorry that I can't do enough effort to the communitization in this direction immediately.

Thanks,
Shuhei

________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
送信日�: 2018年5月10日 4:45
宛先: spdk(a)lists.01.org
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi Ben,


You make a good point.

We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.

But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).


Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.


In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.

All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.


I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.


Shahar



________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > � if
> >     > you configured a remote as specified in http://www.spdk.io/development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
SPDK Development<https://clicktime.symantec.com/a/1/2lnT0budYxpW2PXSY8HEiOXvlFCSQszZ3SIM1MHB0JY=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment>
www.spdk.io
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/GB_DDqRuq1zFO54SLVrxro_xw7HERbqJcMnMiMbBDCo=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/VcUO-Qgw2gL8FbPOuDuXUXXkaLk7IB4AFnrW-T1g8pw=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/MVty-MgdOhqPHV_jHYc28xjJg6xVIz_CkV4g4xIbT6Q=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/VcP2v4HJWwYtLlvp3_LcgSsqhmYOOUAZscJQHE8uNvI=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2FShaharSalzman-K%40review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/gSi2Tk9by2oTHSOcRTtouCW_2gZMdzPptMegRdpktpE=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/9iamSyfcO7lnQLCKuDk6VVybDrvxG24HyfWz6VTmj44=?d=ESGMfx885Mon-FYabmhD7ls3wtWmBZW9kWgryeq1SISrgpYjCOb4IS6lwYKSCrvtHc7CEvBRgFQdII_hRkKdEHtIPw-_l-2vbpSf4mgn8dWJRwfogT1dkkd4aplrKU00CzI0rDhCgZT67GHdJ7NowVIQ_12RIr45uXe3dXDgV1slShko1C3-ayHaghRMgJQoGQz5ewaurDC42wc7_w1BEs8oj1QoSKsDNxm9-hFs4L9a-XshONMr1SxTXIt9EIfUvWoaFlCtJeJikXq2XnYc-tunDEHEykqgMCz_AWlpwA4UE5RVCmkekk-Fuxjm4UYnc6ggHScc1xqmGn-WwsISBpjmD_tGzsoKqRuVhiV01CId-_wCmWsv-uXcoIhW0e_JPIuV6LLTZhTPZ8JMljeezHgswSjkLaVkX1U3lDxg25b69Q%3D%3D&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 49165 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09 19:45 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-09 19:45 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 20314 bytes --]

Hi Ben,


You make a good point.

We are looking for a stable API, so given a stable API which is not under bdev_internal, I can port the entire bdev_user module into my glue API, and use it as my spdk gateway.

But there is a benefit to pushing this to the community, since it would seem that the semantics (e.g. register_device, submit/poll for IO, complete IO) are very similar to those attempting to integrate spdk to a storage appliance (I would love to hear from Shuhei Matsumoto or  Eyal Harari which seem to be attempting a similar integration of spdk to their products).


Using this sort of API is much easier than having to understand an elaborate bdev API, spdk threading concerns, reactor issues etc.


In addition, since the semantics are similar, I would imagine that if each user writes their own integration module, we end up with multple versions of the same code.

All parties eventually benefit from the "communitization" since we can openly discuss the interface, and code quality of a common module should be much better than any "private" copy.


I also agree, that if this module goes upstream it needs to be paired with a good unit test running in CI so that as the internal interface evolves and as bdev changes, module breakages are easily detected, otherwise issues need to be solved upon integrating a new version.


Shahar



________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Wednesday, May 9, 2018 7:52:38 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

>
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > – if
> >     > you configured a remote as specified in http://www.spdk.io/development
SPDK Development<http://www.spdk.io/development>
www.spdk.io
The Storage Performance Development Kit (SPDK) provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode instead of relying on interrupts, which avoids kernel context switches and ...



> /
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 34668 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09 16:52 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-05-09 16:52 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 18255 bytes --]

On Wed, 2018-05-09 at 07:48 +0000, Shahar Salzman wrote:
> Hi Ben,
> 
> To answer your question first, the main reason to have a generic spdk IO API
> for storage appliance is being able to maintain functionality over versions.
> We started with our module in version 17.07, but when we started integrating
> it into 17.07.01, and the 18.X version we started running into issues. Since
> the bdev layer is internal to spdk, it makes sense that it will change both in
> functionality and in interface from time to time especially in NVMeF where the
> specifications are so young, which is the reason that we would like to have an
> API which is more stable over versions.
> As a storage appliance, the requirements are fairly stable, and at least in
> the case of SCSI, a thin "glue API" had been enough to get the core appliance
> work with multiple frontend targets (e.g. both SCSI and internal replication).
> I believe that the same method can be applied to NVMEF.
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other users,
> and hopefully via their experience, the code can become more robust and
> useful.

Thank you for this - now everything is much clearer. I totally agree with what
you're saying about the API being unstable and internal. That makes it quite
difficult to write a bdev module that continues to function across releases.
However, I don't think trading one API (the bdev module API) for another (the
proposed bdev user API) fixes anything at a fundamental level. This is because
the API changes we've made to the bdev module API are necessary to correctly
implement some types of bdev modules (although probably not yours currently).
Over time, you'll just end up propagating all of those changes into the newly
proposed bdev user API in order to make it suitable for general use and we won't
be in any better of a spot than we are today.

I do think this is a problem that needs to be solved as soon as possible though.
 The solution, in my mind, is to start the work of defining a public bdev module
API in include/spdk/bdev_module.h. It will take some work to define the API in a
way that as many of the implementation details are hidden as possible, but it is
worth the effort. Most of the module API currently resides in
include/spdk_internal/bdev.h, but there is a lot of stuff in there that doesn't
need to become public.

Once we have a well defined public interface, we can take steps to avoid
breaking it going forward. I'm giving a talk on API stability at the SPDK summit
next week that will touch on some of the strategies we plan to employ to keep
APIs stable over time.

I'll wait for more feedback to see if we can build some consensus about the best
path forward here. I'm interested to see if there are any other perspectives
that may view this a bit differently.

> 
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, May 8, 2018 8:30:20 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> > 
> > For the threading issue, I agree that there is something not very clean in
> the
> > interface, as there is an assumption on how the user implements it. As I did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor via
> > the completion queue on the bdev_user_io_channel, and the registered poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring for
> IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> > 
> > Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call
> in
> > order to register my volumes, I don't really like this since it forces me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
> 
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom storage
> backend" module? I think this is the key piece, and understanding the process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
> 
> Thanks,
> Ben
> 
> 
> > 
> > Hope this answers the questions,
> > Shahar
> 
> 
> 
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >  
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call. 
> (Note
> > that librbd does now support rbd_aio_open which is better suited for SPDK.)
> > 
> > -Jim
> > 
> > 
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)list
> s.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> > 
> >     Hi Shahar,
> >     
> >     Thank you for submitting the patch. I've looked through it in detail and
> I
> > think
> >     I understand the purpose of this code, but I'm going to explain it back
> to
> > you
> >     so you can correct me where I'm wrong.
> >     
> >     I think this code solves two distinct problems:
> >     
> >     1) You need to forward I/O out of the bdev layer to some custom backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >     
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you need
> to
> >     shuttle those requests off to separate threads for handling.
> >     
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward change
> to
> > the
> >     build system and it's one we've been intending to make for some time.
> >     
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.)
> and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need to be
> >     implemented with a thread pool and each bdev_io gets funneled off to a
> > thread in
> >     the pool to perform the blocking operation.
> >     
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >     
> >     Thanks,
> >     Ben
> >     
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     > 
> >     > I pushed the code for review, thanks Daniel for the help.
> >     > 
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added to an
> >     > existing namespace (I am using RPC to do the management)
> >     > 
> >     > Thanks,
> >     > Shahar
> >     > 
> >     > 
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > Hi Shahar,
> >     >  
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > – if
> >     > you configured a remote as specified in http://www.spdk.io/development
> /
> > it
> >     > should look like:
> >     >  
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk
> >     >   push = HEAD:refs/for/master
> >     >  
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > Hi Ben,
> >     >  
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io': 
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done    
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> > access
> >     > denied)
> >     > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.ger
> ri
> > thub.i
> >     > o/a/spdk/spdk'
> >     >  
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >  
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > Hi Ben,
> >     >  
> >     > The code is currently working on v17.07, we are planning on bumping
> the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for review
> much
> >     > faster.
> >     > What is the best course of action?
> >     >  
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > Hi Shahar,
> >     >  
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t want
> it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit message.
> >     >  
> >     > Thanks,
> >     > Ben
> >     >  
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > Hi Ben,
> >     >  
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >  
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >  
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > > 
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > > 
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     > 
> >     > For existing storage stacks that serve block I/O, like the internals
> of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> > mostly
> >     > as-is.
> >     > 
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> > threads,
> >     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> > See
> >     > 
> >     > http://www.spdk.io/doc/concurrency.html
> >     > 
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom end
> of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing in
> your
> > code,
> >     > from what I can tell.
> >     > 
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> >     > 
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk
> >     
> > 
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09 11:57 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-09 11:57 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 24987 bytes --]

Hi Shuhei,


Thanks for the input!

Good to hear that this can be useful for you as well, this is why we are attempting to push it to the community.

Would be great to get your feadback on the module itself on gerrithub - https://review.gerrithub.io/#/c/spdk/spdk/+/410159/

Reference application (for review, and testing) - https://review.gerrithub.io/#/c/spdk/spdk/+/410160/

There are still some features missing such as a richer register_device interface, unregister_device (not implemented yet), and probably a better submit_io API.

Thanks,
Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of 松本周平 <shuheimatsumoto(a)gmail.com>
Sent: Wednesday, May 9, 2018 12:54:27 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance

Hi Shahar,

I asked a question to you because our team may be interested in that. But that is outside of open source and spdk. Hence you can ignore that.

What I can say is your use case of spdk may not be unique and may attract any interest.

Thanks again,
Shuhei


2018年5月9日(水) 17:43 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com<mailto:shuhei.matsumoto.xt(a)hitachi.com>>:

Hi Shahar,


Thank you for your interesting proposal and excuse me for cutting in the thread.

Do you have any plan to use similar or better mechanism between your application and another backend SPDK bdev or device driver (e.g. nvme, bdev_nvme) ?


Thanks,

Shuhei


________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> が Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>> の代理で送信
送信日�: 2018年5月9日 16:48:37
宛先: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi Ben,


To answer your question first, the main reason to have a generic spdk IO API for storage appliance is being able to maintain functionality over versions.

We started with our module in version 17.07, but when we started integrating it into 17.07.01, and the 18.X version we started running into issues. Since the bdev layer is internal to spdk, it makes sense that it will change both in functionality and in interface from time to time especially in NVMeF where the specifications are so young, which is the reason that we would like to have an API which is more stable over versions.

As a storage appliance, the requirements are fairly stable, and at least in the case of SCSI, a thin "glue API" had been enough to get the core appliance work with multiple frontend targets (e.g. both SCSI and internal replication). I believe that the same method can be applied to NVMEF.

In addition, I think that our use case is not unique to the way we are integrating spdk, which means that the work we put in can benefit other users, and hopefully via their experience, the code can become more robust and useful.


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Tuesday, May 8, 2018 8:30:20 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> Hi Jim and Ben,
>
> For the threading issue, I agree that there is something not very clean in the
> interface, as there is an assumption on how the user implements it. As I did
> in the bdev_user_example, we also use a ring in order to place all the
> incoming IO without delaying the reactor, and then use multiple pollers to
> actually handle the IO (deduplication, compression, HA etc.). This is why
> there are 2 distinct interfaces - submit_io callback, and
> the bdev_user_submit_completion interface which (normally) is called on
> another thread (not the original poller), and passed back to the reactor via
> the completion queue on the bdev_user_io_channel, and the registered poller
> thread which takes from the user completion queue.
> Do you think that a cleaner interface would be modifying the submit_io
> callback to a poll_io interface which checks a bdev_user internal ring for IO?
> Or do you think that the current interface is OK provided good documentation?
>
> Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call in
> order to register my volumes, I don't really like this since it forces me to
> (eventually) add another async callback in my app to verify that device
> registration was successful (and this just adds more conditions, futures etc.
> in the application). Is there a way to call spdk interfaces directly with a
> "non-spdk" thread (i.e. TLS is not initialized)?

I'm not so much concerned yet with the interface you've defined, but rather
understanding the whole approach at a high level. The SPDK bdev layer is
designed for custom bdev modules to be added, so my primary question is why
write a generic bdev_user module as opposed to writing a "your custom storage
backend" module? I think this is the key piece, and understanding the process
you went through as you designed this will probably yield a whole bunch of good
improvements to the current bdev module system.

Thanks,
Ben


>
> Hope this answers the questions,
> Shahar



> From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Harris, James R
> <james.r.harris(a)intel.com<mailto:james.r.harris(a)intel.com>>
> Sent: Monday, May 7, 2018 9:18:20 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>
> There are also calls such as spdk_call_unaffinitized() and
> spdk_unaffinitize_thread() which have been added to enable cases where a bdev
> module may need to spawn non-polling threads and don’t want those threads to
> inherit the affinity of the calling thread.  The SPDK rbd module currently
> uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note
> that librbd does now support rbd_aio_open which is better suited for SPDK.)
>
> -Jim
>
>
> On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.
> 01.org<http://01.org> on behalf of benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>> wrote:
>
>     Hi Shahar,
>
>     Thank you for submitting the patch. I've looked through it in detail and I
> think
>     I understand the purpose of this code, but I'm going to explain it back to
> you
>     so you can correct me where I'm wrong.
>
>     I think this code solves two distinct problems:
>
>     1) You need to forward I/O out of the bdev layer to some custom backend,
> and you
>     want the code that does that to live outside of the SPDK repository.
>
>     2) Your custom back-end library isn't suitable for use in a run-to-
> completion
>     model. By that I mean that you can't just call your library directly on
> the
>     thread that originally receives the spdk_bdev_io request because your
> library
>     either blocks or generally takes too long to return from the submission
> call
>     (maybe it is doing inline compression or something). Instead, you need to
>     shuttle those requests off to separate threads for handling.
>
>     As far as point #1, today the SPDK build system does not nicely
> accommodate bdev
>     modules whose code lives outside of SPDK. SPDK expects them to be in
>     lib/bdev/<module_name>. However, that's a fairly straightforward change to
> the
>     build system and it's one we've been intending to make for some time.
>
>     For point #2, this is likely the case for a large number of storage back-
> ends,
>     but I think the proper way to solve it is probably back-end specific and
> not
>     general purpose. As a counter-point, SPDK already integrates with a number
> of
>     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and
> none
>     of those ended up needing to pass messages to other threads. They all
> support
>     asynchronous operations, though. I could imagine writing a bdev module
> that
>     ultimately makes POSIX preadv calls, for instance. That would need to be
>     implemented with a thread pool and each bdev_io gets funneled off to a
> thread in
>     the pool to perform the blocking operation.
>
>     Ok - I explained what I think I'm understanding. Now tell me where I went
> wrong
>     :)
>
>     Thanks,
>     Ben
>
>     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
>     > Hi,
>     >
>     > I pushed the code for review, thanks Daniel for the help.
>     >
>     > In a nutshell:
>     > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF
> target
>     > - bdev_user_example - reference application
>     > - The API relies on rings in order to submit/complete IOs
>     > - User appliance registers callbacks for submit_io (should we have
>     > read/write/other instead?)
>     > - User appliance registers its devices so that they may be added to an
>     > existing namespace (I am using RPC to do the management)
>     >
>     > Thanks,
>     > Shahar
>     >
>     >
>     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Verkamp, Daniel
> <daniel.ve<http://daniel.ve>
>     > rkamp(a)intel.com<mailto:rkamp(a)intel.com>>
>     > Sent: Thursday, May 3, 2018 8:50 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > The target branch for the push should be ‘refs/for/master’, not ‘master’
> � if
>     > you configured a remote as specified in http://www.spdk.io/development/<https://clicktime.symantec.com/a/1/rh-3VHZYpue836WL7xk6PeNj07Uasa-f3mk1qF-DlT8=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment%2F>
> it
>     > should look like:
>     >
>     > [remote "review"]
>     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/OaPVuVr1G_KXx82bpWq6qv45xczw5GbHXXv708RDuZc=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
>     >   push = HEAD:refs/for/master
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Thursday, May 3, 2018 1:00 AM
>     > To: Storage Performance Development Kit <spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> not
>     > have push rights for gerrithub:
>     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
>     > HEAD:master
>     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/ud1ifedg4A2TOIWlEPo3kRFZ64BHL6kUmZ3LkrD49QE=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
>     > Counting objects: 109, done.
>     > Compressing objects: 100% (22/22), done.
>     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
>     > Total 22 (delta 14), reused 0 (delta 0)
>     > remote: Resolving deltas: 100% (14/14)
>     > remote: Branch refs/heads/master:
>     > remote: You are not allowed to perform this operation.
>     > remote: To push into this reference you need 'Push' rights.
>     > remote: User: ShaharSalzman-K
>     > remote: Please read the documentation and contact an administrator
>     > remote: if you feel the configuration is incorrect
>     > remote: Processing changes: refs: 1, done
>     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/Cz0Uw9En12eN0FYoXd9iawGSsRVIB2zjPgGsO4NHLLU=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
>     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> access
>     > denied)
>     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/iPAMfi9JTgrCsBpj-3dTOiwjRg4TO0R9p-532zfvTJo=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerri

> thub.i
>     > o/a/spdk/spdk'
>     >
>     > Am I doing something incorrect, or is this just a permission issue?
>     >
>     > Thanks,
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Shahar Salzman
> <shahar.sal
>     > zman(a)kaminario.com<mailto:zman(a)kaminario.com>>
>     > Sent: Wednesday, April 25, 2018 9:02:38 AM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > The code is currently working on v17.07, we are planning on bumping the
>     > version to one of the latest stable versions (18.01?) + master.
>     > It will take me (hopefully) a few days to update the code and have our
>     > internal CI start running on this version, not sure it would be useful,
> but I
>     > can get our working 17.07 code (+ reference application) for review much
>     > faster.
>     > What is the best course of action?
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com<mailto:walker(a)intel.com>>
>     > Sent: Tuesday, April 24, 2018 7:19:12 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > Would you be willing to submit your bdev module as a patch on GerritHub?
> That
>     > way everyone can take a look and provide feedback. If you don’t want it
> to run
>     > the tests, you can put [RFC] and the beginning of the commit message.
>     >
>     > Thanks,
>     > Ben
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Monday, April 23, 2018 8:45 AM
>     > To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > Bumping this thread since I've been having some new thoughts on the
> issue now
>     > that we are starting integration with newer spdk versions.
>     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> bdev
>     > module is pretty tightly integrated into spdk, perhaps we made some
> false
>     > assumptions writing the module, but it seems some of the newer spdk
> features
>     > are complicating the integration.
>     > My question is, if this passthrough module is useful, wouldn't it be
> better to
>     > maintain it as part of spdk so that we can catch issues as soon as they
> show
>     > up?
>     > We would be happy to help with maintaining this module, the module with
> is
>     > currently part of our CI with our "frozen" spdk version, but once
> integrated
>     > into the newer version we choose, I'll add it to the CI our CI as well.
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com<mailto:walker(a)intel.com>>
>     > Sent: Friday, February 2, 2018 11:43:58 PM
>     > To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
>     > > Hi Ben,
>     > >
>     > > Would you also like to take a look at the bdev_user module?
>     > > It still needs some patching (as some of the stuff is still hard
> coded), but
>     > I
>     > > think we can get most of it cleaned up in a couple of days.
>     > >
>     > > In any case, is it the intention that the user write his own bdev
> module, or
>     > > would this user appliance glue be a useful generic module?
>     >
>     > For existing storage stacks that serve block I/O, like the internals of
> a SAN,
>     > the idea is that you write your own bdev module to forward I/O coming
> out of
>     > the
>     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> mostly
>     > as-is.
>     >
>     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
>     > integrate nicely directly into an existing storage application because
> they
>     > spawn their own threads and allocate their own memory. To support that,
> the
>     > libraries may be consumed directly instead of the applications
> (lib/iscsi,
>     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> threads,
>     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> See
>     >
>     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/MS3ce6M64PLWuj-ql0OTuUYYLehh4rXFKEL9FywZ35M=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
>     >
>     > We don't currently have a way to write a custom bdev module that resides
>     > outside
>     > of the SPDK source tree, but it's very possible to add support for that.
> But
>     > beyond that inconvenience (just drop your module in lib/bdev for now),
> writing
>     > a
>     > bdev module is the recommended way of interacting with the bottom end of
> the
>     > SPDK bdev layer. I think that's what you really want to be doing in your
> code,
>     > from what I can tell.
>     >
>     > I hope that helps!
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
>     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>     >
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
>     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>     _______________________________________________
>     SPDK mailing list
>     SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
>     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>
>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 40078 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09  9:54 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-05-09  9:54 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 24381 bytes --]

Hi Shahar,

I asked a question to you because our team may be interested in that. But
that is outside of open source and spdk. Hence you can ignore that.

What I can say is your use case of spdk may not be unique and may attract
any interest.

Thanks again,
Shuhei


2018年5月9日(水) 17:43 松本周平 / MATSUMOTO,SHUUHEI <shuhei.matsumoto.xt(a)hitachi.com
>:

> Hi Shahar,
>
>
> Thank you for your interesting proposal and excuse me for cutting in the
> thread.
>
> Do you have any plan to use similar or better mechanism between your
> application and another backend SPDK bdev or device driver (e.g. nvme,
> bdev_nvme) ?
>
>
> Thanks,
>
> Shuhei
>
>
> ------------------------------
> *差出人:* SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <
> shahar.salzman(a)kaminario.com> の代理で送信
> *送信日時:* 2018年5月9日 16:48:37
> *宛先:* spdk(a)lists.01.org
> *件名:* [!]Re: [SPDK] SPDK + user space appliance
>
>
> Hi Ben,
>
>
> To answer your question first, the main reason to have a generic spdk
> IO API for storage appliance is being able to maintain functionality over
> versions.
>
> We started with our module in version 17.07, but when we started
> integrating it into 17.07.01, and the 18.X version we started running into
> issues. Since the bdev layer is internal to spdk, it makes sense that it
> will change both in functionality and in interface from time to time
> especially in NVMeF where the specifications are so young, which is the
> reason that we would like to have an API which is more stable over versions.
>
> As a storage appliance, the requirements are fairly stable, and at least
> in the case of SCSI, a thin "glue API" had been enough to get the core
> appliance work with multiple frontend targets (e.g. both SCSI and internal
> replication). I believe that the same method can be applied to NVMEF.
>
> In addition, I think that our use case is not unique to the way we are
> integrating spdk, which means that the work we put in can benefit other
> users, and hopefully via their experience, the code can become more robust
> and useful.
>
>
> Shahar
> ------------------------------
> *From:* SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <
> benjamin.walker(a)intel.com>
> *Sent:* Tuesday, May 8, 2018 8:30:20 PM
> *To:* spdk(a)lists.01.org
> *Subject:* Re: [SPDK] SPDK + user space appliance
>
> On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> > Hi Jim and Ben,
> >
> > For the threading issue, I agree that there is something not very clean
> in the
> > interface, as there is an assumption on how the user implements it. As I
> did
> > in the bdev_user_example, we also use a ring in order to place all the
> > incoming IO without delaying the reactor, and then use multiple pollers
> to
> > actually handle the IO (deduplication, compression, HA etc.). This is why
> > there are 2 distinct interfaces - submit_io callback, and
> > the bdev_user_submit_completion interface which (normally) is called on
> > another thread (not the original poller), and passed back to the reactor
> via
> > the completion queue on the bdev_user_io_channel, and the registered
> poller
> > thread which takes from the user completion queue.
> > Do you think that a cleaner interface would be modifying the submit_io
> > callback to a poll_io interface which checks a bdev_user internal ring
> for IO?
> > Or do you think that the current interface is OK provided good
> documentation?
> >
> > Regarding the spdk_call_unaffinitized, I am currently using
> spdk_event_call in
> > order to register my volumes, I don't really like this since it forces
> me to
> > (eventually) add another async callback in my app to verify that device
> > registration was successful (and this just adds more conditions, futures
> etc.
> > in the application). Is there a way to call spdk interfaces directly
> with a
> > "non-spdk" thread (i.e. TLS is not initialized)?
>
> I'm not so much concerned yet with the interface you've defined, but rather
> understanding the whole approach at a high level. The SPDK bdev layer is
> designed for custom bdev modules to be added, so my primary question is why
> write a generic bdev_user module as opposed to writing a "your custom
> storage
> backend" module? I think this is the key piece, and understanding the
> process
> you went through as you designed this will probably yield a whole bunch of
> good
> improvements to the current bdev module system.
>
> Thanks,
> Ben
>
>
> >
> > Hope this answers the questions,
> > Shahar
>
>
>
> > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> > <james.r.harris(a)intel.com>
> > Sent: Monday, May 7, 2018 9:18:20 PM
> > To: Storage Performance Development Kit
> > Subject: Re: [SPDK] SPDK + user space appliance
> >
> > There are also calls such as spdk_call_unaffinitized() and
> > spdk_unaffinitize_thread() which have been added to enable cases where a
> bdev
> > module may need to spawn non-polling threads and don’t want those
> threads to
> > inherit the affinity of the calling thread.  The SPDK rbd module
> currently
> > uses these (see git commit fa5206c4) since rbd_open is a blocking call.
> (Note
> > that librbd does now support rbd_aio_open which is better suited for
> SPDK.)
> >
> > -Jim
> >
> >
> > On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin"
> <spdk-bounces(a)lists.
> > 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> >
> >     Hi Shahar,
> >
> >     Thank you for submitting the patch. I've looked through it in detail
> and I
> > think
> >     I understand the purpose of this code, but I'm going to explain it
> back to
> > you
> >     so you can correct me where I'm wrong.
> >
> >     I think this code solves two distinct problems:
> >
> >     1) You need to forward I/O out of the bdev layer to some custom
> backend,
> > and you
> >     want the code that does that to live outside of the SPDK repository.
> >
> >     2) Your custom back-end library isn't suitable for use in a run-to-
> > completion
> >     model. By that I mean that you can't just call your library directly
> on
> > the
> >     thread that originally receives the spdk_bdev_io request because your
> > library
> >     either blocks or generally takes too long to return from the
> submission
> > call
> >     (maybe it is doing inline compression or something). Instead, you
> need to
> >     shuttle those requests off to separate threads for handling.
> >
> >     As far as point #1, today the SPDK build system does not nicely
> > accommodate bdev
> >     modules whose code lives outside of SPDK. SPDK expects them to be in
> >     lib/bdev/<module_name>. However, that's a fairly straightforward
> change to
> > the
> >     build system and it's one we've been intending to make for some time.
> >
> >     For point #2, this is likely the case for a large number of storage
> back-
> > ends,
> >     but I think the proper way to solve it is probably back-end specific
> and
> > not
> >     general purpose. As a counter-point, SPDK already integrates with a
> number
> > of
> >     third-party storage back-ends today (Ceph RBD, libiscsi, libaio,
> etc.) and
> > none
> >     of those ended up needing to pass messages to other threads. They all
> > support
> >     asynchronous operations, though. I could imagine writing a bdev
> module
> > that
> >     ultimately makes POSIX preadv calls, for instance. That would need
> to be
> >     implemented with a thread pool and each bdev_io gets funneled off to
> a
> > thread in
> >     the pool to perform the blocking operation.
> >
> >     Ok - I explained what I think I'm understanding. Now tell me where I
> went
> > wrong
> >     :)
> >
> >     Thanks,
> >     Ben
> >
> >     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> >     > Hi,
> >     >
> >     > I pushed the code for review, thanks Daniel for the help.
> >     >
> >     > In a nutshell:
> >     > - bdev_user - an API for a user appliance to use spdk as an
> iSCSI/NVMeF
> > target
> >     > - bdev_user_example - reference application
> >     > - The API relies on rings in order to submit/complete IOs
> >     > - User appliance registers callbacks for submit_io (should we have
> >     > read/write/other instead?)
> >     > - User appliance registers its devices so that they may be added
> to an
> >     > existing namespace (I am using RPC to do the management)
> >     >
> >     > Thanks,
> >     > Shahar
> >     >
> >     >
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp,
> Daniel
> > <daniel.ve
> >     > rkamp(a)intel.com>
> >     > Sent: Thursday, May 3, 2018 8:50 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > The target branch for the push should be ‘refs/for/master’, not
> ‘master’
> > – if
> >     > you configured a remote as specified in
> http://www.spdk.io/development/
> <https://clicktime.symantec.com/a/1/rh-3VHZYpue836WL7xk6PeNj07Uasa-f3mk1qF-DlT8=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment%2F>
> > it
> >     > should look like:
> >     >
> >     > [remote "review"]
> >     >   url = https://review.gerrithub.io/spdk/spdk
> <https://clicktime.symantec.com/a/1/OaPVuVr1G_KXx82bpWq6qv45xczw5GbHXXv708RDuZc=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
> >     >   push = HEAD:refs/for/master
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org
> <spdk-bounces(a)lists.01.org>] On Behalf Of Shahar
> > Salzman
> >     > Sent: Thursday, May 3, 2018 1:00 AM
> >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > I have the code ready for review (spdk/master on dpdk/18.02), but
> I do
> > not
> >     > have push rights for gerrithub:
> >     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push
> spdk-review
> >     > HEAD:master
> >     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io
> <https://clicktime.symantec.com/a/1/ud1ifedg4A2TOIWlEPo3kRFZ64BHL6kUmZ3LkrD49QE=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
>
> >     > Counting objects: 109, done.
> >     > Compressing objects: 100% (22/22), done.
> >     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> >     > Total 22 (delta 14), reused 0 (delta 0)
> >     > remote: Resolving deltas: 100% (14/14)
> >     > remote: Branch refs/heads/master:
> >     > remote: You are not allowed to perform this operation.
> >     > remote: To push into this reference you need 'Push' rights.
> >     > remote: User: ShaharSalzman-K
> >     > remote: Please read the documentation and contact an administrator
> >     > remote: if you feel the configuration is incorrect
> >     > remote: Processing changes: refs: 1, done
> >     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
> <https://clicktime.symantec.com/a/1/Cz0Uw9En12eN0FYoXd9iawGSsRVIB2zjPgGsO4NHLLU=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
> >     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref
> update
> > access
> >     > denied)
> >     > error: failed to push some refs to '
> https://clicktime.symantec.com/a/1/iPAMfi9JTgrCsBpj-3dTOiwjRg4TO0R9p-532zfvTJo=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerri
>
> > thub.i
> >     > o/a/spdk/spdk'
> >     >
> >     > Am I doing something incorrect, or is this just a permission issue?
> >     >
> >     > Thanks,
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> > <shahar.sal
> >     > zman(a)kaminario.com>
> >     > Sent: Wednesday, April 25, 2018 9:02:38 AM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > The code is currently working on v17.07, we are planning on
> bumping the
> >     > version to one of the latest stable versions (18.01?) + master.
> >     > It will take me (hopefully) a few days to update the code and have
> our
> >     > internal CI start running on this version, not sure it would be
> useful,
> > but I
> >     > can get our working 17.07 code (+ reference application) for
> review much
> >     > faster.
> >     > What is the best course of action?
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker,
> Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Tuesday, April 24, 2018 7:19:12 PM
> >     > To: Storage Performance Development Kit
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Shahar,
> >     >
> >     > Would you be willing to submit your bdev module as a patch on
> GerritHub?
> > That
> >     > way everyone can take a look and provide feedback. If you don’t
> want it
> > to run
> >     > the tests, you can put [RFC] and the beginning of the commit
> message.
> >     >
> >     > Thanks,
> >     > Ben
> >     >
> >     > From: SPDK [mailto:spdk-bounces(a)lists.01.org
> <spdk-bounces(a)lists.01.org>] On Behalf Of Shahar
> > Salzman
> >     > Sent: Monday, April 23, 2018 8:45 AM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > Hi Ben,
> >     >
> >     > Bumping this thread since I've been having some new thoughts on the
> > issue now
> >     > that we are starting integration with newer spdk versions.
> >     > Unfortunately the merge isn't as smooth as I'd like it to be since
> the
> > bdev
> >     > module is pretty tightly integrated into spdk, perhaps we made some
> > false
> >     > assumptions writing the module, but it seems some of the newer spdk
> > features
> >     > are complicating the integration.
> >     > My question is, if this passthrough module is useful, wouldn't it
> be
> > better to
> >     > maintain it as part of spdk so that we can catch issues as soon as
> they
> > show
> >     > up?
> >     > We would be happy to help with maintaining this module, the module
> with
> > is
> >     > currently part of our CI with our "frozen" spdk version, but once
> > integrated
> >     > into the newer version we choose, I'll add it to the CI our CI as
> well.
> >     >
> >     > Shahar
> >     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker,
> Benjamin
> > <benjamin
> >     > .walker(a)intel.com>
> >     > Sent: Friday, February 2, 2018 11:43:58 PM
> >     > To: spdk(a)lists.01.org
> >     > Subject: Re: [SPDK] SPDK + user space appliance
> >     >
> >     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> >     > > Hi Ben,
> >     > >
> >     > > Would you also like to take a look at the bdev_user module?
> >     > > It still needs some patching (as some of the stuff is still hard
> > coded), but
> >     > I
> >     > > think we can get most of it cleaned up in a couple of days.
> >     > >
> >     > > In any case, is it the intention that the user write his own bdev
> > module, or
> >     > > would this user appliance glue be a useful generic module?
> >     >
> >     > For existing storage stacks that serve block I/O, like the
> internals of
> > a SAN,
> >     > the idea is that you write your own bdev module to forward I/O
> coming
> > out of
> >     > the
> >     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost
> targets
> > mostly
> >     > as-is.
> >     >
> >     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications
> won't
> >     > integrate nicely directly into an existing storage application
> because
> > they
> >     > spawn their own threads and allocate their own memory. To support
> that,
> > the
> >     > libraries may be consumed directly instead of the applications
> > (lib/iscsi,
> >     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their
> own
> > threads,
> >     > but instead rely on SPDK's abstractions in
> include/spdk/io_channel.h.
> > See
> >     >
> >     > http://www.spdk.io/doc/concurrency.html
> <https://clicktime.symantec.com/a/1/MS3ce6M64PLWuj-ql0OTuUYYLehh4rXFKEL9FywZ35M=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
> >     >
> >     > We don't currently have a way to write a custom bdev module that
> resides
> >     > outside
> >     > of the SPDK source tree, but it's very possible to add support for
> that.
> > But
> >     > beyond that inconvenience (just drop your module in lib/bdev for
> now),
> > writing
> >     > a
> >     > bdev module is the recommended way of interacting with the bottom
> end of
> > the
> >     > SPDK bdev layer. I think that's what you really want to be doing
> in your
> > code,
> >     > from what I can tell.
> >     >
> >     > I hope that helps!
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     >
> >     > _______________________________________________
> >     > SPDK mailing list
> >     > SPDK(a)lists.01.org
> >     > https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >     _______________________________________________
> >     SPDK mailing list
> >     SPDK(a)lists.01.org
> >     https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> >
> >
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> > _______________________________________________
> > SPDK mailing list
> > SPDK(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> <https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 34367 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09  8:43 
  0 siblings, 0 replies; 35+ messages in thread
From:  @ 2018-05-09  8:43 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 22718 bytes --]

Hi Shahar,


Thank you for your interesting proposal and excuse me for cutting in the thread.

Do you have any plan to use similar or better mechanism between your application and another backend SPDK bdev or device driver (e.g. nvme, bdev_nvme) ?


Thanks,

Shuhei


________________________________
差出人: SPDK <spdk-bounces(a)lists.01.org> が Shahar Salzman <shahar.salzman(a)kaminario.com> の代理で送信
送信日�: 2018年5月9日 16:48:37
宛先: spdk(a)lists.01.org
件名: [!]Re: [SPDK] SPDK + user space appliance


Hi Ben,


To answer your question first, the main reason to have a generic spdk IO API for storage appliance is being able to maintain functionality over versions.

We started with our module in version 17.07, but when we started integrating it into 17.07.01, and the 18.X version we started running into issues. Since the bdev layer is internal to spdk, it makes sense that it will change both in functionality and in interface from time to time especially in NVMeF where the specifications are so young, which is the reason that we would like to have an API which is more stable over versions.

As a storage appliance, the requirements are fairly stable, and at least in the case of SCSI, a thin "glue API" had been enough to get the core appliance work with multiple frontend targets (e.g. both SCSI and internal replication). I believe that the same method can be applied to NVMEF.

In addition, I think that our use case is not unique to the way we are integrating spdk, which means that the work we put in can benefit other users, and hopefully via their experience, the code can become more robust and useful.


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Tuesday, May 8, 2018 8:30:20 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> Hi Jim and Ben,
>
> For the threading issue, I agree that there is something not very clean in the
> interface, as there is an assumption on how the user implements it. As I did
> in the bdev_user_example, we also use a ring in order to place all the
> incoming IO without delaying the reactor, and then use multiple pollers to
> actually handle the IO (deduplication, compression, HA etc.). This is why
> there are 2 distinct interfaces - submit_io callback, and
> the bdev_user_submit_completion interface which (normally) is called on
> another thread (not the original poller), and passed back to the reactor via
> the completion queue on the bdev_user_io_channel, and the registered poller
> thread which takes from the user completion queue.
> Do you think that a cleaner interface would be modifying the submit_io
> callback to a poll_io interface which checks a bdev_user internal ring for IO?
> Or do you think that the current interface is OK provided good documentation?
>
> Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call in
> order to register my volumes, I don't really like this since it forces me to
> (eventually) add another async callback in my app to verify that device
> registration was successful (and this just adds more conditions, futures etc.
> in the application). Is there a way to call spdk interfaces directly with a
> "non-spdk" thread (i.e. TLS is not initialized)?

I'm not so much concerned yet with the interface you've defined, but rather
understanding the whole approach at a high level. The SPDK bdev layer is
designed for custom bdev modules to be added, so my primary question is why
write a generic bdev_user module as opposed to writing a "your custom storage
backend" module? I think this is the key piece, and understanding the process
you went through as you designed this will probably yield a whole bunch of good
improvements to the current bdev module system.

Thanks,
Ben


>
> Hope this answers the questions,
> Shahar



> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> <james.r.harris(a)intel.com>
> Sent: Monday, May 7, 2018 9:18:20 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>
> There are also calls such as spdk_call_unaffinitized() and
> spdk_unaffinitize_thread() which have been added to enable cases where a bdev
> module may need to spawn non-polling threads and don’t want those threads to
> inherit the affinity of the calling thread.  The SPDK rbd module currently
> uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note
> that librbd does now support rbd_aio_open which is better suited for SPDK.)
>
> -Jim
>
>
> On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.
> 01.org on behalf of benjamin.walker(a)intel.com> wrote:
>
>     Hi Shahar,
>
>     Thank you for submitting the patch. I've looked through it in detail and I
> think
>     I understand the purpose of this code, but I'm going to explain it back to
> you
>     so you can correct me where I'm wrong.
>
>     I think this code solves two distinct problems:
>
>     1) You need to forward I/O out of the bdev layer to some custom backend,
> and you
>     want the code that does that to live outside of the SPDK repository.
>
>     2) Your custom back-end library isn't suitable for use in a run-to-
> completion
>     model. By that I mean that you can't just call your library directly on
> the
>     thread that originally receives the spdk_bdev_io request because your
> library
>     either blocks or generally takes too long to return from the submission
> call
>     (maybe it is doing inline compression or something). Instead, you need to
>     shuttle those requests off to separate threads for handling.
>
>     As far as point #1, today the SPDK build system does not nicely
> accommodate bdev
>     modules whose code lives outside of SPDK. SPDK expects them to be in
>     lib/bdev/<module_name>. However, that's a fairly straightforward change to
> the
>     build system and it's one we've been intending to make for some time.
>
>     For point #2, this is likely the case for a large number of storage back-
> ends,
>     but I think the proper way to solve it is probably back-end specific and
> not
>     general purpose. As a counter-point, SPDK already integrates with a number
> of
>     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and
> none
>     of those ended up needing to pass messages to other threads. They all
> support
>     asynchronous operations, though. I could imagine writing a bdev module
> that
>     ultimately makes POSIX preadv calls, for instance. That would need to be
>     implemented with a thread pool and each bdev_io gets funneled off to a
> thread in
>     the pool to perform the blocking operation.
>
>     Ok - I explained what I think I'm understanding. Now tell me where I went
> wrong
>     :)
>
>     Thanks,
>     Ben
>
>     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
>     > Hi,
>     >
>     > I pushed the code for review, thanks Daniel for the help.
>     >
>     > In a nutshell:
>     > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF
> target
>     > - bdev_user_example - reference application
>     > - The API relies on rings in order to submit/complete IOs
>     > - User appliance registers callbacks for submit_io (should we have
>     > read/write/other instead?)
>     > - User appliance registers its devices so that they may be added to an
>     > existing namespace (I am using RPC to do the management)
>     >
>     > Thanks,
>     > Shahar
>     >
>     >
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> <daniel.ve
>     > rkamp(a)intel.com>
>     > Sent: Thursday, May 3, 2018 8:50 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > The target branch for the push should be ‘refs/for/master’, not ‘master’
> � if
>     > you configured a remote as specified in http://www.spdk.io/development/<https://clicktime.symantec.com/a/1/rh-3VHZYpue836WL7xk6PeNj07Uasa-f3mk1qF-DlT8=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdevelopment%2F>
> it
>     > should look like:
>     >
>     > [remote "review"]
>     >   url = https://review.gerrithub.io/spdk/spdk<https://clicktime.symantec.com/a/1/OaPVuVr1G_KXx82bpWq6qv45xczw5GbHXXv708RDuZc=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Freview.gerrithub.io%2Fspdk%2Fspdk>
>     >   push = HEAD:refs/for/master
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Thursday, May 3, 2018 1:00 AM
>     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> not
>     > have push rights for gerrithub:
>     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
>     > HEAD:master
>     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io<https://clicktime.symantec.com/a/1/ud1ifedg4A2TOIWlEPo3kRFZ64BHL6kUmZ3LkrD49QE=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io>':
>     > Counting objects: 109, done.
>     > Compressing objects: 100% (22/22), done.
>     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
>     > Total 22 (delta 14), reused 0 (delta 0)
>     > remote: Resolving deltas: 100% (14/14)
>     > remote: Branch refs/heads/master:
>     > remote: You are not allowed to perform this operation.
>     > remote: To push into this reference you need 'Push' rights.
>     > remote: User: ShaharSalzman-K
>     > remote: Please read the documentation and contact an administrator
>     > remote: if you feel the configuration is incorrect
>     > remote: Processing changes: refs: 1, done
>     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk<https://clicktime.symantec.com/a/1/Cz0Uw9En12eN0FYoXd9iawGSsRVIB2zjPgGsO4NHLLU=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerrithub.io%2Fa%2Fspdk%2Fspdk>
>     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> access
>     > denied)
>     > error: failed to push some refs to 'https://clicktime.symantec.com/a/1/iPAMfi9JTgrCsBpj-3dTOiwjRg4TO0R9p-532zfvTJo=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2FShaharSalzman-K%40review.gerri
> thub.i
>     > o/a/spdk/spdk'
>     >
>     > Am I doing something incorrect, or is this just a permission issue?
>     >
>     > Thanks,
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> <shahar.sal
>     > zman(a)kaminario.com>
>     > Sent: Wednesday, April 25, 2018 9:02:38 AM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > The code is currently working on v17.07, we are planning on bumping the
>     > version to one of the latest stable versions (18.01?) + master.
>     > It will take me (hopefully) a few days to update the code and have our
>     > internal CI start running on this version, not sure it would be useful,
> but I
>     > can get our working 17.07 code (+ reference application) for review much
>     > faster.
>     > What is the best course of action?
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Tuesday, April 24, 2018 7:19:12 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > Would you be willing to submit your bdev module as a patch on GerritHub?
> That
>     > way everyone can take a look and provide feedback. If you don’t want it
> to run
>     > the tests, you can put [RFC] and the beginning of the commit message.
>     >
>     > Thanks,
>     > Ben
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Monday, April 23, 2018 8:45 AM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > Bumping this thread since I've been having some new thoughts on the
> issue now
>     > that we are starting integration with newer spdk versions.
>     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> bdev
>     > module is pretty tightly integrated into spdk, perhaps we made some
> false
>     > assumptions writing the module, but it seems some of the newer spdk
> features
>     > are complicating the integration.
>     > My question is, if this passthrough module is useful, wouldn't it be
> better to
>     > maintain it as part of spdk so that we can catch issues as soon as they
> show
>     > up?
>     > We would be happy to help with maintaining this module, the module with
> is
>     > currently part of our CI with our "frozen" spdk version, but once
> integrated
>     > into the newer version we choose, I'll add it to the CI our CI as well.
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Friday, February 2, 2018 11:43:58 PM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
>     > > Hi Ben,
>     > >
>     > > Would you also like to take a look at the bdev_user module?
>     > > It still needs some patching (as some of the stuff is still hard
> coded), but
>     > I
>     > > think we can get most of it cleaned up in a couple of days.
>     > >
>     > > In any case, is it the intention that the user write his own bdev
> module, or
>     > > would this user appliance glue be a useful generic module?
>     >
>     > For existing storage stacks that serve block I/O, like the internals of
> a SAN,
>     > the idea is that you write your own bdev module to forward I/O coming
> out of
>     > the
>     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> mostly
>     > as-is.
>     >
>     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
>     > integrate nicely directly into an existing storage application because
> they
>     > spawn their own threads and allocate their own memory. To support that,
> the
>     > libraries may be consumed directly instead of the applications
> (lib/iscsi,
>     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> threads,
>     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> See
>     >
>     > http://www.spdk.io/doc/concurrency.html<https://clicktime.symantec.com/a/1/MS3ce6M64PLWuj-ql0OTuUYYLehh4rXFKEL9FywZ35M=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=http%3A%2F%2Fwww.spdk.io%2Fdoc%2Fconcurrency.html>
>     >
>     > We don't currently have a way to write a custom bdev module that resides
>     > outside
>     > of the SPDK source tree, but it's very possible to add support for that.
> But
>     > beyond that inconvenience (just drop your module in lib/bdev for now),
> writing
>     > a
>     > bdev module is the recommended way of interacting with the bottom end of
> the
>     > SPDK bdev layer. I think that's what you really want to be doing in your
> code,
>     > from what I can tell.
>     >
>     > I hope that helps!
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>     >
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>     _______________________________________________
>     SPDK mailing list
>     SPDK(a)lists.01.org
>     https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
>
>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk<https://clicktime.symantec.com/a/1/b2rdsf69Lv7jrwmktg4XjB8zxp_tpG3ExgN74Rtab_0=?d=IZ4agxX_ZpqPkWiNnTNrj_NBs2FhvVhL0C4ui7usNFbwWvaeFL_6xxEiJsoIsqQ7V52cWaZFVACNr_1h7jLWbAwFsIludxqvouLeR7LlLOfQ0bFlPUpvFZ6_PMy3CfWbTeNsbADtICHCz_POTCbaFpNsuI2rlqB8puvuZJTP3Ox46efqw1FrkS0cNBzg8d-EuPrkwq9O0Z_X5JWfRIeyC8OdQ0LgZbmYLhHv74Ef6cPNqSlyLNHic0Jl3IcH3yyZoJ8yW8_S9YWGC8KctqorrU9ydDY5LxaRivXyr73oPW0zCi7L_F_ruhFLmKNLLqGyTuILXnS4oYr3CQn3fJc9OCnuVkU4qPnBXZN65eLGxDVtsZifysY6Ncn_9vBe9bWoMqpmX4PvgHRpsz32FSPKiHJdU-qNNiGiG-AYIgDEjOIw&u=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fspdk>

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 33366 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-09  7:48 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-09  7:48 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 15396 bytes --]

Hi Ben,


To answer your question first, the main reason to have a generic spdk IO API for storage appliance is being able to maintain functionality over versions.

We started with our module in version 17.07, but when we started integrating it into 17.07.01, and the 18.X version we started running into issues. Since the bdev layer is internal to spdk, it makes sense that it will change both in functionality and in interface from time to time especially in NVMeF where the specifications are so young, which is the reason that we would like to have an API which is more stable over versions.

As a storage appliance, the requirements are fairly stable, and at least in the case of SCSI, a thin "glue API" had been enough to get the core appliance work with multiple frontend targets (e.g. both SCSI and internal replication). I believe that the same method can be applied to NVMEF.

In addition, I think that our use case is not unique to the way we are integrating spdk, which means that the work we put in can benefit other users, and hopefully via their experience, the code can become more robust and useful.


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Tuesday, May 8, 2018 8:30:20 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> Hi Jim and Ben,
>
> For the threading issue, I agree that there is something not very clean in the
> interface, as there is an assumption on how the user implements it. As I did
> in the bdev_user_example, we also use a ring in order to place all the
> incoming IO without delaying the reactor, and then use multiple pollers to
> actually handle the IO (deduplication, compression, HA etc.). This is why
> there are 2 distinct interfaces - submit_io callback, and
> the bdev_user_submit_completion interface which (normally) is called on
> another thread (not the original poller), and passed back to the reactor via
> the completion queue on the bdev_user_io_channel, and the registered poller
> thread which takes from the user completion queue.
> Do you think that a cleaner interface would be modifying the submit_io
> callback to a poll_io interface which checks a bdev_user internal ring for IO?
> Or do you think that the current interface is OK provided good documentation?
>
> Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call in
> order to register my volumes, I don't really like this since it forces me to
> (eventually) add another async callback in my app to verify that device
> registration was successful (and this just adds more conditions, futures etc.
> in the application). Is there a way to call spdk interfaces directly with a
> "non-spdk" thread (i.e. TLS is not initialized)?

I'm not so much concerned yet with the interface you've defined, but rather
understanding the whole approach at a high level. The SPDK bdev layer is
designed for custom bdev modules to be added, so my primary question is why
write a generic bdev_user module as opposed to writing a "your custom storage
backend" module? I think this is the key piece, and understanding the process
you went through as you designed this will probably yield a whole bunch of good
improvements to the current bdev module system.

Thanks,
Ben


>
> Hope this answers the questions,
> Shahar



> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> <james.r.harris(a)intel.com>
> Sent: Monday, May 7, 2018 9:18:20 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>
> There are also calls such as spdk_call_unaffinitized() and
> spdk_unaffinitize_thread() which have been added to enable cases where a bdev
> module may need to spawn non-polling threads and don’t want those threads to
> inherit the affinity of the calling thread.  The SPDK rbd module currently
> uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note
> that librbd does now support rbd_aio_open which is better suited for SPDK.)
>
> -Jim
>
>
> On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.
> 01.org on behalf of benjamin.walker(a)intel.com> wrote:
>
>     Hi Shahar,
>
>     Thank you for submitting the patch. I've looked through it in detail and I
> think
>     I understand the purpose of this code, but I'm going to explain it back to
> you
>     so you can correct me where I'm wrong.
>
>     I think this code solves two distinct problems:
>
>     1) You need to forward I/O out of the bdev layer to some custom backend,
> and you
>     want the code that does that to live outside of the SPDK repository.
>
>     2) Your custom back-end library isn't suitable for use in a run-to-
> completion
>     model. By that I mean that you can't just call your library directly on
> the
>     thread that originally receives the spdk_bdev_io request because your
> library
>     either blocks or generally takes too long to return from the submission
> call
>     (maybe it is doing inline compression or something). Instead, you need to
>     shuttle those requests off to separate threads for handling.
>
>     As far as point #1, today the SPDK build system does not nicely
> accommodate bdev
>     modules whose code lives outside of SPDK. SPDK expects them to be in
>     lib/bdev/<module_name>. However, that's a fairly straightforward change to
> the
>     build system and it's one we've been intending to make for some time.
>
>     For point #2, this is likely the case for a large number of storage back-
> ends,
>     but I think the proper way to solve it is probably back-end specific and
> not
>     general purpose. As a counter-point, SPDK already integrates with a number
> of
>     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and
> none
>     of those ended up needing to pass messages to other threads. They all
> support
>     asynchronous operations, though. I could imagine writing a bdev module
> that
>     ultimately makes POSIX preadv calls, for instance. That would need to be
>     implemented with a thread pool and each bdev_io gets funneled off to a
> thread in
>     the pool to perform the blocking operation.
>
>     Ok - I explained what I think I'm understanding. Now tell me where I went
> wrong
>     :)
>
>     Thanks,
>     Ben
>
>     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
>     > Hi,
>     >
>     > I pushed the code for review, thanks Daniel for the help.
>     >
>     > In a nutshell:
>     > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF
> target
>     > - bdev_user_example - reference application
>     > - The API relies on rings in order to submit/complete IOs
>     > - User appliance registers callbacks for submit_io (should we have
>     > read/write/other instead?)
>     > - User appliance registers its devices so that they may be added to an
>     > existing namespace (I am using RPC to do the management)
>     >
>     > Thanks,
>     > Shahar
>     >
>     >
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> <daniel.ve
>     > rkamp(a)intel.com>
>     > Sent: Thursday, May 3, 2018 8:50 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > The target branch for the push should be ‘refs/for/master’, not ‘master’
> – if
>     > you configured a remote as specified in http://www.spdk.io/development/
> it
>     > should look like:
>     >
>     > [remote "review"]
>     >   url = https://review.gerrithub.io/spdk/spdk
>     >   push = HEAD:refs/for/master
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Thursday, May 3, 2018 1:00 AM
>     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> not
>     > have push rights for gerrithub:
>     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
>     > HEAD:master
>     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':
>     > Counting objects: 109, done.
>     > Compressing objects: 100% (22/22), done.
>     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
>     > Total 22 (delta 14), reused 0 (delta 0)
>     > remote: Resolving deltas: 100% (14/14)
>     > remote: Branch refs/heads/master:
>     > remote: You are not allowed to perform this operation.
>     > remote: To push into this reference you need 'Push' rights.
>     > remote: User: ShaharSalzman-K
>     > remote: Please read the documentation and contact an administrator
>     > remote: if you feel the configuration is incorrect
>     > remote: Processing changes: refs: 1, done
>     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
>     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> access
>     > denied)
>     > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerri
> thub.i
>     > o/a/spdk/spdk'
>     >
>     > Am I doing something incorrect, or is this just a permission issue?
>     >
>     > Thanks,
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> <shahar.sal
>     > zman(a)kaminario.com>
>     > Sent: Wednesday, April 25, 2018 9:02:38 AM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > The code is currently working on v17.07, we are planning on bumping the
>     > version to one of the latest stable versions (18.01?) + master.
>     > It will take me (hopefully) a few days to update the code and have our
>     > internal CI start running on this version, not sure it would be useful,
> but I
>     > can get our working 17.07 code (+ reference application) for review much
>     > faster.
>     > What is the best course of action?
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Tuesday, April 24, 2018 7:19:12 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Shahar,
>     >
>     > Would you be willing to submit your bdev module as a patch on GerritHub?
> That
>     > way everyone can take a look and provide feedback. If you don’t want it
> to run
>     > the tests, you can put [RFC] and the beginning of the commit message.
>     >
>     > Thanks,
>     > Ben
>     >
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Monday, April 23, 2018 8:45 AM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > Hi Ben,
>     >
>     > Bumping this thread since I've been having some new thoughts on the
> issue now
>     > that we are starting integration with newer spdk versions.
>     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> bdev
>     > module is pretty tightly integrated into spdk, perhaps we made some
> false
>     > assumptions writing the module, but it seems some of the newer spdk
> features
>     > are complicating the integration.
>     > My question is, if this passthrough module is useful, wouldn't it be
> better to
>     > maintain it as part of spdk so that we can catch issues as soon as they
> show
>     > up?
>     > We would be happy to help with maintaining this module, the module with
> is
>     > currently part of our CI with our "frozen" spdk version, but once
> integrated
>     > into the newer version we choose, I'll add it to the CI our CI as well.
>     >
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Friday, February 2, 2018 11:43:58 PM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >
>     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
>     > > Hi Ben,
>     > >
>     > > Would you also like to take a look at the bdev_user module?
>     > > It still needs some patching (as some of the stuff is still hard
> coded), but
>     > I
>     > > think we can get most of it cleaned up in a couple of days.
>     > >
>     > > In any case, is it the intention that the user write his own bdev
> module, or
>     > > would this user appliance glue be a useful generic module?
>     >
>     > For existing storage stacks that serve block I/O, like the internals of
> a SAN,
>     > the idea is that you write your own bdev module to forward I/O coming
> out of
>     > the
>     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> mostly
>     > as-is.
>     >
>     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
>     > integrate nicely directly into an existing storage application because
> they
>     > spawn their own threads and allocate their own memory. To support that,
> the
>     > libraries may be consumed directly instead of the applications
> (lib/iscsi,
>     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> threads,
>     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> See
>     >
>     > http://www.spdk.io/doc/concurrency.html
>     >
>     > We don't currently have a way to write a custom bdev module that resides
>     > outside
>     > of the SPDK source tree, but it's very possible to add support for that.
> But
>     > beyond that inconvenience (just drop your module in lib/bdev for now),
> writing
>     > a
>     > bdev module is the recommended way of interacting with the bottom end of
> the
>     > SPDK bdev layer. I think that's what you really want to be doing in your
> code,
>     > from what I can tell.
>     >
>     > I hope that helps!
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk
>     >
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk
>     _______________________________________________
>     SPDK mailing list
>     SPDK(a)lists.01.org
>     https://lists.01.org/mailman/listinfo/spdk
>
>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 24411 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-08 17:30 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-05-08 17:30 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 13987 bytes --]

On Tue, 2018-05-08 at 07:36 +0000, Shahar Salzman wrote:
> Hi Jim and Ben,
> 
> For the threading issue, I agree that there is something not very clean in the
> interface, as there is an assumption on how the user implements it. As I did
> in the bdev_user_example, we also use a ring in order to place all the
> incoming IO without delaying the reactor, and then use multiple pollers to
> actually handle the IO (deduplication, compression, HA etc.). This is why
> there are 2 distinct interfaces - submit_io callback, and
> the bdev_user_submit_completion interface which (normally) is called on
> another thread (not the original poller), and passed back to the reactor via
> the completion queue on the bdev_user_io_channel, and the registered poller
> thread which takes from the user completion queue.
> Do you think that a cleaner interface would be modifying the submit_io
> callback to a poll_io interface which checks a bdev_user internal ring for IO?
> Or do you think that the current interface is OK provided good documentation?
> 
> Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call in
> order to register my volumes, I don't really like this since it forces me to
> (eventually) add another async callback in my app to verify that device
> registration was successful (and this just adds more conditions, futures etc.
> in the application). Is there a way to call spdk interfaces directly with a
> "non-spdk" thread (i.e. TLS is not initialized)?

I'm not so much concerned yet with the interface you've defined, but rather
understanding the whole approach at a high level. The SPDK bdev layer is
designed for custom bdev modules to be added, so my primary question is why
write a generic bdev_user module as opposed to writing a "your custom storage
backend" module? I think this is the key piece, and understanding the process
you went through as you designed this will probably yield a whole bunch of good
improvements to the current bdev module system.

Thanks,
Ben


> 
> Hope this answers the questions,
> Shahar



> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R
> <james.r.harris(a)intel.com>
> Sent: Monday, May 7, 2018 9:18:20 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> There are also calls such as spdk_call_unaffinitized() and
> spdk_unaffinitize_thread() which have been added to enable cases where a bdev
> module may need to spawn non-polling threads and don’t want those threads to
> inherit the affinity of the calling thread.  The SPDK rbd module currently
> uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note
> that librbd does now support rbd_aio_open which is better suited for SPDK.)
> 
> -Jim
> 
> 
> On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.
> 01.org on behalf of benjamin.walker(a)intel.com> wrote:
> 
>     Hi Shahar,
>     
>     Thank you for submitting the patch. I've looked through it in detail and I
> think
>     I understand the purpose of this code, but I'm going to explain it back to
> you
>     so you can correct me where I'm wrong.
>     
>     I think this code solves two distinct problems:
>     
>     1) You need to forward I/O out of the bdev layer to some custom backend,
> and you
>     want the code that does that to live outside of the SPDK repository.
>     
>     2) Your custom back-end library isn't suitable for use in a run-to-
> completion
>     model. By that I mean that you can't just call your library directly on
> the
>     thread that originally receives the spdk_bdev_io request because your
> library
>     either blocks or generally takes too long to return from the submission
> call
>     (maybe it is doing inline compression or something). Instead, you need to
>     shuttle those requests off to separate threads for handling.
>     
>     As far as point #1, today the SPDK build system does not nicely
> accommodate bdev
>     modules whose code lives outside of SPDK. SPDK expects them to be in
>     lib/bdev/<module_name>. However, that's a fairly straightforward change to
> the
>     build system and it's one we've been intending to make for some time.
>     
>     For point #2, this is likely the case for a large number of storage back-
> ends,
>     but I think the proper way to solve it is probably back-end specific and
> not
>     general purpose. As a counter-point, SPDK already integrates with a number
> of
>     third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and
> none
>     of those ended up needing to pass messages to other threads. They all
> support
>     asynchronous operations, though. I could imagine writing a bdev module
> that
>     ultimately makes POSIX preadv calls, for instance. That would need to be
>     implemented with a thread pool and each bdev_io gets funneled off to a
> thread in
>     the pool to perform the blocking operation.
>     
>     Ok - I explained what I think I'm understanding. Now tell me where I went
> wrong
>     :)
>     
>     Thanks,
>     Ben
>     
>     On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
>     > Hi,
>     > 
>     > I pushed the code for review, thanks Daniel for the help.
>     > 
>     > In a nutshell:
>     > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF
> target
>     > - bdev_user_example - reference application
>     > - The API relies on rings in order to submit/complete IOs
>     > - User appliance registers callbacks for submit_io (should we have
>     > read/write/other instead?)
>     > - User appliance registers its devices so that they may be added to an
>     > existing namespace (I am using RPC to do the management)
>     > 
>     > Thanks,
>     > Shahar
>     > 
>     > 
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel
> <daniel.ve
>     > rkamp(a)intel.com>
>     > Sent: Thursday, May 3, 2018 8:50 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > Hi Shahar,
>     >  
>     > The target branch for the push should be ‘refs/for/master’, not ‘master’
> – if
>     > you configured a remote as specified in http://www.spdk.io/development/
> it
>     > should look like:
>     >  
>     > [remote "review"]
>     >   url = https://review.gerrithub.io/spdk/spdk
>     >   push = HEAD:refs/for/master
>     >  
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Thursday, May 3, 2018 1:00 AM
>     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > Hi Ben,
>     >  
>     > I have the code ready for review (spdk/master on dpdk/18.02), but I do
> not
>     > have push rights for gerrithub:
>     > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
>     > HEAD:master
>     > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io': 
>     > Counting objects: 109, done.
>     > Compressing objects: 100% (22/22), done.
>     > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
>     > Total 22 (delta 14), reused 0 (delta 0)
>     > remote: Resolving deltas: 100% (14/14)
>     > remote: Branch refs/heads/master:
>     > remote: You are not allowed to perform this operation.
>     > remote: To push into this reference you need 'Push' rights.
>     > remote: User: ShaharSalzman-K
>     > remote: Please read the documentation and contact an administrator
>     > remote: if you feel the configuration is incorrect
>     > remote: Processing changes: refs: 1, done    
>     > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
>     >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update
> access
>     > denied)
>     > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerri
> thub.i
>     > o/a/spdk/spdk'
>     >  
>     > Am I doing something incorrect, or is this just a permission issue?
>     >  
>     > Thanks,
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman
> <shahar.sal
>     > zman(a)kaminario.com>
>     > Sent: Wednesday, April 25, 2018 9:02:38 AM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > Hi Ben,
>     >  
>     > The code is currently working on v17.07, we are planning on bumping the
>     > version to one of the latest stable versions (18.01?) + master.
>     > It will take me (hopefully) a few days to update the code and have our
>     > internal CI start running on this version, not sure it would be useful,
> but I
>     > can get our working 17.07 code (+ reference application) for review much
>     > faster.
>     > What is the best course of action?
>     >  
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Tuesday, April 24, 2018 7:19:12 PM
>     > To: Storage Performance Development Kit
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > Hi Shahar,
>     >  
>     > Would you be willing to submit your bdev module as a patch on GerritHub?
> That
>     > way everyone can take a look and provide feedback. If you don’t want it
> to run
>     > the tests, you can put [RFC] and the beginning of the commit message.
>     >  
>     > Thanks,
>     > Ben
>     >  
>     > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar
> Salzman
>     > Sent: Monday, April 23, 2018 8:45 AM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > Hi Ben,
>     >  
>     > Bumping this thread since I've been having some new thoughts on the
> issue now
>     > that we are starting integration with newer spdk versions.
>     > Unfortunately the merge isn't as smooth as I'd like it to be since the
> bdev
>     > module is pretty tightly integrated into spdk, perhaps we made some
> false
>     > assumptions writing the module, but it seems some of the newer spdk
> features
>     > are complicating the integration.
>     > My question is, if this passthrough module is useful, wouldn't it be
> better to
>     > maintain it as part of spdk so that we can catch issues as soon as they
> show
>     > up?
>     > We would be happy to help with maintaining this module, the module with
> is
>     > currently part of our CI with our "frozen" spdk version, but once
> integrated
>     > into the newer version we choose, I'll add it to the CI our CI as well.
>     >  
>     > Shahar
>     > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin
> <benjamin
>     > .walker(a)intel.com>
>     > Sent: Friday, February 2, 2018 11:43:58 PM
>     > To: spdk(a)lists.01.org
>     > Subject: Re: [SPDK] SPDK + user space appliance
>     >  
>     > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
>     > > Hi Ben,
>     > > 
>     > > Would you also like to take a look at the bdev_user module?
>     > > It still needs some patching (as some of the stuff is still hard
> coded), but
>     > I
>     > > think we can get most of it cleaned up in a couple of days.
>     > > 
>     > > In any case, is it the intention that the user write his own bdev
> module, or
>     > > would this user appliance glue be a useful generic module?
>     > 
>     > For existing storage stacks that serve block I/O, like the internals of
> a SAN,
>     > the idea is that you write your own bdev module to forward I/O coming
> out of
>     > the
>     > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets
> mostly
>     > as-is.
>     > 
>     > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
>     > integrate nicely directly into an existing storage application because
> they
>     > spawn their own threads and allocate their own memory. To support that,
> the
>     > libraries may be consumed directly instead of the applications
> (lib/iscsi,
>     > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own
> threads,
>     > but instead rely on SPDK's abstractions in include/spdk/io_channel.h.
> See
>     > 
>     > http://www.spdk.io/doc/concurrency.html
>     > 
>     > We don't currently have a way to write a custom bdev module that resides
>     > outside
>     > of the SPDK source tree, but it's very possible to add support for that.
> But
>     > beyond that inconvenience (just drop your module in lib/bdev for now),
> writing
>     > a
>     > bdev module is the recommended way of interacting with the bottom end of
> the
>     > SPDK bdev layer. I think that's what you really want to be doing in your
> code,
>     > from what I can tell.
>     > 
>     > I hope that helps!
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk
>     > 
>     > _______________________________________________
>     > SPDK mailing list
>     > SPDK(a)lists.01.org
>     > https://lists.01.org/mailman/listinfo/spdk
>     _______________________________________________
>     SPDK mailing list
>     SPDK(a)lists.01.org
>     https://lists.01.org/mailman/listinfo/spdk
>     
> 
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-08  7:36 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-08  7:36 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 12779 bytes --]

Hi Jim and Ben,


For the build issue, we pass the spdk include directory so we can get the APIs, and use -Wl,--whole-archive and -l on the relevant spdk libraries (e.g. spdk_nvme, spdk_bdev etc.), I can post a reference application on my github that builds outside the spdk directory. I hope I understood your concern.

For the threading issue, I agree that there is something not very clean in the interface, as there is an assumption on how the user implements it. As I did in the bdev_user_example, we also use a ring in order to place all the incoming IO without delaying the reactor, and then use multiple pollers to actually handle the IO (deduplication, compression, HA etc.). This is why there are 2 distinct interfaces - submit_io callback, and the bdev_user_submit_completion interface which (normally) is called on another thread (not the original poller), and passed back to the reactor via the completion queue on the bdev_user_io_channel, and the registered poller thread which takes from the user completion queue.

Do you think that a cleaner interface would be modifying the submit_io callback to a poll_io interface which checks a bdev_user internal ring for IO? Or do you think that the current interface is OK provided good documentation?


Regarding the spdk_call_unaffinitized, I am currently using spdk_event_call in order to register my volumes, I don't really like this since it forces me to (eventually) add another async callback in my app to verify that device registration was successful (and this just adds more conditions, futures etc. in the application). Is there a way to call spdk interfaces directly with a "non-spdk" thread (i.e. TLS is not initialized)?


Hope this answers the questions,

Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Harris, James R <james.r.harris(a)intel.com>
Sent: Monday, May 7, 2018 9:18:20 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance

There are also calls such as spdk_call_unaffinitized() and spdk_unaffinitize_thread() which have been added to enable cases where a bdev module may need to spawn non-polling threads and don’t want those threads to inherit the affinity of the calling thread.  The SPDK rbd module currently uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note that librbd does now support rbd_aio_open which is better suited for SPDK.)

-Jim


On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.01.org on behalf of benjamin.walker(a)intel.com> wrote:

    Hi Shahar,

    Thank you for submitting the patch. I've looked through it in detail and I think
    I understand the purpose of this code, but I'm going to explain it back to you
    so you can correct me where I'm wrong.

    I think this code solves two distinct problems:

    1) You need to forward I/O out of the bdev layer to some custom backend, and you
    want the code that does that to live outside of the SPDK repository.

    2) Your custom back-end library isn't suitable for use in a run-to-completion
    model. By that I mean that you can't just call your library directly on the
    thread that originally receives the spdk_bdev_io request because your library
    either blocks or generally takes too long to return from the submission call
    (maybe it is doing inline compression or something). Instead, you need to
    shuttle those requests off to separate threads for handling.

    As far as point #1, today the SPDK build system does not nicely accommodate bdev
    modules whose code lives outside of SPDK. SPDK expects them to be in
    lib/bdev/<module_name>. However, that's a fairly straightforward change to the
    build system and it's one we've been intending to make for some time.

    For point #2, this is likely the case for a large number of storage back-ends,
    but I think the proper way to solve it is probably back-end specific and not
    general purpose. As a counter-point, SPDK already integrates with a number of
    third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and none
    of those ended up needing to pass messages to other threads. They all support
    asynchronous operations, though. I could imagine writing a bdev module that
    ultimately makes POSIX preadv calls, for instance. That would need to be
    implemented with a thread pool and each bdev_io gets funneled off to a thread in
    the pool to perform the blocking operation.

    Ok - I explained what I think I'm understanding. Now tell me where I went wrong
    :)

    Thanks,
    Ben

    On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
    > Hi,
    >
    > I pushed the code for review, thanks Daniel for the help.
    >
    > In a nutshell:
    > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF target
    > - bdev_user_example - reference application
    > - The API relies on rings in order to submit/complete IOs
    > - User appliance registers callbacks for submit_io (should we have
    > read/write/other instead?)
    > - User appliance registers its devices so that they may be added to an
    > existing namespace (I am using RPC to do the management)
    >
    > Thanks,
    > Shahar
    >
    >
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel <daniel.ve
    > rkamp(a)intel.com>
    > Sent: Thursday, May 3, 2018 8:50 PM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > Hi Shahar,
    >
    > The target branch for the push should be ‘refs/for/master’, not ‘master’ – if
    > you configured a remote as specified in http://www.spdk.io/development/ it
    > should look like:
    >
    > [remote "review"]
    >   url = https://review.gerrithub.io/spdk/spdk
    >   push = HEAD:refs/for/master
    >
    > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
    > Sent: Thursday, May 3, 2018 1:00 AM
    > To: Storage Performance Development Kit <spdk(a)lists.01.org>
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > Hi Ben,
    >
    > I have the code ready for review (spdk/master on dpdk/18.02), but I do not
    > have push rights for gerrithub:
    > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
    > HEAD:master
    > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':
    > Counting objects: 109, done.
    > Compressing objects: 100% (22/22), done.
    > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
    > Total 22 (delta 14), reused 0 (delta 0)
    > remote: Resolving deltas: 100% (14/14)
    > remote: Branch refs/heads/master:
    > remote: You are not allowed to perform this operation.
    > remote: To push into this reference you need 'Push' rights.
    > remote: User: ShaharSalzman-K
    > remote: Please read the documentation and contact an administrator
    > remote: if you feel the configuration is incorrect
    > remote: Processing changes: refs: 1, done
    > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
    >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access
    > denied)
    > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.i
    > o/a/spdk/spdk'
    >
    > Am I doing something incorrect, or is this just a permission issue?
    >
    > Thanks,
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.sal
    > zman(a)kaminario.com>
    > Sent: Wednesday, April 25, 2018 9:02:38 AM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > Hi Ben,
    >
    > The code is currently working on v17.07, we are planning on bumping the
    > version to one of the latest stable versions (18.01?) + master.
    > It will take me (hopefully) a few days to update the code and have our
    > internal CI start running on this version, not sure it would be useful, but I
    > can get our working 17.07 code (+ reference application) for review much
    > faster.
    > What is the best course of action?
    >
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
    > .walker(a)intel.com>
    > Sent: Tuesday, April 24, 2018 7:19:12 PM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > Hi Shahar,
    >
    > Would you be willing to submit your bdev module as a patch on GerritHub? That
    > way everyone can take a look and provide feedback. If you don’t want it to run
    > the tests, you can put [RFC] and the beginning of the commit message.
    >
    > Thanks,
    > Ben
    >
    > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
    > Sent: Monday, April 23, 2018 8:45 AM
    > To: spdk(a)lists.01.org
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > Hi Ben,
    >
    > Bumping this thread since I've been having some new thoughts on the issue now
    > that we are starting integration with newer spdk versions.
    > Unfortunately the merge isn't as smooth as I'd like it to be since the bdev
    > module is pretty tightly integrated into spdk, perhaps we made some false
    > assumptions writing the module, but it seems some of the newer spdk features
    > are complicating the integration.
    > My question is, if this passthrough module is useful, wouldn't it be better to
    > maintain it as part of spdk so that we can catch issues as soon as they show
    > up?
    > We would be happy to help with maintaining this module, the module with is
    > currently part of our CI with our "frozen" spdk version, but once integrated
    > into the newer version we choose, I'll add it to the CI our CI as well.
    >
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
    > .walker(a)intel.com>
    > Sent: Friday, February 2, 2018 11:43:58 PM
    > To: spdk(a)lists.01.org
    > Subject: Re: [SPDK] SPDK + user space appliance
    >
    > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
    > > Hi Ben,
    > >
    > > Would you also like to take a look at the bdev_user module?
    > > It still needs some patching (as some of the stuff is still hard coded), but
    > I
    > > think we can get most of it cleaned up in a couple of days.
    > >
    > > In any case, is it the intention that the user write his own bdev module, or
    > > would this user appliance glue be a useful generic module?
    >
    > For existing storage stacks that serve block I/O, like the internals of a SAN,
    > the idea is that you write your own bdev module to forward I/O coming out of
    > the
    > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
    > as-is.
    >
    > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
    > integrate nicely directly into an existing storage application because they
    > spawn their own threads and allocate their own memory. To support that, the
    > libraries may be consumed directly instead of the applications (lib/iscsi,
    > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
    > but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See
    >
    > http://www.spdk.io/doc/concurrency.html
    >
    > We don't currently have a way to write a custom bdev module that resides
    > outside
    > of the SPDK source tree, but it's very possible to add support for that. But
    > beyond that inconvenience (just drop your module in lib/bdev for now), writing
    > a
    > bdev module is the recommended way of interacting with the bottom end of the
    > SPDK bdev layer. I think that's what you really want to be doing in your code,
    > from what I can tell.
    >
    > I hope that helps!
    > _______________________________________________
    > SPDK mailing list
    > SPDK(a)lists.01.org
    > https://lists.01.org/mailman/listinfo/spdk
    >
    > _______________________________________________
    > SPDK mailing list
    > SPDK(a)lists.01.org
    > https://lists.01.org/mailman/listinfo/spdk
    _______________________________________________
    SPDK mailing list
    SPDK(a)lists.01.org
    https://lists.01.org/mailman/listinfo/spdk


_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 19582 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-07 18:18 Harris, James R
  0 siblings, 0 replies; 35+ messages in thread
From: Harris, James R @ 2018-05-07 18:18 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 10724 bytes --]

There are also calls such as spdk_call_unaffinitized() and spdk_unaffinitize_thread() which have been added to enable cases where a bdev module may need to spawn non-polling threads and don’t want those threads to inherit the affinity of the calling thread.  The SPDK rbd module currently uses these (see git commit fa5206c4) since rbd_open is a blocking call.  (Note that librbd does now support rbd_aio_open which is better suited for SPDK.)

-Jim


On 5/7/18, 11:02 AM, "SPDK on behalf of Walker, Benjamin" <spdk-bounces(a)lists.01.org on behalf of benjamin.walker(a)intel.com> wrote:

    Hi Shahar,
    
    Thank you for submitting the patch. I've looked through it in detail and I think
    I understand the purpose of this code, but I'm going to explain it back to you
    so you can correct me where I'm wrong.
    
    I think this code solves two distinct problems:
    
    1) You need to forward I/O out of the bdev layer to some custom backend, and you
    want the code that does that to live outside of the SPDK repository.
    
    2) Your custom back-end library isn't suitable for use in a run-to-completion
    model. By that I mean that you can't just call your library directly on the
    thread that originally receives the spdk_bdev_io request because your library
    either blocks or generally takes too long to return from the submission call
    (maybe it is doing inline compression or something). Instead, you need to
    shuttle those requests off to separate threads for handling.
    
    As far as point #1, today the SPDK build system does not nicely accommodate bdev
    modules whose code lives outside of SPDK. SPDK expects them to be in
    lib/bdev/<module_name>. However, that's a fairly straightforward change to the
    build system and it's one we've been intending to make for some time.
    
    For point #2, this is likely the case for a large number of storage back-ends,
    but I think the proper way to solve it is probably back-end specific and not
    general purpose. As a counter-point, SPDK already integrates with a number of
    third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and none
    of those ended up needing to pass messages to other threads. They all support
    asynchronous operations, though. I could imagine writing a bdev module that
    ultimately makes POSIX preadv calls, for instance. That would need to be
    implemented with a thread pool and each bdev_io gets funneled off to a thread in
    the pool to perform the blocking operation.
    
    Ok - I explained what I think I'm understanding. Now tell me where I went wrong
    :)
    
    Thanks,
    Ben
    
    On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
    > Hi,
    > 
    > I pushed the code for review, thanks Daniel for the help.
    > 
    > In a nutshell:
    > - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF target
    > - bdev_user_example - reference application
    > - The API relies on rings in order to submit/complete IOs
    > - User appliance registers callbacks for submit_io (should we have
    > read/write/other instead?)
    > - User appliance registers its devices so that they may be added to an
    > existing namespace (I am using RPC to do the management)
    > 
    > Thanks,
    > Shahar
    > 
    > 
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel <daniel.ve
    > rkamp(a)intel.com>
    > Sent: Thursday, May 3, 2018 8:50 PM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > Hi Shahar,
    >  
    > The target branch for the push should be ‘refs/for/master’, not ‘master’ – if
    > you configured a remote as specified in http://www.spdk.io/development/ it
    > should look like:
    >  
    > [remote "review"]
    >   url = https://review.gerrithub.io/spdk/spdk
    >   push = HEAD:refs/for/master
    >  
    > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
    > Sent: Thursday, May 3, 2018 1:00 AM
    > To: Storage Performance Development Kit <spdk(a)lists.01.org>
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > Hi Ben,
    >  
    > I have the code ready for review (spdk/master on dpdk/18.02), but I do not
    > have push rights for gerrithub:
    > shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
    > HEAD:master
    > Password for 'https://ShaharSalzman-K(a)review.gerrithub.io': 
    > Counting objects: 109, done.
    > Compressing objects: 100% (22/22), done.
    > Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
    > Total 22 (delta 14), reused 0 (delta 0)
    > remote: Resolving deltas: 100% (14/14)
    > remote: Branch refs/heads/master:
    > remote: You are not allowed to perform this operation.
    > remote: To push into this reference you need 'Push' rights.
    > remote: User: ShaharSalzman-K
    > remote: Please read the documentation and contact an administrator
    > remote: if you feel the configuration is incorrect
    > remote: Processing changes: refs: 1, done    
    > To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
    >  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access
    > denied)
    > error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.i
    > o/a/spdk/spdk'
    >  
    > Am I doing something incorrect, or is this just a permission issue?
    >  
    > Thanks,
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.sal
    > zman(a)kaminario.com>
    > Sent: Wednesday, April 25, 2018 9:02:38 AM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > Hi Ben,
    >  
    > The code is currently working on v17.07, we are planning on bumping the
    > version to one of the latest stable versions (18.01?) + master.
    > It will take me (hopefully) a few days to update the code and have our
    > internal CI start running on this version, not sure it would be useful, but I
    > can get our working 17.07 code (+ reference application) for review much
    > faster.
    > What is the best course of action?
    >  
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
    > .walker(a)intel.com>
    > Sent: Tuesday, April 24, 2018 7:19:12 PM
    > To: Storage Performance Development Kit
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > Hi Shahar,
    >  
    > Would you be willing to submit your bdev module as a patch on GerritHub? That
    > way everyone can take a look and provide feedback. If you don’t want it to run
    > the tests, you can put [RFC] and the beginning of the commit message.
    >  
    > Thanks,
    > Ben
    >  
    > From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
    > Sent: Monday, April 23, 2018 8:45 AM
    > To: spdk(a)lists.01.org
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > Hi Ben,
    >  
    > Bumping this thread since I've been having some new thoughts on the issue now
    > that we are starting integration with newer spdk versions.
    > Unfortunately the merge isn't as smooth as I'd like it to be since the bdev
    > module is pretty tightly integrated into spdk, perhaps we made some false
    > assumptions writing the module, but it seems some of the newer spdk features
    > are complicating the integration.
    > My question is, if this passthrough module is useful, wouldn't it be better to
    > maintain it as part of spdk so that we can catch issues as soon as they show
    > up?
    > We would be happy to help with maintaining this module, the module with is
    > currently part of our CI with our "frozen" spdk version, but once integrated
    > into the newer version we choose, I'll add it to the CI our CI as well.
    >  
    > Shahar
    > From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
    > .walker(a)intel.com>
    > Sent: Friday, February 2, 2018 11:43:58 PM
    > To: spdk(a)lists.01.org
    > Subject: Re: [SPDK] SPDK + user space appliance
    >  
    > On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
    > > Hi Ben,
    > > 
    > > Would you also like to take a look at the bdev_user module?
    > > It still needs some patching (as some of the stuff is still hard coded), but
    > I
    > > think we can get most of it cleaned up in a couple of days.
    > > 
    > > In any case, is it the intention that the user write his own bdev module, or
    > > would this user appliance glue be a useful generic module?
    > 
    > For existing storage stacks that serve block I/O, like the internals of a SAN,
    > the idea is that you write your own bdev module to forward I/O coming out of
    > the
    > SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
    > as-is.
    > 
    > In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
    > integrate nicely directly into an existing storage application because they
    > spawn their own threads and allocate their own memory. To support that, the
    > libraries may be consumed directly instead of the applications (lib/iscsi,
    > lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
    > but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See
    > 
    > http://www.spdk.io/doc/concurrency.html
    > 
    > We don't currently have a way to write a custom bdev module that resides
    > outside
    > of the SPDK source tree, but it's very possible to add support for that. But
    > beyond that inconvenience (just drop your module in lib/bdev for now), writing
    > a
    > bdev module is the recommended way of interacting with the bottom end of the
    > SPDK bdev layer. I think that's what you really want to be doing in your code,
    > from what I can tell.
    > 
    > I hope that helps!
    > _______________________________________________
    > SPDK mailing list
    > SPDK(a)lists.01.org
    > https://lists.01.org/mailman/listinfo/spdk
    > 
    > _______________________________________________
    > SPDK mailing list
    > SPDK(a)lists.01.org
    > https://lists.01.org/mailman/listinfo/spdk
    _______________________________________________
    SPDK mailing list
    SPDK(a)lists.01.org
    https://lists.01.org/mailman/listinfo/spdk
    


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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-07 18:02 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-05-07 18:02 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 9125 bytes --]

Hi Shahar,

Thank you for submitting the patch. I've looked through it in detail and I think
I understand the purpose of this code, but I'm going to explain it back to you
so you can correct me where I'm wrong.

I think this code solves two distinct problems:

1) You need to forward I/O out of the bdev layer to some custom backend, and you
want the code that does that to live outside of the SPDK repository.

2) Your custom back-end library isn't suitable for use in a run-to-completion
model. By that I mean that you can't just call your library directly on the
thread that originally receives the spdk_bdev_io request because your library
either blocks or generally takes too long to return from the submission call
(maybe it is doing inline compression or something). Instead, you need to
shuttle those requests off to separate threads for handling.

As far as point #1, today the SPDK build system does not nicely accommodate bdev
modules whose code lives outside of SPDK. SPDK expects them to be in
lib/bdev/<module_name>. However, that's a fairly straightforward change to the
build system and it's one we've been intending to make for some time.

For point #2, this is likely the case for a large number of storage back-ends,
but I think the proper way to solve it is probably back-end specific and not
general purpose. As a counter-point, SPDK already integrates with a number of
third-party storage back-ends today (Ceph RBD, libiscsi, libaio, etc.) and none
of those ended up needing to pass messages to other threads. They all support
asynchronous operations, though. I could imagine writing a bdev module that
ultimately makes POSIX preadv calls, for instance. That would need to be
implemented with a thread pool and each bdev_io gets funneled off to a thread in
the pool to perform the blocking operation.

Ok - I explained what I think I'm understanding. Now tell me where I went wrong
:)

Thanks,
Ben

On Sun, 2018-05-06 at 10:32 +0000, Shahar Salzman wrote:
> Hi,
> 
> I pushed the code for review, thanks Daniel for the help.
> 
> In a nutshell:
> - bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF target
> - bdev_user_example - reference application
> - The API relies on rings in order to submit/complete IOs
> - User appliance registers callbacks for submit_io (should we have
> read/write/other instead?)
> - User appliance registers its devices so that they may be added to an
> existing namespace (I am using RPC to do the management)
> 
> Thanks,
> Shahar
> 
> 
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel <daniel.ve
> rkamp(a)intel.com>
> Sent: Thursday, May 3, 2018 8:50 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Shahar,
>  
> The target branch for the push should be ‘refs/for/master’, not ‘master’ – if
> you configured a remote as specified in http://www.spdk.io/development/ it
> should look like:
>  
> [remote "review"]
>   url = https://review.gerrithub.io/spdk/spdk
>   push = HEAD:refs/for/master
>  
> From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
> Sent: Thursday, May 3, 2018 1:00 AM
> To: Storage Performance Development Kit <spdk(a)lists.01.org>
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Ben,
>  
> I have the code ready for review (spdk/master on dpdk/18.02), but I do not
> have push rights for gerrithub:
> shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review
> HEAD:master
> Password for 'https://ShaharSalzman-K(a)review.gerrithub.io': 
> Counting objects: 109, done.
> Compressing objects: 100% (22/22), done.
> Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
> Total 22 (delta 14), reused 0 (delta 0)
> remote: Resolving deltas: 100% (14/14)
> remote: Branch refs/heads/master:
> remote: You are not allowed to perform this operation.
> remote: To push into this reference you need 'Push' rights.
> remote: User: ShaharSalzman-K
> remote: Please read the documentation and contact an administrator
> remote: if you feel the configuration is incorrect
> remote: Processing changes: refs: 1, done    
> To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
>  ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access
> denied)
> error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.i
> o/a/spdk/spdk'
>  
> Am I doing something incorrect, or is this just a permission issue?
>  
> Thanks,
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.sal
> zman(a)kaminario.com>
> Sent: Wednesday, April 25, 2018 9:02:38 AM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Ben,
>  
> The code is currently working on v17.07, we are planning on bumping the
> version to one of the latest stable versions (18.01?) + master.
> It will take me (hopefully) a few days to update the code and have our
> internal CI start running on this version, not sure it would be useful, but I
> can get our working 17.07 code (+ reference application) for review much
> faster.
> What is the best course of action?
>  
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Tuesday, April 24, 2018 7:19:12 PM
> To: Storage Performance Development Kit
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Shahar,
>  
> Would you be willing to submit your bdev module as a patch on GerritHub? That
> way everyone can take a look and provide feedback. If you don’t want it to run
> the tests, you can put [RFC] and the beginning of the commit message.
>  
> Thanks,
> Ben
>  
> From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
> Sent: Monday, April 23, 2018 8:45 AM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> Hi Ben,
>  
> Bumping this thread since I've been having some new thoughts on the issue now
> that we are starting integration with newer spdk versions.
> Unfortunately the merge isn't as smooth as I'd like it to be since the bdev
> module is pretty tightly integrated into spdk, perhaps we made some false
> assumptions writing the module, but it seems some of the newer spdk features
> are complicating the integration.
> My question is, if this passthrough module is useful, wouldn't it be better to
> maintain it as part of spdk so that we can catch issues as soon as they show
> up?
> We would be happy to help with maintaining this module, the module with is
> currently part of our CI with our "frozen" spdk version, but once integrated
> into the newer version we choose, I'll add it to the CI our CI as well.
>  
> Shahar
> From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin
> .walker(a)intel.com>
> Sent: Friday, February 2, 2018 11:43:58 PM
> To: spdk(a)lists.01.org
> Subject: Re: [SPDK] SPDK + user space appliance
>  
> On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> > Hi Ben,
> > 
> > Would you also like to take a look at the bdev_user module?
> > It still needs some patching (as some of the stuff is still hard coded), but
> I
> > think we can get most of it cleaned up in a couple of days.
> > 
> > In any case, is it the intention that the user write his own bdev module, or
> > would this user appliance glue be a useful generic module?
> 
> For existing storage stacks that serve block I/O, like the internals of a SAN,
> the idea is that you write your own bdev module to forward I/O coming out of
> the
> SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
> as-is.
> 
> In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
> integrate nicely directly into an existing storage application because they
> spawn their own threads and allocate their own memory. To support that, the
> libraries may be consumed directly instead of the applications (lib/iscsi,
> lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
> but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See
> 
> http://www.spdk.io/doc/concurrency.html
> 
> We don't currently have a way to write a custom bdev module that resides
> outside
> of the SPDK source tree, but it's very possible to add support for that. But
> beyond that inconvenience (just drop your module in lib/bdev for now), writing
> a
> bdev module is the recommended way of interacting with the bottom end of the
> SPDK bdev layer. I think that's what you really want to be doing in your code,
> from what I can tell.
> 
> I hope that helps!
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
> 
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-06 10:32 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-06 10:32 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 7222 bytes --]

Hi,


I pushed the code for review, thanks Daniel for the help.


In a nutshell:

- bdev_user - an API for a user appliance to use spdk as an iSCSI/NVMeF target

- bdev_user_example - reference application

- The API relies on rings in order to submit/complete IOs

- User appliance registers callbacks for submit_io (should we have read/write/other instead?)

- User appliance registers its devices so that they may be added to an existing namespace (I am using RPC to do the management)


Thanks,

Shahar


________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Verkamp, Daniel <daniel.verkamp(a)intel.com>
Sent: Thursday, May 3, 2018 8:50 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Shahar,



The target branch for the push should be ‘refs/for/master’, not ‘master’ – if you configured a remote as specified in http://www.spdk.io/development/ it should look like:



[remote "review"]

  url = https://review.gerrithub.io/spdk/spdk

  push = HEAD:refs/for/master



From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Thursday, May 3, 2018 1:00 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



I have the code ready for review (spdk/master on dpdk/18.02), but I do not have push rights for gerrithub:

shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$<mailto:shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$> git push spdk-review HEAD:master

Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':

Counting objects: 109, done.

Compressing objects: 100% (22/22), done.

Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.

Total 22 (delta 14), reused 0 (delta 0)

remote: Resolving deltas: 100% (14/14)

remote: Branch refs/heads/master:

remote: You are not allowed to perform this operation.

remote: To push into this reference you need 'Push' rights.

remote: User: ShaharSalzman-K

remote: Please read the documentation and contact an administrator

remote: if you feel the configuration is incorrect

remote: Processing changes: refs: 1, done

To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk

 ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access denied)

error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk'



Am I doing something incorrect, or is this just a permission issue?



Thanks,

Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>>
Sent: Wednesday, April 25, 2018 9:02:38 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



The code is currently working on v17.07, we are planning on bumping the version to one of the latest stable versions (18.01?) + master.

It will take me (hopefully) a few days to update the code and have our internal CI start running on this version, not sure it would be useful, but I can get our working 17.07 code (+ reference application) for review much faster.

What is the best course of action?



Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Tuesday, April 24, 2018 7:19:12 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance



Hi Shahar,



Would you be willing to submit your bdev module as a patch on GerritHub? That way everyone can take a look and provide feedback. If you don’t want it to run the tests, you can put [RFC] and the beginning of the commit message.



Thanks,

Ben



From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Monday, April 23, 2018 8:45 AM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.



Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 19563 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-03 17:50 Verkamp, Daniel
  0 siblings, 0 replies; 35+ messages in thread
From: Verkamp, Daniel @ 2018-05-03 17:50 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 6350 bytes --]

Hi Shahar,

The target branch for the push should be 'refs/for/master', not 'master' - if you configured a remote as specified in http://www.spdk.io/development/ it should look like:

[remote "review"]
  url = https://review.gerrithub.io/spdk/spdk
  push = HEAD:refs/for/master

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Thursday, May 3, 2018 1:00 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance


Hi Ben,



I have the code ready for review (spdk/master on dpdk/18.02), but I do not have push rights for gerrithub:
shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$<mailto:shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$> git push spdk-review HEAD:master
Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':
Counting objects: 109, done.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
Total 22 (delta 14), reused 0 (delta 0)
remote: Resolving deltas: 100% (14/14)
remote: Branch refs/heads/master:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: ShaharSalzman-K
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done
To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
 ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access denied)
error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk'


Am I doing something incorrect, or is this just a permission issue?



Thanks,

Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Shahar Salzman <shahar.salzman(a)kaminario.com<mailto:shahar.salzman(a)kaminario.com>>
Sent: Wednesday, April 25, 2018 9:02:38 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Ben,



The code is currently working on v17.07, we are planning on bumping the version to one of the latest stable versions (18.01?) + master.

It will take me (hopefully) a few days to update the code and have our internal CI start running on this version, not sure it would be useful, but I can get our working 17.07 code (+ reference application) for review much faster.

What is the best course of action?



Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Tuesday, April 24, 2018 7:19:12 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Shahar,



Would you be willing to submit your bdev module as a patch on GerritHub? That way everyone can take a look and provide feedback. If you don't want it to run the tests, you can put [RFC] and the beginning of the commit message.



Thanks,

Ben



From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Monday, April 23, 2018 8:45 AM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.



Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 19310 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-05-03  8:00 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-05-03  8:00 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 5596 bytes --]

Hi Ben,


I have the code ready for review (spdk/master on dpdk/18.02), but I do not have push rights for gerrithub:

shahar.salzman(a)shahars-vm:~/Kaminario/git/spdk$ git push spdk-review HEAD:master
Password for 'https://ShaharSalzman-K(a)review.gerrithub.io':
Counting objects: 109, done.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 8.70 KiB | 0 bytes/s, done.
Total 22 (delta 14), reused 0 (delta 0)
remote: Resolving deltas: 100% (14/14)
remote: Branch refs/heads/master:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: ShaharSalzman-K
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done
To https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk
 ! [remote rejected] HEAD -> master (prohibited by Gerrit: ref update access denied)
error: failed to push some refs to 'https://ShaharSalzman-K(a)review.gerrithub.io/a/spdk/spdk'


Am I doing something incorrect, or is this just a permission issue?


Thanks,

Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Shahar Salzman <shahar.salzman(a)kaminario.com>
Sent: Wednesday, April 25, 2018 9:02:38 AM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Ben,


The code is currently working on v17.07, we are planning on bumping the version to one of the latest stable versions (18.01?) + master.

It will take me (hopefully) a few days to update the code and have our internal CI start running on this version, not sure it would be useful, but I can get our working 17.07 code (+ reference application) for review much faster.

What is the best course of action?


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Tuesday, April 24, 2018 7:19:12 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Shahar,



Would you be willing to submit your bdev module as a patch on GerritHub? That way everyone can take a look and provide feedback. If you don’t want it to run the tests, you can put [RFC] and the beginning of the commit message.



Thanks,

Ben



From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Monday, April 23, 2018 8:45 AM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.



Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 12046 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-04-25  6:02 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-04-25  6:02 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 4150 bytes --]

Hi Ben,


The code is currently working on v17.07, we are planning on bumping the version to one of the latest stable versions (18.01?) + master.

It will take me (hopefully) a few days to update the code and have our internal CI start running on this version, not sure it would be useful, but I can get our working 17.07 code (+ reference application) for review much faster.

What is the best course of action?


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Tuesday, April 24, 2018 7:19:12 PM
To: Storage Performance Development Kit
Subject: Re: [SPDK] SPDK + user space appliance


Hi Shahar,



Would you be willing to submit your bdev module as a patch on GerritHub? That way everyone can take a look and provide feedback. If you don’t want it to run the tests, you can put [RFC] and the beginning of the commit message.



Thanks,

Ben



From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Monday, April 23, 2018 8:45 AM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance



Hi Ben,



Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.



Shahar

________________________________

From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance



On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 8774 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-04-24 16:19 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-04-24 16:19 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 3419 bytes --]

Hi Shahar,

Would you be willing to submit your bdev module as a patch on GerritHub? That way everyone can take a look and provide feedback. If you don't want it to run the tests, you can put [RFC] and the beginning of the commit message.

Thanks,
Ben

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Monday, April 23, 2018 8:45 AM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance


Hi Ben,



Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.



Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org<mailto:spdk-bounces(a)lists.01.org>> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com<mailto:benjamin.walker(a)intel.com>>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
Subject: Re: [SPDK] SPDK + user space appliance

On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org<mailto:SPDK(a)lists.01.org>
https://lists.01.org/mailman/listinfo/spdk

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 8379 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-04-23 15:44 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-04-23 15:44 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]

Hi Ben,


Bumping this thread since I've been having some new thoughts on the issue now that we are starting integration with newer spdk versions.

Unfortunately the merge isn't as smooth as I'd like it to be since the bdev module is pretty tightly integrated into spdk, perhaps we made some false assumptions writing the module, but it seems some of the newer spdk features are complicating the integration.

My question is, if this passthrough module is useful, wouldn't it be better to maintain it as part of spdk so that we can catch issues as soon as they show up?

We would be happy to help with maintaining this module, the module with is currently part of our CI with our "frozen" spdk version, but once integrated into the newer version we choose, I'll add it to the CI our CI as well.


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Friday, February 2, 2018 11:43:58 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
>
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
>
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 4124 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-02-02 21:43 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-02-02 21:43 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]

On Thu, 2018-02-01 at 08:29 +0000, Shahar Salzman wrote:
> Hi Ben,
> 
> Would you also like to take a look at the bdev_user module?
> It still needs some patching (as some of the stuff is still hard coded), but I
> think we can get most of it cleaned up in a couple of days.
> 
> In any case, is it the intention that the user write his own bdev module, or
> would this user appliance glue be a useful generic module?

For existing storage stacks that serve block I/O, like the internals of a SAN,
the idea is that you write your own bdev module to forward I/O coming out of the
SPDK bdev layer. Then you can use the SPDK iSCSI/NVMe-oF/vhost targets mostly
as-is.

In some cases, the actual iSCSI/NVMe-oF/vhost target applications won't
integrate nicely directly into an existing storage application because they
spawn their own threads and allocate their own memory. To support that, the
libraries may be consumed directly instead of the applications (lib/iscsi,
lib/scsi, lib/nvmf, etc.). The libraries don't spawn any of their own threads,
but instead rely on SPDK's abstractions in include/spdk/io_channel.h. See

http://www.spdk.io/doc/concurrency.html

We don't currently have a way to write a custom bdev module that resides outside
of the SPDK source tree, but it's very possible to add support for that. But
beyond that inconvenience (just drop your module in lib/bdev for now), writing a
bdev module is the recommended way of interacting with the bottom end of the
SPDK bdev layer. I think that's what you really want to be doing in your code,
from what I can tell.

I hope that helps!

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-02-01  8:29 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-02-01  8:29 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

Hi Ben,


Would you also like to take a look at the bdev_user module?

It still needs some patching (as some of the stuff is still hard coded), but I think we can get most of it cleaned up in a couple of days.


In any case, is it the intention that the user write his own bdev module, or would this user appliance glue be a useful generic module?


Shahar

________________________________
From: SPDK <spdk-bounces(a)lists.01.org> on behalf of Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: Wednesday, January 31, 2018 6:48:28 PM
To: spdk(a)lists.01.org
Subject: Re: [SPDK] SPDK + user space appliance

On Thu, 2018-01-25 at 14:19 +0000, Shahar Salzman wrote:
> I am glad that this is your intention, the question is, do you think that it
> would be useful to create such a bdev_user module which will allow other users
> to integrate spdk to their appliance using such a simple threading model?
> Perhaps such a module will allow easier integration of spdk.
>
> I am attaching a reference application which is does NULL IO via bdev_user.
>

I spent some time reviewing the code you attached. I'll do a deep dive response
in the future, but several people in the community have been working to write a
guide to the bdev layer (including writing a bdev module), plus some better
examples. Before I do a big response, I want some of that documentation to get
posted and then we can use it as the basis for a discussion. I'm just writing
now to let you know that a response is coming!
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2829 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-31 16:48 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-01-31 16:48 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

On Thu, 2018-01-25 at 14:19 +0000, Shahar Salzman wrote:
> I am glad that this is your intention, the question is, do you think that it
> would be useful to create such a bdev_user module which will allow other users
> to integrate spdk to their appliance using such a simple threading model?
> Perhaps such a module will allow easier integration of spdk.
> 
> I am attaching a reference application which is does NULL IO via bdev_user.
> 

I spent some time reviewing the code you attached. I'll do a deep dive response
in the future, but several people in the community have been working to write a
guide to the bdev layer (including writing a bdev module), plus some better
examples. Before I do a big response, I want some of that documentation to get
posted and then we can use it as the basis for a discussion. I'm just writing
now to let you know that a response is coming! 

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-31 16:40 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-01-31 16:40 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Fri, 2018-01-19 at 17:48 +0000, Walker, Benjamin wrote:
> On Fri, 2018-01-19 at 17:38 +0000, Aneesh Pachilangottil wrote:
> > Hi Shahar,
> >                 By namespace, do you mean the namespace exposed by the
> > NVMeOF
> > target which is visible to the host? I am asking because, I am looking into
> > something similar and would like to understand whether our requirements
> > matches.
> >  
> > My requirement is to add a new namespace to an existing NVMeOF subsystem
> > using
> > RPC. I don`t find an option to do this presently using RPC. When calling
> > construct_nvmf_subsystem method, we can specify the list of namespaces to be
> > created, however adding a new namespace to an already existing subsystem
> > doesn`t seems to be supported. This is what I am trying to achieve.
> >  
> 
> This just needs a new RPC for adding/removing a namespace. The code in
> lib/nvmf
> is already set up to handle dynamically adding and removing namespaces, we
> just
> haven't coded the RPC yet. It's on the NVMe-oF trello board https://trello.com
> /b
> /G2f3dVcs/nvme-of.
> _______________________________________________

I've uploaded some patches to add the necessary RPCs. They aren't merged quite
yet, but will be soon. See:

https://review.gerrithub.io/#/c/396696/


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

* [SPDK] SPDK + user space appliance
@ 2018-01-25 14:19 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-01-25 14:19 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

Hi all,


Sorry for the delay, had to solve a quarantine issue in order to get access to the list.


Some clarifications regarding the user space application:

1. The application is not the nvmf_tgt, we have an entire applicance to which we are integrating spdk

2. We are currently using nvmf_tgt functions in order to activate spdk, and the bdev_user in order to handle IO

3. This is all in user space (I am used to the kernel/user distinction in order to separate protocol/appliance).

4. The bdev_user will also notify spdk of changes to namespaces (e.g. a new namespace has been added, and can be attached to the spdk subsystem)


I am glad that this is your intention, the question is, do you think that it would be useful to create such a bdev_user module which will allow other users to integrate spdk to their appliance using such a simple threading model? Perhaps such a module will allow easier integration of spdk.


I am attaching a reference application which is does NULL IO via bdev_user.


Regarding the RPC, we have an implementation of it, and will be happy to push it upstream.

I am not sure that using the RPC for this type of bdev_user namespaces is the correct approach in the long run, since the user appliance is the one adding/removing namespaces (like hot plugging of a new NVME device), so it can just call the "add_namespace_to_subsystem" interface directly, and does not need to use an RPC for it.


Thanks,

Shahar

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2849 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: nvmf_null_tgt.c --]
[-- Type: text/x-csrc, Size: 9465 bytes --]

/*-
 *   BSD LICENSE
 *
 *   Copyright (c) Intel Corporation.
 *   All rights reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
 *   are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in
 *       the documentation and/or other materials provided with the
 *       distribution.
 *     * Neither the name of Intel Corporation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <spdk/stdinc.h>
#include <spdk/env.h>
#include <spdk/event.h>
#include <spdk/log.h>
#include <spdk/nvmf.h>
#include <spdk/bdev.h>
#include <app/nvmf_tgt/nvmf_tgt.h>
#include "../..//lib/bdev/user/blockdev_user.h"
#include <limits.h>

#define NVMF_NULL_TGT_NUM_IOS (64 * 1024)
#define NVMF_NULL_TGT_IO_RING_SIZE (NVMF_NULL_TGT_NUM_IOS)
#define NVMF_NULL_TGT_IO_POOL_CACHE_SIZE (64)
#define NVMF_NULL_TGT_HANDLE_REQUEST_BATCH (8)

#define NVMF_NULL_TGT_DEFAULT_NQN "nqn.2016-06.io.spdk:cnode1"
#define MAX_CONF_FILE_LEN (2048)

char conf_file_template[] = ""
"[Global]\n"
"  ReactorMask 0x2\n"
"  LogFacility \"local7\"\n"
"[USER]\n"
"  USER User1\n"
"[Nvmf]\n"
"  MaxQueuesPerSession 4\n"
"  AcceptorPollRate 10000\n"
"[Subsystem1]\n"
"  NQN %s\n"
"  Core 1\n"
"  Mode Virtual\n"
"  Listen RDMA %s:1023\n"
"  Namespace User1 \n"
"  SN SPDK00000000000001\n"
"";

char conf_file_temp_name[PATH_MAX];
struct spdk_event *g_shutdown_event = NULL;

struct nvmf_null_tgt_ring_entry {
	struct spdk_bdev_io *bdev_io;
	struct spdk_io_channel *io_channel;
};

struct nvmf_null_tgt_io_thread_ctxt {
	pthread_t tid;
	struct spdk_ring *io_ring;
	struct spdk_mempool *io_event_pool;
	uint32_t lcore;
	volatile bool io_thread_run;
};

struct nvmf_null_tgt_app {
	struct spdk_app_opts opts;
	struct nvmf_null_tgt_io_thread_ctxt thread_ctxt;
	char *listener_ip;
	char *nqn;
};

struct nvmf_null_tgt_io_thread_ctxt *app_thread_ctxt;

static void __shutdown_event_cb(void *arg1, void *arg2)
{
	spdk_nvmf_shutdown_cb();
}

/* This is exactly what lib/event/app would do, but it allows the user to catch
 * its own signals, but also issue the spdk shutdown event */
static void nvmf_null_tgt_signal_handler(int signum)
{
	SPDK_NOTICELOG("Shutting down spdk\n");
	if (g_shutdown_event) {
		spdk_event_call(g_shutdown_event);
		g_shutdown_event = NULL;
	}
}

static void nvmf_null_tgt_get_conf_file(struct nvmf_null_tgt_app *app)
{
	char template[] = "/tmp/spdk_conf_fileXXXXXX";
	char conf_file_contents[MAX_CONF_FILE_LEN];
	int fd;
	int rc;

	snprintf(conf_file_contents, MAX_CONF_FILE_LEN, conf_file_template,
		app->nqn, app->listener_ip);
	strcpy(conf_file_temp_name, template);
	fd = mkstemp(conf_file_temp_name);
	rc = write(fd, conf_file_contents, strlen(conf_file_contents));
	assert(rc > 0);
	close(fd);

	app->opts.config_file = conf_file_temp_name;
}

static void nvmf_null_tgt_remove_conf_file(struct spdk_app_opts *opts)
{
	unlink(conf_file_temp_name);
}

/* For multiple handlers, we iterate between the receivers */
static struct nvmf_null_tgt_io_thread_ctxt *nvmf_null_tgt_choose_handler(void)
{
	return app_thread_ctxt;
}

static void nvmf_null_tgt_set_default_opts(struct spdk_app_opts *opts)
{
	spdk_app_opts_init(opts);
	opts->name = "nvmf_null_tgt";
	opts->max_delay_us = 1000;

	return;
}

static void nvmf_null_tgt_handle_request_batch(struct nvmf_null_tgt_io_thread_ctxt *ctxt)
{
	int count;
	void *events[NVMF_NULL_TGT_HANDLE_REQUEST_BATCH];
	struct nvmf_null_tgt_ring_entry *io_event;
	int i;

	count = spdk_ring_dequeue(ctxt->io_ring, events, 1);
	if (count == 0) {
		return;
	}

	assert(count < NVMF_NULL_TGT_HANDLE_REQUEST_BATCH);

	for (i = 0; i < count; i++) {
		io_event = events[i];
		blockdev_user_submit_completion(io_event->bdev_io);
		spdk_mempool_put(ctxt->io_event_pool, io_event);
	}
}

static void nvmf_null_tgt_submit_request(struct spdk_io_channel *io_channel,
	struct spdk_bdev_io *bdev_io)
{
	int num_enqueued;
	struct nvmf_null_tgt_ring_entry *io_event;
	struct nvmf_null_tgt_io_thread_ctxt *handler_thread_ctxt;

	handler_thread_ctxt = nvmf_null_tgt_choose_handler();

	io_event = spdk_mempool_get(handler_thread_ctxt->io_event_pool);
	io_event->bdev_io = bdev_io;
	io_event->io_channel = io_channel;

	num_enqueued = spdk_ring_enqueue(handler_thread_ctxt->io_ring,
		(void **)&io_event, 1);
	assert(num_enqueued == 1);
}

static void * nvmf_null_tgt_io_thread_fn(void *arg)
{
	struct nvmf_null_tgt_io_thread_ctxt *ctxt = arg;
	int rc;
	cpu_set_t cpu_set;
        struct sched_param param;

        param.sched_priority = sched_get_priority_max(SCHED_RR);
        assert(param.sched_priority != -1);
        rc = pthread_setschedparam(ctxt->tid, SCHED_RR, &param);
	assert(rc == 0);

	CPU_SET(ctxt->lcore, &cpu_set);
	rc = pthread_setaffinity_np(ctxt->tid, sizeof(cpu_set_t), &cpu_set);

	SPDK_NOTICELOG("Starting IO handler\n");

	while (ctxt->io_thread_run) {
		nvmf_null_tgt_handle_request_batch(ctxt);
	}

	SPDK_NOTICELOG("Stopping IO handler\n");

	return NULL;
}

static void nvmf_null_tgt_io_thread_run(struct nvmf_null_tgt_io_thread_ctxt *ctxt)
{
	int rc;

	ctxt->io_thread_run = true;
	ctxt->lcore = 2; /* TODO - set this from user input */
	rc = pthread_create(&ctxt->tid, NULL, nvmf_null_tgt_io_thread_fn,
		ctxt);
	assert(rc == 0);
}

static void nvmf_null_tgt_io_thread_stop(struct nvmf_null_tgt_io_thread_ctxt *ctxt)
{
	void *res;
	int rc;

	ctxt->io_thread_run = false;
	rc = pthread_join(ctxt->tid, &res);
	assert(rc == 0);
}

static void usage(void)
{
	printf("nvmf_null_tgt [options]\n");
	printf("options:\n");
	printf(" -n nqn  - target nqn (default %s)\n", NVMF_NULL_TGT_DEFAULT_NQN);
	printf(" -i IP - listener IP (required)\n");
}

static void nvmf_null_tgt_cli(struct nvmf_null_tgt_app *app, int argc,
	char *argv[])
{
	int ch;

	app->nqn = NVMF_NULL_TGT_DEFAULT_NQN;

	while ((ch = getopt(argc, argv, "i:n:H")) != -1) {
		switch (ch) {
		case 'i':
			app->listener_ip = optarg;
			break;
		case 'n':
			app->nqn = optarg;
			break;
		case 'h':
		default:
			usage();
			exit(EXIT_SUCCESS);
		}
	}

	if (app->listener_ip == NULL) {
		printf("Missing required argument IP (-i)\n");
		printf("\n");
		usage();
	}

	SPDK_NOTICELOG("Using nqn %s IP %s\n", app->nqn, app->listener_ip);
}

static void nvmf_shutdown_test_setup_cb(void *arg1, void *arg2)
{
	SPDK_NOTICELOG("NVMF shutdown test ready to roll!\n");
}

static void nvmf_null_tgt_setup(struct nvmf_null_tgt_app *app)
{
	struct spdk_user_fn_table spdk_user_kal_fn_table = {
		.submit_request	= nvmf_null_tgt_submit_request,
	};
	int rc;

	rc = signal(SIGINT, nvmf_null_tgt_signal_handler);
	assert(rc == 0);
	rc = signal(SIGTERM, nvmf_null_tgt_signal_handler);
	assert(rc == 0);

	spdk_log_set_print_level(SPDK_LOG_NOTICE);
	nvmf_null_tgt_set_default_opts(&app->opts);
	nvmf_null_tgt_get_conf_file(app);

	spdk_app_init(&app->opts);

	blockdev_user_register_fn_table(&spdk_user_kal_fn_table);

	app->thread_ctxt.io_ring = spdk_ring_create(SPDK_RING_TYPE_SP_SC,
		NVMF_NULL_TGT_IO_RING_SIZE,
		SPDK_ENV_SOCKET_ID_ANY);
	app->thread_ctxt.io_event_pool = spdk_mempool_create("null_tgt_io_event",
		NVMF_NULL_TGT_NUM_IOS, sizeof(struct nvmf_null_tgt_ring_entry),
		NVMF_NULL_TGT_IO_POOL_CACHE_SIZE,
		SPDK_ENV_SOCKET_ID_ANY);
	app_thread_ctxt = &app->thread_ctxt;

	g_shutdown_event = spdk_event_allocate(spdk_env_get_current_core(),
		__shutdown_event_cb, NULL, NULL);

	spdk_app_subsystem_init(nvmf_shutdown_test_setup_cb);
}

static void nvmf_null_tgt_run(struct nvmf_null_tgt_app *app)
{
	struct spdk_event *app_start_event;

	nvmf_null_tgt_io_thread_run(&app->thread_ctxt);
	app_start_event = spdk_event_allocate(spdk_env_get_current_core(),
		spdk_nvmf_startup, NULL, NULL);
	spdk_event_call(app_start_event);

	spdk_reactors_start();

	nvmf_null_tgt_io_thread_stop(&app->thread_ctxt);
}

static void nvmf_null_tgt_teardown(struct nvmf_null_tgt_app *app)
{
	spdk_ring_free(app->thread_ctxt.io_ring);
	spdk_mempool_free(app->thread_ctxt.io_event_pool);
	nvmf_null_tgt_remove_conf_file(&app->opts);
}

int main(int argc, char **argv)
{
	struct nvmf_null_tgt_app app ;

	memset(&app, 0, sizeof(struct nvmf_null_tgt_app));

	nvmf_null_tgt_cli(&app, argc, argv);
	nvmf_null_tgt_setup(&app);
	nvmf_null_tgt_run(&app); /* Stopped by signal handler */
	nvmf_null_tgt_teardown(&app);

	return 0;
}

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-23  8:21 Ilan Steinberg
  0 siblings, 0 replies; 35+ messages in thread
From: Ilan Steinberg @ 2018-01-23  8:21 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

+Shahar Salzman


Ilan Steinberg


R&D Team Lead


Kaminario


m:


+972-528-337-818


a:
        1 Haotsma st. Yokneam, Israel

w:


kaminario.com<http://kaminario.com/>  e: ilan.steinberg(a)kaminario.com





________________________________
From: Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: 19 January 2018 7:48 PM
To: spdk(a)lists.01.org
Cc: Yael Shavit; Chethan.Seshadri(a)wdc.com; Senthil.Kumar.Veluswamy(a)wdc.com; Amir Sasson; Ilan Steinberg
Subject: Re: [SPDK] SPDK + user space appliance

On Fri, 2018-01-19 at 17:38 +0000, Aneesh Pachilangottil wrote:
> Hi Shahar,
>                 By namespace, do you mean the namespace exposed by the NVMeOF
> target which is visible to the host? I am asking because, I am looking into
> something similar and would like to understand whether our requirements
> matches.
>
> My requirement is to add a new namespace to an existing NVMeOF subsystem using
> RPC. I don`t find an option to do this presently using RPC. When calling
> construct_nvmf_subsystem method, we can specify the list of namespaces to be
> created, however adding a new namespace to an already existing subsystem
> doesn`t seems to be supported. This is what I am trying to achieve.
>

This just needs a new RPC for adding/removing a namespace. The code in lib/nvmf
is already set up to handle dynamically adding and removing namespaces, we just
haven't coded the RPC yet. It's on the NVMe-oF trello board https://trello.com/b
/G2f3dVcs/nvme-of.

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 6433 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-23  8:20 Ilan Steinberg
  0 siblings, 0 replies; 35+ messages in thread
From: Ilan Steinberg @ 2018-01-23  8:20 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

+Shahar Salzman


Ilan Steinberg


R&D Team Lead


Kaminario


m:


+972-528-337-818


a:
        1 Haotsma st. Yokneam, Israel

w:


kaminario.com<http://kaminario.com/>  e: ilan.steinberg(a)kaminario.com





________________________________
From: Walker, Benjamin <benjamin.walker(a)intel.com>
Sent: 19 January 2018 7:28 PM
To: spdk(a)lists.01.org
Cc: Yael Shavit; Amir Sasson; Ilan Steinberg
Subject: Re: [SPDK] SPDK + user space appliance

On Sun, 2018-01-14 at 09:09 +0000, Shahar Salzman wrote:
> We have been integrating spdk into our system using a blockdev module,
> currently only a POC version.
> Our use case is a user space appliance processing IOs, with an SPDK frontend
> to do the NVMeF.
>
> Currently all of the user bdevs are created via configuration file, but we are
> working to add functions + rpc's which allow creation/deletion of these
> namespaces.

Ok - so you have our NVMe-oF target in front and it routes I/Os to your system
via a custom bdev module that you wrote. This is exactly how we intended for you
to use it, so it looks good to me.

> IO is sent to user space via callback, implementation is up to user space, but
> obviously the longer it lingers there the lower the performance, we use a set
> of rings + threads processing them, so that the time spent in the appliance is
> minimal.
> Going back from user space we use a single ring (multiple producers single
> consumer) onto which the completions are inserted, and the ring poll function
> is registered with spdk core (spdk_poller_register).

What do you mean by I/O is sent to user space via callback? When was the I/O
ever in kernel space? Is your storage system running in the kernel?

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 6565 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-19 17:48 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-01-19 17:48 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

On Fri, 2018-01-19 at 17:38 +0000, Aneesh Pachilangottil wrote:
> Hi Shahar,
>                 By namespace, do you mean the namespace exposed by the NVMeOF
> target which is visible to the host? I am asking because, I am looking into
> something similar and would like to understand whether our requirements
> matches.
>  
> My requirement is to add a new namespace to an existing NVMeOF subsystem using
> RPC. I don`t find an option to do this presently using RPC. When calling
> construct_nvmf_subsystem method, we can specify the list of namespaces to be
> created, however adding a new namespace to an already existing subsystem
> doesn`t seems to be supported. This is what I am trying to achieve.
>  

This just needs a new RPC for adding/removing a namespace. The code in lib/nvmf
is already set up to handle dynamically adding and removing namespaces, we just
haven't coded the RPC yet. It's on the NVMe-oF trello board https://trello.com/b
/G2f3dVcs/nvme-of.

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-19 17:38 Aneesh Pachilangottil
  0 siblings, 0 replies; 35+ messages in thread
From: Aneesh Pachilangottil @ 2018-01-19 17:38 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 3536 bytes --]

Hi Shahar,
                By namespace, do you mean the namespace exposed by the NVMeOF target which is visible to the host? I am asking because, I am looking into something similar and would like to understand whether our requirements matches.

My requirement is to add a new namespace to an existing NVMeOF subsystem using RPC. I don`t find an option to do this presently using RPC. When calling construct_nvmf_subsystem method, we can specify the list of namespaces to be created, however adding a new namespace to an already existing subsystem doesn`t seems to be supported. This is what I am trying to achieve.

Best Regards,
Aneesh

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Chang, Cunyin
Sent: Friday, January 19, 2018 5:24 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Cc: Yael Shavit <yael.shavit(a)kaminario.com>; Amir Sasson <amir.sasson(a)kaminario.com>; Ilan Steinberg <ilan.steinberg(a)kaminario.com>
Subject: Re: [SPDK] SPDK + user space appliance

I suppose your use application just works as the new type "bdev" which will be the namespace of the nvmf target? If so, the SPDK user space nvme
Bdev and aio bdev should be a good reference:
In general bdev layer, when you try to call spdk_bdev_register(), we provide the io channel creation callback as: spdk_bdev_channel_create(),
In this function, we actually will try to call the backend bdev->fn_table->get_io_channel(bdev->ctxt), this should be provided by your application, in
This function, you should implement the poll function just as bdev_nvme_poll(), so, you could keep your our poller for the backend bdev in your own
application without modify of the nvmf target driver. When the nvmf target driver try to call spdk_bdev_get_io_channel() in the function poll_group_update_subsystem(),
it will trigger all the process which I mentioned above.

-Cunyin

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Sunday, January 14, 2018 5:10 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>>
Cc: Yael Shavit <yael.shavit(a)kaminario.com<mailto:yael.shavit(a)kaminario.com>>; Amir Sasson <amir.sasson(a)kaminario.com<mailto:amir.sasson(a)kaminario.com>>; Ilan Steinberg <ilan.steinberg(a)kaminario.com<mailto:ilan.steinberg(a)kaminario.com>>
Subject: [SPDK] SPDK + user space appliance


Hi experts,



We have been integrating spdk into our system using a blockdev module, currently only a POC version.

Our use case is a user space appliance processing IOs, with an SPDK frontend to do the NVMeF.



Currently all of the user bdevs are created via configuration file, but we are working to add functions + rpc's which allow creation/deletion of these namespaces.

IO is sent to user space via callback, implementation is up to user space, but obviously the longer it lingers there the lower the performance, we use a set of rings + threads processing them, so that the time spent in the appliance is minimal.

Going back from user space we use a single ring (multiple producers single consumer) onto which the completions are inserted, and the ring poll function is registered with spdk core (spdk_poller_register).



Does this seem like a sane design? We'd really like your feedback, and if this can be useful to others, push the code into spdk.

Obviously we are willing to go through any review/testing process that is required. And share performance results and issues.



Cheers,

Shahar

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 11391 bytes --]

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-19 17:28 Walker, Benjamin
  0 siblings, 0 replies; 35+ messages in thread
From: Walker, Benjamin @ 2018-01-19 17:28 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

On Sun, 2018-01-14 at 09:09 +0000, Shahar Salzman wrote:
> We have been integrating spdk into our system using a blockdev module,
> currently only a POC version.
> Our use case is a user space appliance processing IOs, with an SPDK frontend
> to do the NVMeF.
> 
> Currently all of the user bdevs are created via configuration file, but we are
> working to add functions + rpc's which allow creation/deletion of these
> namespaces.

Ok - so you have our NVMe-oF target in front and it routes I/Os to your system
via a custom bdev module that you wrote. This is exactly how we intended for you
to use it, so it looks good to me.

> IO is sent to user space via callback, implementation is up to user space, but
> obviously the longer it lingers there the lower the performance, we use a set
> of rings + threads processing them, so that the time spent in the appliance is
> minimal.
> Going back from user space we use a single ring (multiple producers single
> consumer) onto which the completions are inserted, and the ring poll function
> is registered with spdk core (spdk_poller_register).

What do you mean by I/O is sent to user space via callback? When was the I/O
ever in kernel space? Is your storage system running in the kernel?

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

* Re: [SPDK] SPDK + user space appliance
@ 2018-01-18 23:53 Chang, Cunyin
  0 siblings, 0 replies; 35+ messages in thread
From: Chang, Cunyin @ 2018-01-18 23:53 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]

I suppose your use application just works as the new type "bdev" which will be the namespace of the nvmf target? If so, the SPDK user space nvme
Bdev and aio bdev should be a good reference:
In general bdev layer, when you try to call spdk_bdev_register(), we provide the io channel creation callback as: spdk_bdev_channel_create(),
In this function, we actually will try to call the backend bdev->fn_table->get_io_channel(bdev->ctxt), this should be provided by your application, in
This function, you should implement the poll function just as bdev_nvme_poll(), so, you could keep your our poller for the backend bdev in your own
application without modify of the nvmf target driver. When the nvmf target driver try to call spdk_bdev_get_io_channel() in the function poll_group_update_subsystem(),
it will trigger all the process which I mentioned above.

-Cunyin

From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of Shahar Salzman
Sent: Sunday, January 14, 2018 5:10 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Cc: Yael Shavit <yael.shavit(a)kaminario.com>; Amir Sasson <amir.sasson(a)kaminario.com>; Ilan Steinberg <ilan.steinberg(a)kaminario.com>
Subject: [SPDK] SPDK + user space appliance


Hi experts,



We have been integrating spdk into our system using a blockdev module, currently only a POC version.

Our use case is a user space appliance processing IOs, with an SPDK frontend to do the NVMeF.



Currently all of the user bdevs are created via configuration file, but we are working to add functions + rpc's which allow creation/deletion of these namespaces.

IO is sent to user space via callback, implementation is up to user space, but obviously the longer it lingers there the lower the performance, we use a set of rings + threads processing them, so that the time spent in the appliance is minimal.

Going back from user space we use a single ring (multiple producers single consumer) onto which the completions are inserted, and the ring poll function is registered with spdk core (spdk_poller_register).



Does this seem like a sane design? We'd really like your feedback, and if this can be useful to others, push the code into spdk.

Obviously we are willing to go through any review/testing process that is required. And share performance results and issues.



Cheers,

Shahar

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 7446 bytes --]

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

* [SPDK] SPDK + user space appliance
@ 2018-01-14  9:09 Shahar Salzman
  0 siblings, 0 replies; 35+ messages in thread
From: Shahar Salzman @ 2018-01-14  9:09 UTC (permalink / raw)
  To: spdk

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

Hi experts,


We have been integrating spdk into our system using a blockdev module, currently only a POC version.

Our use case is a user space appliance processing IOs, with an SPDK frontend to do the NVMeF.


Currently all of the user bdevs are created via configuration file, but we are working to add functions + rpc's which allow creation/deletion of these namespaces.

IO is sent to user space via callback, implementation is up to user space, but obviously the longer it lingers there the lower the performance, we use a set of rings + threads processing them, so that the time spent in the appliance is minimal.

Going back from user space we use a single ring (multiple producers single consumer) onto which the completions are inserted, and the ring poll function is registered with spdk core (spdk_poller_register).


Does this seem like a sane design? We'd really like your feedback, and if this can be useful to others, push the code into spdk.

Obviously we are willing to go through any review/testing process that is required. And share performance results and issues.


Cheers,

Shahar

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2553 bytes --]

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

end of thread, other threads:[~2018-07-16 22:58 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  6:34 [SPDK] SPDK + user space appliance 
  -- strict thread matches above, loose matches on Subject: below --
2018-07-16 22:58 
2018-07-12 14:34 Shahar Salzman
2018-05-13  8:46 Shahar Salzman
2018-05-11 13:11 
2018-05-10 13:33 Shahar Salzman
2018-05-10  7:36 
2018-05-09 19:45 Shahar Salzman
2018-05-09 16:52 Walker, Benjamin
2018-05-09 11:57 Shahar Salzman
2018-05-09  9:54 
2018-05-09  8:43 
2018-05-09  7:48 Shahar Salzman
2018-05-08 17:30 Walker, Benjamin
2018-05-08  7:36 Shahar Salzman
2018-05-07 18:18 Harris, James R
2018-05-07 18:02 Walker, Benjamin
2018-05-06 10:32 Shahar Salzman
2018-05-03 17:50 Verkamp, Daniel
2018-05-03  8:00 Shahar Salzman
2018-04-25  6:02 Shahar Salzman
2018-04-24 16:19 Walker, Benjamin
2018-04-23 15:44 Shahar Salzman
2018-02-02 21:43 Walker, Benjamin
2018-02-01  8:29 Shahar Salzman
2018-01-31 16:48 Walker, Benjamin
2018-01-31 16:40 Walker, Benjamin
2018-01-25 14:19 Shahar Salzman
2018-01-23  8:21 Ilan Steinberg
2018-01-23  8:20 Ilan Steinberg
2018-01-19 17:48 Walker, Benjamin
2018-01-19 17:38 Aneesh Pachilangottil
2018-01-19 17:28 Walker, Benjamin
2018-01-18 23:53 Chang, Cunyin
2018-01-14  9:09 Shahar Salzman

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.