All of lore.kernel.org
 help / color / mirror / Atom feed
* [SPDK] Re: Nvme target and Multi processes
@ 2019-11-28 10:57 Avner Taieb
  0 siblings, 0 replies; 10+ messages in thread
From: Avner Taieb @ 2019-11-28 10:57 UTC (permalink / raw)
  To: spdk

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

Thanks Jim.
Are the limitations that you listed , hold also for the case the the nvme
target (in our case) doesn't use the underneath subsystem ?
The single reason we set it up to secondary,  is because it communicates
through the SPDK/DPDK shared memory (pools and ring) to communicate with
other processes ?

Avner

On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <james.r.harris(a)intel.com>
wrote:

> Hi Gang and Avner,
>
> The only component in SPDK that has any multi-process support today is the
> SPDK NVMe driver.  The NVMe target does not support multi-process.  You can
> start multiple NVMe target applications on the same system, each as a
> primary process.
>
> Supporting multi-process is way harder than just naming for the memzones.
> Here are just a few areas of complexity (there are many more):
>
> * the bdev layer requires coordination across all threads for certain
> operations such as reset and QoS; this thread iteration is not designed to
> work across threads in multiple processes
> * the NVMe target requires coordination across all threads associated with
> a subsystem; so two processes could not each have connections to the same
> subsystem
> * the processes share state via shared memory; a bug or crash in one
> process may silently affect the state of the other processes
>
> We've been doing a lot of work with SPDK and DPDK to reduce the amount of
> time it takes for a process to initialize.  The goal here is to be able to
> more quickly restart a target process when necessary, rather than trying to
> rely on multi-process for availability.
>
> -Jim
>
>
>
> On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
>
>     One workaround for the 2nd question is that if the name is unique and
> the process who allocate it is exited unexpectedly, the other alive process
> (in the multi processes mode) could try to free it through the name lookup
> to determine whether the allocated memzone is freed or not.
>
>     For the question, I think we coded the common name there in some cases
> and not using the options. May just need to change the code in this case.
>
>     -----Original Message-----
>     From: Avner Taieb <avner(a)reduxio.com>
>     Sent: Wednesday, November 27, 2019 16:36
>     To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     Subject: [SPDK] Re: Nvme target and Multi processes
>
>     Thanks.
>     Is it possible without modifying the spdk code (e.g. through options
> when
>     initialize) ?
>     Also for my second questions , using each time a process re-start a
> new memory zone, will cause memory leakage.
>
>     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com> wrote:
>
>     > If creating the same memory zone, it will fail as duplicate name.
> You
>     > may just lookup an existing zone, or create a unique zone per
> process.
>     >
>     > -----Original Message-----
>     > From: Avner Taieb <avner(a)reduxio.com>
>     > Sent: Wednesday, November 27, 2019 14:52
>     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     > Subject: [SPDK] Nvme target and Multi processes
>     >
>     > Hi All,
>     > Using spdk 19.07, NVME target over TCP, in multi process environment
>     >
>     > The zone name that is reserved for nvme target is not unique (i.e.
>     > "spdk_nvmf_TCP_data") :
>     > 1.  Does it mean that two nvme target processes running as secondary
>     > can not run simultaneously ?
>     > 2. In case of only one secondary as nvme target , if the nvme target
>     > process exits unexpectedly, it looks like it will not be able to
>     > create memory zone, because it already exist from a previous run.
>     >
>     > Am I right ? and if yes, is there any simple workaround  ?
>     >
>     > Thanks
>     > _______________________________________________
>     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email
> to
>     > spdk-leave(a)lists.01.org
>     > _______________________________________________
>     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email
> to
>     > spdk-leave(a)lists.01.org
>     >
>     _______________________________________________
>     SPDK mailing list -- spdk(a)lists.01.org
>     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     _______________________________________________
>     SPDK mailing list -- spdk(a)lists.01.org
>     To unsubscribe send an email to spdk-leave(a)lists.01.org
>
>
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
>

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-12-02 20:11 Avner Taieb
  0 siblings, 0 replies; 10+ messages in thread
From: Avner Taieb @ 2019-12-02 20:11 UTC (permalink / raw)
  To: spdk

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

Hi Jim,
One thing I forgot to re-ask. In the case of only one nvme target:  if it
crashes (as a secondary) and re-launched (as a secondary) , it might fail
because the memory zone still exist.
is there a way to overcome this? without using a unique name each time the
process start ?
Thanks

On Mon, Dec 2, 2019 at 9:51 PM Avner Taieb <avner(a)reduxio.com> wrote:

