[SPDK] Re: bdev architecture

Harris, James R <james.r.harris at intel.com> Tue, 09 Mar 2021 14:24:58 +0000
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
Hi Edwin,

Another possibility would be to use spdk_bdev_nvme_io_passthru and avoid trying to create a KV abstraction at all in the bdev layer.  Then the bdev nvme module can just pass those operations straight through to a KV-capable NVMe SSD.  Or a bdev module can implement a handler to emulate NVMe KV opcodes.

-Jim



On 3/9/21, 6:31 AM, "Rodriguez, Edwin" <Ed.Rodriguez(a)netapp.com> wrote:

    I've been implementing the NVMeOf KV protocol and have a question about implementing the KV list operation.  Currently, I've implemented it as returning the same array of packed keys expected by the KV protocol, but it strikes me as tying bdev too closely to the NVME protocol.

    A simple solution is to return one key for each list operation, then iteratively increment the key and pass it back to bdev to search for the next key.  Downside is that the bdev implementation could be expensive to search for a key and that would have to be done for each and every key.

    Another solution is to return a list or array which the controller iterates over to fill in the NVME list of keys, however this requires the controller to estimate how many keys will be needed to fill in the results buffer.  Since keys are variable length and packed together that will pose a challenge.

    And another solution would be to create bdev operations to iterate over the keys in the bdev, but that requires at least 3 operations - open, next and close and requires maintaining state somewhere, probably in the bdev_io itself.

    What would be in keeping with the design philosphy of bdev?  Keep it as is, returning an nvme structure of packed keys or something more abstract?
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org