> Understood. Thanks.
>
> On Mon, Dec 2, 2019 at 9:39 PM Harris, James R <james.r.harris(a)intel.com>
> wrote:
>
>> Hi Avner,
>>
>> It's really hard to say.  This would incorporate a lot of changes outside
>> of SPDK upstream so it's not really possible to give a definitive answer.
>> I suppose if each of the targets listened on a discrete TCP port, each
>> subsystem was only serviced by one target, and you fixed the memzone names
>> to use something more unique, then it might work.  Unfortunately it would
>> be hard to get a lot of support from the SPDK community since this would
>> deviate a lot from upstream SPDK.
>>
>> Regards,
>>
>> -Jim
>>
>> On 12/2/19, 11:45 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
>>
>>     Hi Jim,
>>     You are right, I meant SPDK bdev.
>>     What I am trying to understand, if it is possible to run two
>> secondary nvme
>>     target processes (for two different targets of course) , and both are
>> not
>>     using bdev. Is the memory zone name is the only limitation here ?
>>
>>     More elaboration, that might help understanding the case:
>>     The primary in our use case is attaching to the nvme devices, and it
>> gets
>>     the data from the different nvme targets and write/read to the nvme
>> devices.
>>
>>     Thanks.
>>
>>
>>
>>     On Mon, Dec 2, 2019 at 8:33 PM Harris, James R <
>> james.r.harris(a)intel.com>
>>     wrote:
>>
>>     > Hi Avner,
>>     >
>>     > Can you clarify a bit more on "the nvme target doesn't use the
>> underneath
>>     > subsystem"?  My comment was referring to NVMe subsystems, which are
>>     > integral to the operation of the nvme target.  I think you may be
>> referring
>>     > to not using the SPDK bdev subsystem [1].
>>     >
>>     > You can certainly run the NVMe target in a DPDK secondary process,
>> as long
>>     > as it's not also running in the primary process or a different
>> secondary
>>     > process.  If you're using the NVMe driver in your use case, you'll
>> still
>>     > need to probe and attach devices in the primary process.  You may
>> want to
>>     > refer to the SPDK stub program (in test/app/stub) for an example of
>> how
>>     > that could work.
>>     >
>>     > Regards,
>>     >
>>     > -Jim
>>     >
>>     > [1] It is unfortunate that the term "subsystem" is overloaded
>> here.  SPDK
>>     > used the term "subsystem" to refer to different core SPDK libraries
>> and
>>     > their interdependencies during initialization and shutdown.  And
>> then NVMe
>>     > came along and used that same term for something completely
>> different...  😊
>>     >
>>     > On 11/28/19, 3:55 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
>>     >
>>     >     Thanks Jim.
>>     >     Are the limitations that you listed , hold also for the case
>> the the
>>     > nvme
>>     >     target (in our case) doesn't use the underneath subsystem ?
>>     >     The single reason we set it up to secondary,  is because it
>>     > communicates
>>     >     through the SPDK/DPDK shared memory (pools and ring) to
>> communicate
>>     > with
>>     >     other processes ?
>>     >
>>     >     Avner
>>     >
>>     >     On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <
>>     > james.r.harris(a)intel.com>
>>     >     wrote:
>>     >
>>     >     > Hi Gang and Avner,
>>     >     >
>>     >     > The only component in SPDK that has any multi-process support
>> today
>>     > is the
>>     >     > SPDK NVMe driver.  The NVMe target does not support
>> multi-process.
>>     > You can
>>     >     > start multiple NVMe target applications on the same system,
>> each as a
>>     >     > primary process.
>>     >     >
>>     >     > Supporting multi-process is way harder than just naming for
>> the
>>     > memzones.
>>     >     > Here are just a few areas of complexity (there are many more):
>>     >     >
>>     >     > * the bdev layer requires coordination across all threads for
>> certain
>>     >     > operations such as reset and QoS; this thread iteration is not
>>     > designed to
>>     >     > work across threads in multiple processes
>>     >     > * the NVMe target requires coordination across all threads
>>     > associated with
>>     >     > a subsystem; so two processes could not each have connections
>> to the
>>     > same
>>     >     > subsystem
>>     >     > * the processes share state via shared memory; a bug or crash
>> in one
>>     >     > process may silently affect the state of the other processes
>>     >     >
>>     >     > We've been doing a lot of work with SPDK and DPDK to reduce
>> the
>>     > amount of
>>     >     > time it takes for a process to initialize.  The goal here is
>> to be
>>     > able to
>>     >     > more quickly restart a target process when necessary, rather
>> than
>>     > trying to
>>     >     > rely on multi-process for availability.
>>     >     >
>>     >     > -Jim
>>     >     >
>>     >     >
>>     >     >
>>     >     > On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
>>     >     >
>>     >     >     One workaround for the 2nd question is that if the name is
>>     > unique and
>>     >     > the process who allocate it is exited unexpectedly, the other
>> alive
>>     > process
>>     >     > (in the multi processes mode) could try to free it through
>> the name
>>     > lookup
>>     >     > to determine whether the allocated memzone is freed or not.
>>     >     >
>>     >     >     For the question, I think we coded the common name there
>> in some
>>     > cases
>>     >     > and not using the options. May just need to change the code
>> in this
>>     > case.
>>     >     >
>>     >     >     -----Original Message-----
>>     >     >     From: Avner Taieb <avner(a)reduxio.com>
>>     >     >     Sent: Wednesday, November 27, 2019 16:36
>>     >     >     To: Storage Performance Development Kit <
>> spdk(a)lists.01.org>
>>     >     >     Subject: [SPDK] Re: Nvme target and Multi processes
>>     >     >
>>     >     >     Thanks.
>>     >     >     Is it possible without modifying the spdk code (e.g.
>> through
>>     > options
>>     >     > when
>>     >     >     initialize) ?
>>     >     >     Also for my second questions , using each time a process
>>     > re-start a
>>     >     > new memory zone, will cause memory leakage.
>>     >     >
>>     >     >     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <
>> gang.cao(a)intel.com>
>>     > wrote:
>>     >     >
>>     >     >     > If creating the same memory zone, it will fail as
>> duplicate
>>     > name.
>>     >     > You
>>     >     >     > may just lookup an existing zone, or create a unique
>> zone per
>>     >     > process.
>>     >     >     >
>>     >     >     > -----Original Message-----
>>     >     >     > From: Avner Taieb <avner(a)reduxio.com>
>>     >     >     > Sent: Wednesday, November 27, 2019 14:52
>>     >     >     > To: Storage Performance Development Kit <
>> spdk(a)lists.01.org>
>>     >     >     > Subject: [SPDK] Nvme target and Multi processes
>>     >     >     >
>>     >     >     > Hi All,
>>     >     >     > Using spdk 19.07, NVME target over TCP, in multi process
>>     > environment
>>     >     >     >
>>     >     >     > The zone name that is reserved for nvme target is not
>> unique
>>     > (i.e.
>>     >     >     > "spdk_nvmf_TCP_data") :
>>     >     >     > 1.  Does it mean that two nvme target processes running
>> as
>>     > secondary
>>     >     >     > can not run simultaneously ?
>>     >     >     > 2. In case of only one secondary as nvme target , if
>> the nvme
>>     > target
>>     >     >     > process exits unexpectedly, it looks like it will not
>> be able
>>     > to
>>     >     >     > create memory zone, because it already exist from a
>> previous
>>     > run.
>>     >     >     >
>>     >     >     > Am I right ? and if yes, is there any simple
>> workaround  ?
>>     >     >     >
>>     >     >     > Thanks
>>     >     >     > _______________________________________________
>>     >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe
>> send an
>>     > email
>>     >     > to
>>     >     >     > spdk-leave(a)lists.01.org
>>     >     >     > _______________________________________________
>>     >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe
>> send an
>>     > email
>>     >     > to
>>     >     >     > spdk-leave(a)lists.01.org
>>     >     >     >
>>     >     >     _______________________________________________
>>     >     >     SPDK mailing list -- spdk(a)lists.01.org
>>     >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>>     >     >     _______________________________________________
>>     >     >     SPDK mailing list -- spdk(a)lists.01.org
>>     >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>>     >     >
>>     >     >
>>     >     > _______________________________________________
>>     >     > SPDK mailing list -- spdk(a)lists.01.org
>>     >     > To unsubscribe send an email to spdk-leave(a)lists.01.org
>>     >     >
>>     >     _______________________________________________
>>     >     SPDK mailing list -- spdk(a)lists.01.org
>>     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>>     >
>>     >
>>     > _______________________________________________
>>     > SPDK mailing list -- spdk(a)lists.01.org
>>     > To unsubscribe send an email to spdk-leave(a)lists.01.org
>>     >
>>     _______________________________________________
>>     SPDK mailing list -- spdk(a)lists.01.org
>>     To unsubscribe send an email to spdk-leave(a)lists.01.org
>>
>>
>> _______________________________________________
>> SPDK mailing list -- spdk(a)lists.01.org
>> To unsubscribe send an email to spdk-leave(a)lists.01.org
>>
>

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-12-02 19:51 Avner Taieb
  0 siblings, 0 replies; 10+ messages in thread
From: Avner Taieb @ 2019-12-02 19:51 UTC (permalink / raw)
  To: spdk

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

Understood. Thanks.

On Mon, Dec 2, 2019 at 9:39 PM Harris, James R <james.r.harris(a)intel.com>
wrote:

> Hi Avner,
>
> It's really hard to say.  This would incorporate a lot of changes outside
> of SPDK upstream so it's not really possible to give a definitive answer.
> I suppose if each of the targets listened on a discrete TCP port, each
> subsystem was only serviced by one target, and you fixed the memzone names
> to use something more unique, then it might work.  Unfortunately it would
> be hard to get a lot of support from the SPDK community since this would
> deviate a lot from upstream SPDK.
>
> Regards,
>
> -Jim
>
> On 12/2/19, 11:45 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
>
>     Hi Jim,
>     You are right, I meant SPDK bdev.
>     What I am trying to understand, if it is possible to run two secondary
> nvme
>     target processes (for two different targets of course) , and both are
> not
>     using bdev. Is the memory zone name is the only limitation here ?
>
>     More elaboration, that might help understanding the case:
>     The primary in our use case is attaching to the nvme devices, and it
> gets
>     the data from the different nvme targets and write/read to the nvme
> devices.
>
>     Thanks.
>
>
>
>     On Mon, Dec 2, 2019 at 8:33 PM Harris, James R <
> james.r.harris(a)intel.com>
>     wrote:
>
>     > Hi Avner,
>     >
>     > Can you clarify a bit more on "the nvme target doesn't use the
> underneath
>     > subsystem"?  My comment was referring to NVMe subsystems, which are
>     > integral to the operation of the nvme target.  I think you may be
> referring
>     > to not using the SPDK bdev subsystem [1].
>     >
>     > You can certainly run the NVMe target in a DPDK secondary process,
> as long
>     > as it's not also running in the primary process or a different
> secondary
>     > process.  If you're using the NVMe driver in your use case, you'll
> still
>     > need to probe and attach devices in the primary process.  You may
> want to
>     > refer to the SPDK stub program (in test/app/stub) for an example of
> how
>     > that could work.
>     >
>     > Regards,
>     >
>     > -Jim
>     >
>     > [1] It is unfortunate that the term "subsystem" is overloaded here.
> SPDK
>     > used the term "subsystem" to refer to different core SPDK libraries
> and
>     > their interdependencies during initialization and shutdown.  And
> then NVMe
>     > came along and used that same term for something completely
> different...  😊
>     >
>     > On 11/28/19, 3:55 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
>     >
>     >     Thanks Jim.
>     >     Are the limitations that you listed , hold also for the case the
> the
>     > nvme
>     >     target (in our case) doesn't use the underneath subsystem ?
>     >     The single reason we set it up to secondary,  is because it
>     > communicates
>     >     through the SPDK/DPDK shared memory (pools and ring) to
> communicate
>     > with
>     >     other processes ?
>     >
>     >     Avner
>     >
>     >     On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <
>     > james.r.harris(a)intel.com>
>     >     wrote:
>     >
>     >     > Hi Gang and Avner,
>     >     >
>     >     > The only component in SPDK that has any multi-process support
> today
>     > is the
>     >     > SPDK NVMe driver.  The NVMe target does not support
> multi-process.
>     > You can
>     >     > start multiple NVMe target applications on the same system,
> each as a
>     >     > primary process.
>     >     >
>     >     > Supporting multi-process is way harder than just naming for the
>     > memzones.
>     >     > Here are just a few areas of complexity (there are many more):
>     >     >
>     >     > * the bdev layer requires coordination across all threads for
> certain
>     >     > operations such as reset and QoS; this thread iteration is not
>     > designed to
>     >     > work across threads in multiple processes
>     >     > * the NVMe target requires coordination across all threads
>     > associated with
>     >     > a subsystem; so two processes could not each have connections
> to the
>     > same
>     >     > subsystem
>     >     > * the processes share state via shared memory; a bug or crash
> in one
>     >     > process may silently affect the state of the other processes
>     >     >
>     >     > We've been doing a lot of work with SPDK and DPDK to reduce the
>     > amount of
>     >     > time it takes for a process to initialize.  The goal here is
> to be
>     > able to
>     >     > more quickly restart a target process when necessary, rather
> than
>     > trying to
>     >     > rely on multi-process for availability.
>     >     >
>     >     > -Jim
>     >     >
>     >     >
>     >     >
>     >     > On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
>     >     >
>     >     >     One workaround for the 2nd question is that if the name is
>     > unique and
>     >     > the process who allocate it is exited unexpectedly, the other
> alive
>     > process
>     >     > (in the multi processes mode) could try to free it through the
> name
>     > lookup
>     >     > to determine whether the allocated memzone is freed or not.
>     >     >
>     >     >     For the question, I think we coded the common name there
> in some
>     > cases
>     >     > and not using the options. May just need to change the code in
> this
>     > case.
>     >     >
>     >     >     -----Original Message-----
>     >     >     From: Avner Taieb <avner(a)reduxio.com>
>     >     >     Sent: Wednesday, November 27, 2019 16:36
>     >     >     To: Storage Performance Development Kit <spdk(a)lists.01.org
> >
>     >     >     Subject: [SPDK] Re: Nvme target and Multi processes
>     >     >
>     >     >     Thanks.
>     >     >     Is it possible without modifying the spdk code (e.g.
> through
>     > options
>     >     > when
>     >     >     initialize) ?
>     >     >     Also for my second questions , using each time a process
>     > re-start a
>     >     > new memory zone, will cause memory leakage.
>     >     >
>     >     >     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <
> gang.cao(a)intel.com>
>     > wrote:
>     >     >
>     >     >     > If creating the same memory zone, it will fail as
> duplicate
>     > name.
>     >     > You
>     >     >     > may just lookup an existing zone, or create a unique
> zone per
>     >     > process.
>     >     >     >
>     >     >     > -----Original Message-----
>     >     >     > From: Avner Taieb <avner(a)reduxio.com>
>     >     >     > Sent: Wednesday, November 27, 2019 14:52
>     >     >     > To: Storage Performance Development Kit <
> spdk(a)lists.01.org>
>     >     >     > Subject: [SPDK] Nvme target and Multi processes
>     >     >     >
>     >     >     > Hi All,
>     >     >     > Using spdk 19.07, NVME target over TCP, in multi process
>     > environment
>     >     >     >
>     >     >     > The zone name that is reserved for nvme target is not
> unique
>     > (i.e.
>     >     >     > "spdk_nvmf_TCP_data") :
>     >     >     > 1.  Does it mean that two nvme target processes running
> as
>     > secondary
>     >     >     > can not run simultaneously ?
>     >     >     > 2. In case of only one secondary as nvme target , if the
> nvme
>     > target
>     >     >     > process exits unexpectedly, it looks like it will not be
> able
>     > to
>     >     >     > create memory zone, because it already exist from a
> previous
>     > run.
>     >     >     >
>     >     >     > Am I right ? and if yes, is there any simple workaround
> ?
>     >     >     >
>     >     >     > Thanks
>     >     >     > _______________________________________________
>     >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe
> send an
>     > email
>     >     > to
>     >     >     > spdk-leave(a)lists.01.org
>     >     >     > _______________________________________________
>     >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe
> send an
>     > email
>     >     > to
>     >     >     > spdk-leave(a)lists.01.org
>     >     >     >
>     >     >     _______________________________________________
>     >     >     SPDK mailing list -- spdk(a)lists.01.org
>     >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >     >     _______________________________________________
>     >     >     SPDK mailing list -- spdk(a)lists.01.org
>     >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > SPDK mailing list -- spdk(a)lists.01.org
>     >     > To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >     >
>     >     _______________________________________________
>     >     SPDK mailing list -- spdk(a)lists.01.org
>     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >
>     >
>     > _______________________________________________
>     > SPDK mailing list -- spdk(a)lists.01.org
>     > To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >
>     _______________________________________________
>     SPDK mailing list -- spdk(a)lists.01.org
>     To unsubscribe send an email to spdk-leave(a)lists.01.org
>
>
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
>

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-12-02 19:39 Harris, James R
  0 siblings, 0 replies; 10+ messages in thread
From: Harris, James R @ 2019-12-02 19:39 UTC (permalink / raw)
  To: spdk

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

Hi Avner,

It's really hard to say.  This would incorporate a lot of changes outside of SPDK upstream so it's not really possible to give a definitive answer.  I suppose if each of the targets listened on a discrete TCP port, each subsystem was only serviced by one target, and you fixed the memzone names to use something more unique, then it might work.  Unfortunately it would be hard to get a lot of support from the SPDK community since this would deviate a lot from upstream SPDK.

Regards,

-Jim

On 12/2/19, 11:45 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:

    Hi Jim,
    You are right, I meant SPDK bdev.
    What I am trying to understand, if it is possible to run two secondary nvme
    target processes (for two different targets of course) , and both are not
    using bdev. Is the memory zone name is the only limitation here ?
    
    More elaboration, that might help understanding the case:
    The primary in our use case is attaching to the nvme devices, and it gets
    the data from the different nvme targets and write/read to the nvme devices.
    
    Thanks.
    
    
    
    On Mon, Dec 2, 2019 at 8:33 PM Harris, James R <james.r.harris(a)intel.com>
    wrote:
    
    > Hi Avner,
    >
    > Can you clarify a bit more on "the nvme target doesn't use the underneath
    > subsystem"?  My comment was referring to NVMe subsystems, which are
    > integral to the operation of the nvme target.  I think you may be referring
    > to not using the SPDK bdev subsystem [1].
    >
    > You can certainly run the NVMe target in a DPDK secondary process, as long
    > as it's not also running in the primary process or a different secondary
    > process.  If you're using the NVMe driver in your use case, you'll still
    > need to probe and attach devices in the primary process.  You may want to
    > refer to the SPDK stub program (in test/app/stub) for an example of how
    > that could work.
    >
    > Regards,
    >
    > -Jim
    >
    > [1] It is unfortunate that the term "subsystem" is overloaded here.  SPDK
    > used the term "subsystem" to refer to different core SPDK libraries and
    > their interdependencies during initialization and shutdown.  And then NVMe
    > came along and used that same term for something completely different...  😊
    >
    > On 11/28/19, 3:55 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
    >
    >     Thanks Jim.
    >     Are the limitations that you listed , hold also for the case the the
    > nvme
    >     target (in our case) doesn't use the underneath subsystem ?
    >     The single reason we set it up to secondary,  is because it
    > communicates
    >     through the SPDK/DPDK shared memory (pools and ring) to communicate
    > with
    >     other processes ?
    >
    >     Avner
    >
    >     On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <
    > james.r.harris(a)intel.com>
    >     wrote:
    >
    >     > Hi Gang and Avner,
    >     >
    >     > The only component in SPDK that has any multi-process support today
    > is the
    >     > SPDK NVMe driver.  The NVMe target does not support multi-process.
    > You can
    >     > start multiple NVMe target applications on the same system, each as a
    >     > primary process.
    >     >
    >     > Supporting multi-process is way harder than just naming for the
    > memzones.
    >     > Here are just a few areas of complexity (there are many more):
    >     >
    >     > * the bdev layer requires coordination across all threads for certain
    >     > operations such as reset and QoS; this thread iteration is not
    > designed to
    >     > work across threads in multiple processes
    >     > * the NVMe target requires coordination across all threads
    > associated with
    >     > a subsystem; so two processes could not each have connections to the
    > same
    >     > subsystem
    >     > * the processes share state via shared memory; a bug or crash in one
    >     > process may silently affect the state of the other processes
    >     >
    >     > We've been doing a lot of work with SPDK and DPDK to reduce the
    > amount of
    >     > time it takes for a process to initialize.  The goal here is to be
    > able to
    >     > more quickly restart a target process when necessary, rather than
    > trying to
    >     > rely on multi-process for availability.
    >     >
    >     > -Jim
    >     >
    >     >
    >     >
    >     > On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
    >     >
    >     >     One workaround for the 2nd question is that if the name is
    > unique and
    >     > the process who allocate it is exited unexpectedly, the other alive
    > process
    >     > (in the multi processes mode) could try to free it through the name
    > lookup
    >     > to determine whether the allocated memzone is freed or not.
    >     >
    >     >     For the question, I think we coded the common name there in some
    > cases
    >     > and not using the options. May just need to change the code in this
    > case.
    >     >
    >     >     -----Original Message-----
    >     >     From: Avner Taieb <avner(a)reduxio.com>
    >     >     Sent: Wednesday, November 27, 2019 16:36
    >     >     To: Storage Performance Development Kit <spdk(a)lists.01.org>
    >     >     Subject: [SPDK] Re: Nvme target and Multi processes
    >     >
    >     >     Thanks.
    >     >     Is it possible without modifying the spdk code (e.g. through
    > options
    >     > when
    >     >     initialize) ?
    >     >     Also for my second questions , using each time a process
    > re-start a
    >     > new memory zone, will cause memory leakage.
    >     >
    >     >     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com>
    > wrote:
    >     >
    >     >     > If creating the same memory zone, it will fail as duplicate
    > name.
    >     > You
    >     >     > may just lookup an existing zone, or create a unique zone per
    >     > process.
    >     >     >
    >     >     > -----Original Message-----
    >     >     > From: Avner Taieb <avner(a)reduxio.com>
    >     >     > Sent: Wednesday, November 27, 2019 14:52
    >     >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
    >     >     > Subject: [SPDK] Nvme target and Multi processes
    >     >     >
    >     >     > Hi All,
    >     >     > Using spdk 19.07, NVME target over TCP, in multi process
    > environment
    >     >     >
    >     >     > The zone name that is reserved for nvme target is not unique
    > (i.e.
    >     >     > "spdk_nvmf_TCP_data") :
    >     >     > 1.  Does it mean that two nvme target processes running as
    > secondary
    >     >     > can not run simultaneously ?
    >     >     > 2. In case of only one secondary as nvme target , if the nvme
    > target
    >     >     > process exits unexpectedly, it looks like it will not be able
    > to
    >     >     > create memory zone, because it already exist from a previous
    > run.
    >     >     >
    >     >     > Am I right ? and if yes, is there any simple workaround  ?
    >     >     >
    >     >     > Thanks
    >     >     > _______________________________________________
    >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an
    > email
    >     > to
    >     >     > spdk-leave(a)lists.01.org
    >     >     > _______________________________________________
    >     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an
    > email
    >     > to
    >     >     > spdk-leave(a)lists.01.org
    >     >     >
    >     >     _______________________________________________
    >     >     SPDK mailing list -- spdk(a)lists.01.org
    >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
    >     >     _______________________________________________
    >     >     SPDK mailing list -- spdk(a)lists.01.org
    >     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
    >     >
    >     >
    >     > _______________________________________________
    >     > SPDK mailing list -- spdk(a)lists.01.org
    >     > To unsubscribe send an email to spdk-leave(a)lists.01.org
    >     >
    >     _______________________________________________
    >     SPDK mailing list -- spdk(a)lists.01.org
    >     To unsubscribe send an email to spdk-leave(a)lists.01.org
    >
    >
    > _______________________________________________
    > SPDK mailing list -- spdk(a)lists.01.org
    > To unsubscribe send an email to spdk-leave(a)lists.01.org
    >
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
    


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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-12-02 18:47 Avner Taieb
  0 siblings, 0 replies; 10+ messages in thread
From: Avner Taieb @ 2019-12-02 18:47 UTC (permalink / raw)
  To: spdk

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

Hi Jim,
You are right, I meant SPDK bdev.
What I am trying to understand, if it is possible to run two secondary nvme
target processes (for two different targets of course) , and both are not
using bdev. Is the memory zone name is the only limitation here ?

More elaboration, that might help understanding the case:
The primary in our use case is attaching to the nvme devices, and it gets
the data from the different nvme targets and write/read to the nvme devices.

Thanks.



On Mon, Dec 2, 2019 at 8:33 PM Harris, James R <james.r.harris(a)intel.com>
wrote:

> Hi Avner,
>
> Can you clarify a bit more on "the nvme target doesn't use the underneath
> subsystem"?  My comment was referring to NVMe subsystems, which are
> integral to the operation of the nvme target.  I think you may be referring
> to not using the SPDK bdev subsystem [1].
>
> You can certainly run the NVMe target in a DPDK secondary process, as long
> as it's not also running in the primary process or a different secondary
> process.  If you're using the NVMe driver in your use case, you'll still
> need to probe and attach devices in the primary process.  You may want to
> refer to the SPDK stub program (in test/app/stub) for an example of how
> that could work.
>
> Regards,
>
> -Jim
>
> [1] It is unfortunate that the term "subsystem" is overloaded here.  SPDK
> used the term "subsystem" to refer to different core SPDK libraries and
> their interdependencies during initialization and shutdown.  And then NVMe
> came along and used that same term for something completely different...  😊
>
> On 11/28/19, 3:55 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:
>
>     Thanks Jim.
>     Are the limitations that you listed , hold also for the case the the
> nvme
>     target (in our case) doesn't use the underneath subsystem ?
>     The single reason we set it up to secondary,  is because it
> communicates
>     through the SPDK/DPDK shared memory (pools and ring) to communicate
> with
>     other processes ?
>
>     Avner
>
>     On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <
> james.r.harris(a)intel.com>
>     wrote:
>
>     > Hi Gang and Avner,
>     >
>     > The only component in SPDK that has any multi-process support today
> is the
>     > SPDK NVMe driver.  The NVMe target does not support multi-process.
> You can
>     > start multiple NVMe target applications on the same system, each as a
>     > primary process.
>     >
>     > Supporting multi-process is way harder than just naming for the
> memzones.
>     > Here are just a few areas of complexity (there are many more):
>     >
>     > * the bdev layer requires coordination across all threads for certain
>     > operations such as reset and QoS; this thread iteration is not
> designed to
>     > work across threads in multiple processes
>     > * the NVMe target requires coordination across all threads
> associated with
>     > a subsystem; so two processes could not each have connections to the
> same
>     > subsystem
>     > * the processes share state via shared memory; a bug or crash in one
>     > process may silently affect the state of the other processes
>     >
>     > We've been doing a lot of work with SPDK and DPDK to reduce the
> amount of
>     > time it takes for a process to initialize.  The goal here is to be
> able to
>     > more quickly restart a target process when necessary, rather than
> trying to
>     > rely on multi-process for availability.
>     >
>     > -Jim
>     >
>     >
>     >
>     > On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
>     >
>     >     One workaround for the 2nd question is that if the name is
> unique and
>     > the process who allocate it is exited unexpectedly, the other alive
> process
>     > (in the multi processes mode) could try to free it through the name
> lookup
>     > to determine whether the allocated memzone is freed or not.
>     >
>     >     For the question, I think we coded the common name there in some
> cases
>     > and not using the options. May just need to change the code in this
> case.
>     >
>     >     -----Original Message-----
>     >     From: Avner Taieb <avner(a)reduxio.com>
>     >     Sent: Wednesday, November 27, 2019 16:36
>     >     To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     >     Subject: [SPDK] Re: Nvme target and Multi processes
>     >
>     >     Thanks.
>     >     Is it possible without modifying the spdk code (e.g. through
> options
>     > when
>     >     initialize) ?
>     >     Also for my second questions , using each time a process
> re-start a
>     > new memory zone, will cause memory leakage.
>     >
>     >     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com>
> wrote:
>     >
>     >     > If creating the same memory zone, it will fail as duplicate
> name.
>     > You
>     >     > may just lookup an existing zone, or create a unique zone per
>     > process.
>     >     >
>     >     > -----Original Message-----
>     >     > From: Avner Taieb <avner(a)reduxio.com>
>     >     > Sent: Wednesday, November 27, 2019 14:52
>     >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
>     >     > Subject: [SPDK] Nvme target and Multi processes
>     >     >
>     >     > Hi All,
>     >     > Using spdk 19.07, NVME target over TCP, in multi process
> environment
>     >     >
>     >     > The zone name that is reserved for nvme target is not unique
> (i.e.
>     >     > "spdk_nvmf_TCP_data") :
>     >     > 1.  Does it mean that two nvme target processes running as
> secondary
>     >     > can not run simultaneously ?
>     >     > 2. In case of only one secondary as nvme target , if the nvme
> target
>     >     > process exits unexpectedly, it looks like it will not be able
> to
>     >     > create memory zone, because it already exist from a previous
> run.
>     >     >
>     >     > Am I right ? and if yes, is there any simple workaround  ?
>     >     >
>     >     > Thanks
>     >     > _______________________________________________
>     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an
> email
>     > to
>     >     > spdk-leave(a)lists.01.org
>     >     > _______________________________________________
>     >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an
> email
>     > to
>     >     > spdk-leave(a)lists.01.org
>     >     >
>     >     _______________________________________________
>     >     SPDK mailing list -- spdk(a)lists.01.org
>     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >     _______________________________________________
>     >     SPDK mailing list -- spdk(a)lists.01.org
>     >     To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >
>     >
>     > _______________________________________________
>     > SPDK mailing list -- spdk(a)lists.01.org
>     > To unsubscribe send an email to spdk-leave(a)lists.01.org
>     >
>     _______________________________________________
>     SPDK mailing list -- spdk(a)lists.01.org
>     To unsubscribe send an email to spdk-leave(a)lists.01.org
>
>
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
>

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-12-02 18:33 Harris, James R
  0 siblings, 0 replies; 10+ messages in thread
From: Harris, James R @ 2019-12-02 18:33 UTC (permalink / raw)
  To: spdk

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

Hi Avner,

Can you clarify a bit more on "the nvme target doesn't use the underneath subsystem"?  My comment was referring to NVMe subsystems, which are integral to the operation of the nvme target.  I think you may be referring to not using the SPDK bdev subsystem [1].

You can certainly run the NVMe target in a DPDK secondary process, as long as it's not also running in the primary process or a different secondary process.  If you're using the NVMe driver in your use case, you'll still need to probe and attach devices in the primary process.  You may want to refer to the SPDK stub program (in test/app/stub) for an example of how that could work.

Regards,

-Jim

[1] It is unfortunate that the term "subsystem" is overloaded here.  SPDK used the term "subsystem" to refer to different core SPDK libraries and their interdependencies during initialization and shutdown.  And then NVMe came along and used that same term for something completely different...  😊

On 11/28/19, 3:55 AM, "Avner Taieb" <avner(a)reduxio.com> wrote:

    Thanks Jim.
    Are the limitations that you listed , hold also for the case the the nvme
    target (in our case) doesn't use the underneath subsystem ?
    The single reason we set it up to secondary,  is because it communicates
    through the SPDK/DPDK shared memory (pools and ring) to communicate with
    other processes ?
    
    Avner
    
    On Wed, Nov 27, 2019 at 5:12 PM Harris, James R <james.r.harris(a)intel.com>
    wrote:
    
    > Hi Gang and Avner,
    >
    > The only component in SPDK that has any multi-process support today is the
    > SPDK NVMe driver.  The NVMe target does not support multi-process.  You can
    > start multiple NVMe target applications on the same system, each as a
    > primary process.
    >
    > Supporting multi-process is way harder than just naming for the memzones.
    > Here are just a few areas of complexity (there are many more):
    >
    > * the bdev layer requires coordination across all threads for certain
    > operations such as reset and QoS; this thread iteration is not designed to
    > work across threads in multiple processes
    > * the NVMe target requires coordination across all threads associated with
    > a subsystem; so two processes could not each have connections to the same
    > subsystem
    > * the processes share state via shared memory; a bug or crash in one
    > process may silently affect the state of the other processes
    >
    > We've been doing a lot of work with SPDK and DPDK to reduce the amount of
    > time it takes for a process to initialize.  The goal here is to be able to
    > more quickly restart a target process when necessary, rather than trying to
    > rely on multi-process for availability.
    >
    > -Jim
    >
    >
    >
    > On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:
    >
    >     One workaround for the 2nd question is that if the name is unique and
    > the process who allocate it is exited unexpectedly, the other alive process
    > (in the multi processes mode) could try to free it through the name lookup
    > to determine whether the allocated memzone is freed or not.
    >
    >     For the question, I think we coded the common name there in some cases
    > and not using the options. May just need to change the code in this case.
    >
    >     -----Original Message-----
    >     From: Avner Taieb <avner(a)reduxio.com>
    >     Sent: Wednesday, November 27, 2019 16:36
    >     To: Storage Performance Development Kit <spdk(a)lists.01.org>
    >     Subject: [SPDK] Re: Nvme target and Multi processes
    >
    >     Thanks.
    >     Is it possible without modifying the spdk code (e.g. through options
    > when
    >     initialize) ?
    >     Also for my second questions , using each time a process re-start a
    > new memory zone, will cause memory leakage.
    >
    >     On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com> wrote:
    >
    >     > If creating the same memory zone, it will fail as duplicate name.
    > You
    >     > may just lookup an existing zone, or create a unique zone per
    > process.
    >     >
    >     > -----Original Message-----
    >     > From: Avner Taieb <avner(a)reduxio.com>
    >     > Sent: Wednesday, November 27, 2019 14:52
    >     > To: Storage Performance Development Kit <spdk(a)lists.01.org>
    >     > Subject: [SPDK] Nvme target and Multi processes
    >     >
    >     > Hi All,
    >     > Using spdk 19.07, NVME target over TCP, in multi process environment
    >     >
    >     > The zone name that is reserved for nvme target is not unique (i.e.
    >     > "spdk_nvmf_TCP_data") :
    >     > 1.  Does it mean that two nvme target processes running as secondary
    >     > can not run simultaneously ?
    >     > 2. In case of only one secondary as nvme target , if the nvme target
    >     > process exits unexpectedly, it looks like it will not be able to
    >     > create memory zone, because it already exist from a previous run.
    >     >
    >     > Am I right ? and if yes, is there any simple workaround  ?
    >     >
    >     > Thanks
    >     > _______________________________________________
    >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email
    > to
    >     > spdk-leave(a)lists.01.org
    >     > _______________________________________________
    >     > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email
    > to
    >     > spdk-leave(a)lists.01.org
    >     >
    >     _______________________________________________
    >     SPDK mailing list -- spdk(a)lists.01.org
    >     To unsubscribe send an email to spdk-leave(a)lists.01.org
    >     _______________________________________________
    >     SPDK mailing list -- spdk(a)lists.01.org
    >     To unsubscribe send an email to spdk-leave(a)lists.01.org
    >
    >
    > _______________________________________________
    > SPDK mailing list -- spdk(a)lists.01.org
    > To unsubscribe send an email to spdk-leave(a)lists.01.org
    >
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
    


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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-11-27 15:12 Harris, James R
  0 siblings, 0 replies; 10+ messages in thread
From: Harris, James R @ 2019-11-27 15:12 UTC (permalink / raw)
  To: spdk

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

Hi Gang and Avner,

The only component in SPDK that has any multi-process support today is the SPDK NVMe driver.  The NVMe target does not support multi-process.  You can start multiple NVMe target applications on the same system, each as a primary process.

Supporting multi-process is way harder than just naming for the memzones.  Here are just a few areas of complexity (there are many more):

* the bdev layer requires coordination across all threads for certain operations such as reset and QoS; this thread iteration is not designed to work across threads in multiple processes
* the NVMe target requires coordination across all threads associated with a subsystem; so two processes could not each have connections to the same subsystem
* the processes share state via shared memory; a bug or crash in one process may silently affect the state of the other processes

We've been doing a lot of work with SPDK and DPDK to reduce the amount of time it takes for a process to initialize.  The goal here is to be able to more quickly restart a target process when necessary, rather than trying to rely on multi-process for availability.

-Jim



On 11/27/19, 1:46 AM, "Cao, Gang" <gang.cao(a)intel.com> wrote:

    One workaround for the 2nd question is that if the name is unique and the process who allocate it is exited unexpectedly, the other alive process (in the multi processes mode) could try to free it through the name lookup to determine whether the allocated memzone is freed or not.
    
    For the question, I think we coded the common name there in some cases and not using the options. May just need to change the code in this case.
    
    -----Original Message-----
    From: Avner Taieb <avner(a)reduxio.com> 
    Sent: Wednesday, November 27, 2019 16:36
    To: Storage Performance Development Kit <spdk(a)lists.01.org>
    Subject: [SPDK] Re: Nvme target and Multi processes
    
    Thanks.
    Is it possible without modifying the spdk code (e.g. through options when
    initialize) ?
    Also for my second questions , using each time a process re-start a new memory zone, will cause memory leakage.
    
    On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com> wrote:
    
    > If creating the same memory zone, it will fail as duplicate name. You 
    > may just lookup an existing zone, or create a unique zone per process.
    >
    > -----Original Message-----
    > From: Avner Taieb <avner(a)reduxio.com>
    > Sent: Wednesday, November 27, 2019 14:52
    > To: Storage Performance Development Kit <spdk(a)lists.01.org>
    > Subject: [SPDK] Nvme target and Multi processes
    >
    > Hi All,
    > Using spdk 19.07, NVME target over TCP, in multi process environment
    >
    > The zone name that is reserved for nvme target is not unique (i.e.
    > "spdk_nvmf_TCP_data") :
    > 1.  Does it mean that two nvme target processes running as secondary 
    > can not run simultaneously ?
    > 2. In case of only one secondary as nvme target , if the nvme target 
    > process exits unexpectedly, it looks like it will not be able to 
    > create memory zone, because it already exist from a previous run.
    >
    > Am I right ? and if yes, is there any simple workaround  ?
    >
    > Thanks
    > _______________________________________________
    > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
    > spdk-leave(a)lists.01.org 
    > _______________________________________________
    > SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
    > spdk-leave(a)lists.01.org
    >
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
    


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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-11-27  8:46 Cao, Gang
  0 siblings, 0 replies; 10+ messages in thread
From: Cao, Gang @ 2019-11-27  8:46 UTC (permalink / raw)
  To: spdk

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

One workaround for the 2nd question is that if the name is unique and the process who allocate it is exited unexpectedly, the other alive process (in the multi processes mode) could try to free it through the name lookup to determine whether the allocated memzone is freed or not.

For the question, I think we coded the common name there in some cases and not using the options. May just need to change the code in this case.

-----Original Message-----
From: Avner Taieb <avner(a)reduxio.com> 
Sent: Wednesday, November 27, 2019 16:36
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: Nvme target and Multi processes

Thanks.
Is it possible without modifying the spdk code (e.g. through options when
initialize) ?
Also for my second questions , using each time a process re-start a new memory zone, will cause memory leakage.

On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com> wrote:

> If creating the same memory zone, it will fail as duplicate name. You 
> may just lookup an existing zone, or create a unique zone per process.
>
> -----Original Message-----
> From: Avner Taieb <avner(a)reduxio.com>
> Sent: Wednesday, November 27, 2019 14:52
> To: Storage Performance Development Kit <spdk(a)lists.01.org>
> Subject: [SPDK] Nvme target and Multi processes
>
> Hi All,
> Using spdk 19.07, NVME target over TCP, in multi process environment
>
> The zone name that is reserved for nvme target is not unique (i.e.
> "spdk_nvmf_TCP_data") :
> 1.  Does it mean that two nvme target processes running as secondary 
> can not run simultaneously ?
> 2. In case of only one secondary as nvme target , if the nvme target 
> process exits unexpectedly, it looks like it will not be able to 
> create memory zone, because it already exist from a previous run.
>
> Am I right ? and if yes, is there any simple workaround  ?
>
> Thanks
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
> spdk-leave(a)lists.01.org 
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to 
> spdk-leave(a)lists.01.org
>
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-11-27  8:35 Avner Taieb
  0 siblings, 0 replies; 10+ messages in thread
From: Avner Taieb @ 2019-11-27  8:35 UTC (permalink / raw)
  To: spdk

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

Thanks.
Is it possible without modifying the spdk code (e.g. through options when
initialize) ?
Also for my second questions , using each time a process re-start a new
memory zone, will cause memory leakage.

On Wed, Nov 27, 2019 at 10:22 AM Cao, Gang <gang.cao(a)intel.com> wrote:

> If creating the same memory zone, it will fail as duplicate name. You may
> just lookup an existing zone, or create a unique zone per process.
>
> -----Original Message-----
> From: Avner Taieb <avner(a)reduxio.com>
> Sent: Wednesday, November 27, 2019 14:52
> To: Storage Performance Development Kit <spdk(a)lists.01.org>
> Subject: [SPDK] Nvme target and Multi processes
>
> Hi All,
> Using spdk 19.07, NVME target over TCP, in multi process environment
>
> The zone name that is reserved for nvme target is not unique (i.e.
> "spdk_nvmf_TCP_data") :
> 1.  Does it mean that two nvme target processes running as secondary can
> not run simultaneously ?
> 2. In case of only one secondary as nvme target , if the nvme target
> process exits unexpectedly, it looks like it will not be able to create
> memory zone, because it already exist from a previous run.
>
> Am I right ? and if yes, is there any simple workaround  ?
>
> Thanks
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
> _______________________________________________
> SPDK mailing list -- spdk(a)lists.01.org
> To unsubscribe send an email to spdk-leave(a)lists.01.org
>

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

* [SPDK] Re: Nvme target and Multi processes
@ 2019-11-27  8:22 Cao, Gang
  0 siblings, 0 replies; 10+ messages in thread
From: Cao, Gang @ 2019-11-27  8:22 UTC (permalink / raw)
  To: spdk

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

If creating the same memory zone, it will fail as duplicate name. You may just lookup an existing zone, or create a unique zone per process.

-----Original Message-----
From: Avner Taieb <avner(a)reduxio.com> 
Sent: Wednesday, November 27, 2019 14:52
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Nvme target and Multi processes

Hi All,
Using spdk 19.07, NVME target over TCP, in multi process environment

The zone name that is reserved for nvme target is not unique (i.e.
"spdk_nvmf_TCP_data") :
1.  Does it mean that two nvme target processes running as secondary can not run simultaneously ?
2. In case of only one secondary as nvme target , if the nvme target process exits unexpectedly, it looks like it will not be able to create memory zone, because it already exist from a previous run.

Am I right ? and if yes, is there any simple workaround  ?

Thanks
_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org
To unsubscribe send an email to spdk-leave(a)lists.01.org

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

end of thread, other threads:[~2019-12-02 20:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 10:57 [SPDK] Re: Nvme target and Multi processes Avner Taieb
  -- strict thread matches above, loose matches on Subject: below --
2019-12-02 20:11 Avner Taieb
2019-12-02 19:51 Avner Taieb
2019-12-02 19:39 Harris, James R
2019-12-02 18:47 Avner Taieb
2019-12-02 18:33 Harris, James R
2019-11-27 15:12 Harris, James R
2019-11-27  8:46 Cao, Gang
2019-11-27  8:35 Avner Taieb
2019-11-27  8:22 Cao, Gang

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.