Skip to contentSkip to conversation

dm-lightnvm introduction

RFC PATCH In review Matias Bjørling 9 participants 18 messages Mar 21, 2014 – Mar 25, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover dm-lightnvm introduction

Hi,

Users that have custom firmware SSDs, may choose to expose their flash directly. This allows the host to control logical to physical address mappings, garbage collection strategy, wear-leveling, and so on.

This is beneficial when you either want to strip the cost of a costly controller or want detailed control over an SSD. Such as implementing key-value stores, object-stored, atomic I/Os, etc.

LightNVM implements the host-side core. It supports two modes. Users that doesn't have hardware available and want to emulate an SSD, and users with a physical SSD, that has a LightNVM compatible firmware.

The behavior of the core can be exposed through the various components that make up an FTL. Thus, it is not single implementation, but instead possible to mix the best algorithms for the user-space application workloads.

Currently, LightNVM implements a page-based FTL, cost-based GC and simple wear-leveling. Additionally, it allows simulation of flash timings when hardware isn't available. There's work on getting it to the OpenSSD platform with a custom firmware and getting it stable for broad use.

There is still much work to do. I'm looking for feedback on the approach, dm integration, and more. Any feedback is greatly appreciated.

A presentation was given at the recent Non-Volatile Memory Workshop (NVMW) workshop. Slides are available at: http://bjorling.me/NVMW2014-LightNVM.pdf

Major todo's:
* Patch has TODO and FIXME in places that needs to be cleaned.
* LightNVM compatible firmware for the OpenSSD platform and integration.
* Performance regressions during GC.
* Durability during power failure.

Thanks,

Matias

Matias Bjørling (1):
dm-lightnvm: An open FTL for open firmware SSDs

 drivers/md/Kconfig             |   1 +
 drivers/md/Makefile            |   1 +
 drivers/md/lightnvm/Kconfig    |  14 +
 drivers/md/lightnvm/Makefile   |   1 +
 drivers/md/lightnvm/core.c     | 705 +++++++++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/gc.c       | 208 ++++++++++++
 drivers/md/lightnvm/lightnvm.c | 589 ++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/lightnvm.h | 592 ++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/reg.c      |  41 +++
 9 files changed, 2152 insertions(+)
 create mode 100644 drivers/md/lightnvm/Kconfig
 create mode 100644 drivers/md/lightnvm/Makefile
 create mode 100644 drivers/md/lightnvm/core.c
 create mode 100644 drivers/md/lightnvm/gc.c
 create mode 100644 drivers/md/lightnvm/lightnvm.c
 create mode 100644 drivers/md/lightnvm/lightnvm.h
 create mode 100644 drivers/md/lightnvm/reg.c
Signature · 6 lines
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

RFC PATCH 1/1 dm-lightnvm: An open FTL for open firmware SSDs

LightNVM implements the internal logic of an SSD within the host system. This includes logic such as translation tables for logical to physical address translation, garbage collection and wear-leveling.

It is designed to be used either standalone or with a LightNVM compatible firmware. If used standalone, NVM memory can be simulated by passing timings to the dm target table. If used with a LightNVM compatible device, the device will be queued upon initialized for the relevant values.

The last part is still in progress and a fully working prototype will be presented in upcoming patches.

Contributions to make this possible by the following people:

Aviad Zuck <[email protected]>
Jesper Madsen <[email protected]>

---
 drivers/md/Kconfig             |   1 +
 drivers/md/Makefile            |   1 +
 drivers/md/lightnvm/Kconfig    |  14 +
 drivers/md/lightnvm/Makefile   |   1 +
 drivers/md/lightnvm/core.c     | 705 +++++++++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/gc.c       | 208 ++++++++++++
 drivers/md/lightnvm/lightnvm.c | 589 ++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/lightnvm.h | 592 ++++++++++++++++++++++++++++++++++
 drivers/md/lightnvm/reg.c      |  41 +++
 9 files changed, 2152 insertions(+)
 create mode 100644 drivers/md/lightnvm/Kconfig
 create mode 100644 drivers/md/lightnvm/Makefile
 create mode 100644 drivers/md/lightnvm/core.c
 create mode 100644 drivers/md/lightnvm/gc.c
 create mode 100644 drivers/md/lightnvm/lightnvm.c
 create mode 100644 drivers/md/lightnvm/lightnvm.h
 create mode 100644 drivers/md/lightnvm/reg.c
drivers/md/Kconfig +1 -0
index f2ccbc3..ffce728 100644
@@ -175,6 +175,7 @@ config MD_FAULTY
 	  In unsure, say N.
 
 source "drivers/md/bcache/Kconfig"
+source "drivers/md/lightnvm/Kconfig"
 
 config BLK_DEV_DM
 	tristate "Device mapper support"
drivers/md/Makefile +1 -0
index 2acc43f..ee1d9d7 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_MD_RAID456)	+= raid456.o
 obj-$(CONFIG_MD_MULTIPATH)	+= multipath.o
 obj-$(CONFIG_MD_FAULTY)		+= faulty.o
 obj-$(CONFIG_BCACHE)		+= bcache/
+obj-$(CONFIG_LIGHTNVM)		+= lightnvm/
 obj-$(CONFIG_BLK_DEV_MD)	+= md-mod.o
 obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
 obj-$(CONFIG_DM_BUFIO)		+= dm-bufio.o
drivers/md/lightnvm/Kconfig new file +14 -0
new file mode 100644
index 0000000..1f10554
@@ -0,0 +1,14 @@
+config LIGHTNVM
+	tristate "LightNVM translation layer support (EXPERIMENTAL)"
+	depends on BLK_DEV_DM
+	---help---
+		A target that implements the internals of SSDs within the host.
+		The target can be used with LightNVM compatible device or as an
+		in-memory store. The device mapper is used together with a
+		"bare" firmware. It exposes direct access to the underlying NVM.
+
+		To compile this code as a module, choose M here: the module will
+		be called dm-lightnvm.
+
+		If unsure, say N.
+
drivers/md/lightnvm/Makefile new file +1 -0
new file mode 100644
index 0000000..4fb03ba
@@ -0,0 +1 @@
+obj-$(CONFIG_LIGHTNVM)		+= lightnvm.o reg.o core.o gc.o
drivers/md/lightnvm/core.c new file +705 -0

705 lines not on this page · raw message

drivers/md/lightnvm/gc.c new file +208 -0

208 lines not on this page · raw message

drivers/md/lightnvm/lightnvm.c new file +589 -0

589 lines not on this page · raw message

drivers/md/lightnvm/lightnvm.h new file +592 -0

592 lines not on this page · raw message

drivers/md/lightnvm/reg.c new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#2 lore raw

Re: [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Quoted 19 lines · Matias Bjørling

LightNVM implements the internal logic of an SSD within the host system. This includes logic such as translation tables for logical to physical address translation, garbage collection and wear-leveling.

It is designed to be used either standalone or with a LightNVM compatible firmware. If used standalone, NVM memory can be simulated by passing timings to the dm target table. If used with a LightNVM compatible device, the device will be queued upon initialized for the relevant values.

The last part is still in progress and a fully working prototype will be presented in upcoming patches.

Contributions to make this possible by the following people:

Aviad Zuck <[email protected]>
Jesper Madsen <[email protected]>

...

Quoted 28 lines
drivers/md/lightnvm/core.c new file +22 -0
new file mode 100644
index 0000000..113fde9
@@ -0,0 +1,705 @@
+#include "lightnvm.h"
+
+/* alloc pbd, but also decorate it with bio */
+static struct per_bio_data *alloc_init_pbd(struct nvmd *nvmd, struct bio *bio)
+{
+	struct per_bio_data *pb = mempool_alloc(nvmd->per_bio_pool, GFP_NOIO);
+
+	if (!pb) {
+		DMERR("Couldn't allocate per_bio_data");
+		return NULL;
+	}
+
+	pb->bi_end_io = bio->bi_end_io;
+	pb->bi_private = bio->bi_private;
+
+	bio->bi_private = pb;
+
+	return pb;
+}
+
+static void free_pbd(struct nvmd *nvmd, struct per_bio_data *pb)
+{

drivers/md/lightnvm/core.c line 32

Quoted 10 lines
drivers/md/lightnvm/core.c new file +10 -0
+	mempool_free(pb, nvmd->per_bio_pool);
+}
+
+/* bio to be stripped from the pbd structure */
+static void exit_pbd(struct per_bio_data *pb, struct bio *bio)
+{
+	bio->bi_private = pb->bi_private;
+	bio->bi_end_io = pb->bi_end_io;
+}
+

Hi Matias,

This looks like it'll be very interesting! But I won't have time to do a proper review of this code for ~1.5 weeks (traveling early next week and then need to finish some high priority work on dm-thin once I'm back).

But a couple quick things I noticed:

1) you don't need to roll your own per-bio-data allocation code any more. The core block layer provides per_bio_data now.

And the DM targets have been converted to make use of it. See callers of dm_per_bio_data() and how the associated targets set ti->per_bio_data_size

2) Also, if you're chaining bi_end_io (like it appears you're doing) you'll definitely need to call atomic_inc(&bio->bi_remaining); after you restore bio->bi_end_io. This is a new requirement of the 3.14 kernel (due to the block core's immutable biovec changes).

Please sort these issues out, re-test on 3.14, and post v2, thanks! Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Re: [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Quoted 64 lines · Mike Snitzer
Quoted 19 lines · Matias Bjørling

LightNVM implements the internal logic of an SSD within the host system. This includes logic such as translation tables for logical to physical address translation, garbage collection and wear-leveling.

It is designed to be used either standalone or with a LightNVM compatible firmware. If used standalone, NVM memory can be simulated by passing timings to the dm target table. If used with a LightNVM compatible device, the device will be queued upon initialized for the relevant values.

The last part is still in progress and a fully working prototype will be presented in upcoming patches.

Contributions to make this possible by the following people:

Aviad Zuck <[email protected]>
Jesper Madsen <[email protected]>

...

Quoted 28 lines
drivers/md/lightnvm/core.c new file +22 -0
new file mode 100644
index 0000000..113fde9
@@ -0,0 +1,705 @@
+#include "lightnvm.h"
+
+/* alloc pbd, but also decorate it with bio */
+static struct per_bio_data *alloc_init_pbd(struct nvmd *nvmd, struct bio *bio)
+{
+	struct per_bio_data *pb = mempool_alloc(nvmd->per_bio_pool, GFP_NOIO);
+
+	if (!pb) {
+		DMERR("Couldn't allocate per_bio_data");
+		return NULL;
+	}
+
+	pb->bi_end_io = bio->bi_end_io;
+	pb->bi_private = bio->bi_private;
+
+	bio->bi_private = pb;
+
+	return pb;
+}
+
+static void free_pbd(struct nvmd *nvmd, struct per_bio_data *pb)
+{

drivers/md/lightnvm/core.c line 32

Quoted 10 lines
drivers/md/lightnvm/core.c new file +10 -0
+	mempool_free(pb, nvmd->per_bio_pool);
+}
+
+/* bio to be stripped from the pbd structure */
+static void exit_pbd(struct per_bio_data *pb, struct bio *bio)
+{
+	bio->bi_private = pb->bi_private;
+	bio->bi_end_io = pb->bi_end_io;
+}
+

Hi Matias,

Quoted 4 lines

This looks like it'll be very interesting! But I won't have time to do a proper review of this code for ~1.5 weeks (traveling early next week and then need to finish some high priority work on dm-thin once I'm back).

That's great.

Quoted 10 lines

But a couple quick things I noticed:

1) you don't need to roll your own per-bio-data allocation code any more. The core block layer provides per_bio_data now.

And the DM targets have been converted to make use of it. See callers of dm_per_bio_data() and how the associated targets set ti->per_bio_data_size

Quoted 8 lines

2) Also, if you're chaining bi_end_io (like it appears you're doing) you'll definitely need to call atomic_inc(&bio->bi_remaining); after you restore bio->bi_end_io. This is a new requirement of the 3.14 kernel (due to the block core's immutable biovec changes).

Please sort these issues out, re-test on 3.14, and post v2, thanks! Mike

Thanks. I'll get it fixed and rebasedk/tested on 3.14.

Matias

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

In reply to Matias Bjørling

Just curious: why do you think implementing this as a block remapper inside device mapper is a better idea than as a blk-mq driver?

At the request layer you already get a lot of infrastucture for all the queueing infrastructure for free, as well as all kinds of other helpers. And the driver never remaps bios anyway but always submits new ones as far as I can tell.

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

#5 lore raw

Re: [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Quoted 2 lines · Christoph Hellwig

Just curious: why do you think implementing this as a block remapper inside device mapper is a better idea than as a blk-mq driver?

Hi Christoph,

I imagine the layer to interact with a compatible SSD, that either uses SATA, NVMe or PCI-e as host interface. My original thought was to use some of device mapper logic (such as raid, prisoning, etc.) to implement some of the primitives. Maybe this is overkill, and its better to stuff it between the blk-mq drivers and the blk-mq layer.

Quoted 5 lines

At the request layer you already get a lot of infrastucture for all the queueing infrastructure for free, as well as all kinds of other helpers. And the driver never remaps bios anyway but always submits new ones as far as I can tell.

Good point.

Quoted 5 lines

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

Agree, an underlying driver is missing. My first plan is to get a draft firmware for the OpenSSD to be stable and expose its primitives (read/write/erase) up through the ATA/SCSI stack. Communicating using vendor specific codes.

- Matias

#6 lore raw

Re: [dm-devel] [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Hi, Matias,

Sorry for jumping in. I am interested in this new feature, too.

Quoted 9 lines
Quoted 4 lines

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

Agree, an underlying driver is missing. My first plan is to get a draft firmware for the OpenSSD to be stable and expose its primitives (read/write/erase) up through the ATA/SCSI stack. Communicating using vendor specific codes.

Exposing FTL to the host layer has potential to share mapping in cache software (or driver) and the device. The "Unified Address Space" in the slides below addresses the problem of two levels of indirection.
http://www1.unine.ch/eurosys2012/posters/saxena.pdf

Developing API to share mapping between driver and the device sounds interesting, too.

--
Akira

#7 lore raw

Re: [dm-devel] [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Quoted 14 lines · Akira Hayakawa

Hi, Matias,

Sorry for jumping in. I am interested in this new feature, too.

Quoted 9 lines
Quoted 4 lines

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

Agree, an underlying driver is missing. My first plan is to get a draft firmware for the OpenSSD to be stable and expose its primitives (read/write/erase) up through the ATA/SCSI stack. Communicating using vendor specific codes.

Hi Akira,

Indeed. Most of Mohit's work can be applied with this layer. In the same breath we could also look into nameless writes. It would up open for a new design for co-operating file systems.

Quoted 13 lines

Exposing FTL to the host layer has potential to share mapping in cache software (or driver) and the device. The "Unified Address Space" in the slides below addresses the problem of two levels of indirection.
http://www1.unine.ch/eurosys2012/posters/saxena.pdf

Developing API to share mapping between driver and the device sounds interesting, too.

--
Akira
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

Re: [dm-devel] [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

In reply to Christoph Hellwig
Quoted 11 lines · Christoph Hellwig

Just curious: why do you think implementing this as a block remapper inside device mapper is a better idea than as a blk-mq driver?

At the request layer you already get a lot of infrastructure for all the queueing infrastructure for free, as well as all kinds of other helpers. And the driver never remaps bios anyway but always submits new ones as far as I can tell.

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

There might be some overlap between the functionality available in the lightnvm driver and the WalB driver announced last year. That last driver might have a wider user base and hence may have received more testing. See also http://thread.gmane.org/gmane.linux.file-systems/75124.

Bart.

#9 lore raw

Re: [dm-devel] [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Quoted 9 lines · Bart Van Assche
Quoted 8 lines · Christoph Hellwig

Just curious: why do you think implementing this as a block remapper inside device mapper is a better idea than as a blk-mq driver?

At the request layer you already get a lot of infrastructure for all the queueing infrastructure for free, as well as all kinds of other helpers. And the driver never remaps bios anyway but always submits new ones as far as I can tell.

Quoted 9 lines
Quoted 3 lines

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

There might be some overlap between the functionality available in the lightnvm driver and the WalB driver announced last year. That last driver might have a wider user base and hence may have received more testing. See also http://thread.gmane.org/gmane.linux.file-systems/75124.

Hi Bart,

Thanks! There seems to be a little bit that can be reused. It does seem from the github page that there haven't been any development since its been posted. Maybe the development is moved elsewhere?

Quoted 2 lines

Bart.

#10 lore raw

Re: [dm-devel] [PATCH RFC v1 01/01] dm-lightnvm: An open FTL for open firmware SSDs

Hi Matias,

Quoted 20 lines · Matias Bjorling
Quoted 9 lines · Bart Van Assche
Quoted 8 lines · Christoph Hellwig

Just curious: why do you think implementing this as a block remapper inside device mapper is a better idea than as a blk-mq driver?

At the request layer you already get a lot of infrastructure for all the queueing infrastructure for free, as well as all kinds of other helpers. And the driver never remaps bios anyway but always submits new ones as far as I can tell.

Quoted 9 lines
Quoted 3 lines

Does it even make sense to expose the underlying devices as block devices? It surely would help to send this together with a driver that you plan to use it on top of.

There might be some overlap between the functionality available in the lightnvm driver and the WalB driver announced last year. That last driver might have a wider user base and hence may have received more testing. See also http://thread.gmane.org/gmane.linux.file-systems/75124.

Quoted 5 lines

Hi Bart,

Thanks! There seems to be a little bit that can be reused. It does seem from the github page that there haven't been any development since its been posted. Maybe the development is moved elsewhere?

I'm one of WalB developers and the github site is currently official.
The latest code seems work with Linux kernel 3.13 but the code does not support the latest block-layer features like blk-mq. Its code is currently a bit legacy... I will rework with it but I'm developing related userland tools and having no time for kernel code.

WalB is being developed for incremental backup and asynchrounous replication with legacy block devices. Its code will not be used for dm-lightnvm directly but its algorithm may be useful for some purposes because it is similar to FTL.

It must be nice if dm-lightnvm software will have incremental backup and replication functionality with FTL management.

Quoted 4 lines
Quoted 2 lines

Bart.

Takashi

#11 lore raw
In reply to Matias Bjørling

Hi Matias,

This looks really interesting and I'd love to get involved. Do you have any recommendations for what hardware I should pick up?

- Joe

Quoted 5 lines · Matias Bjørling

Hi,

Users that have custom firmware SSDs, may choose to expose their flash directly. This allows the host to control logical to physical address mappings, garbage collection strategy, wear-leveling, and so on.

#12 lore raw
Quoted 4 lines · Joe Thornber

Hi Matias,

This looks really interesting and I'd love to get involved. Do you have any recommendations for what hardware I should pick up?

Hi Joe,

The most easily available platform is OpenSSD
(http://www.openssd-project.org). It's a little old, but still very functional. When there's a good firmware implementation, I think it will be easier for the custom SSD vendor's to jump on board with their own firmware.

- Matias

Quoted 10 lines

- Joe

Quoted 5 lines · Matias Bjørling

Hi,

Users that have custom firmware SSDs, may choose to expose their flash directly. This allows the host to control logical to physical address mappings, garbage collection strategy, wear-leveling, and so on.

#13 lore raw
Quoted 6 lines · Matias Bjorling
Quoted 4 lines · Joe Thornber

Hi Matias,

This looks really interesting and I'd love to get involved. Do you have any recommendations for what hardware I should pick up?

Quoted 7 lines

Hi Joe,

The most easily available platform is OpenSSD
(http://www.openssd-project.org). It's a little old, but still very functional. When there's a good firmware implementation, I think it will be easier for the custom SSD vendor's to jump on board with their own firmware.

Is this something that would make sense to use for accessing the NAND flash that's being used on routers nowdays? Talking with the OpenWRT folks, they are having trouble supporting those devices because the flash may contain defects and squashfs doesn't work in such an environment. This appears to be the one remaining problem preventing a lot of new routers from working.

If this can work as a shim layer between the hardware and the filesystem for OpenWRT, you would gain a very large userbase rather quickly.

David Lang

#14 lore raw
Quoted 23 lines · David Lang
Quoted 6 lines · Matias Bjorling
Quoted 4 lines · Joe Thornber

Hi Matias,

This looks really interesting and I'd love to get involved. Do you have any recommendations for what hardware I should pick up?

Quoted 7 lines

Hi Joe,

The most easily available platform is OpenSSD
(http://www.openssd-project.org). It's a little old, but still very functional. When there's a good firmware implementation, I think it will be easier for the custom SSD vendor's to jump on board with their own firmware.

Is this something that would make sense to use for accessing the NAND flash that's being used on routers nowdays? Talking with the OpenWRT folks, they are having trouble supporting those devices because the flash may contain defects and squashfs doesn't work in such an environment. This appears to be the one remaining problem preventing a lot of new routers from working.

Quoted 2 lines

If this can work as a shim layer between the hardware and the filesystem for OpenWRT, you would gain a very large userbase rather quickly.

It's possible and would make sense. However, I'm not sure that its the best choice.

From what I can see, OpenWRT routers expose their flash through mtd. Couldn't UBIFS be a better choice for this, instead of squashfs?

Quoted 2 lines

David Lang

#15 lore raw
Quoted 24 lines · Matias Bjorling
Quoted 23 lines · David Lang
Quoted 6 lines · Matias Bjorling
Quoted 4 lines · Joe Thornber

Hi Matias,

This looks really interesting and I'd love to get involved. Do you have any recommendations for what hardware I should pick up?

Quoted 7 lines

Hi Joe,

The most easily available platform is OpenSSD
(http://www.openssd-project.org). It's a little old, but still very functional. When there's a good firmware implementation, I think it will be easier for the custom SSD vendor's to jump on board with their own firmware.

Is this something that would make sense to use for accessing the NAND flash that's being used on routers nowdays? Talking with the OpenWRT folks, they are having trouble supporting those devices because the flash may contain defects and squashfs doesn't work in such an environment. This appears to be the one remaining problem preventing a lot of new routers from working.

Quoted 8 lines
Quoted 2 lines

If this can work as a shim layer between the hardware and the filesystem for OpenWRT, you would gain a very large userbase rather quickly.

It's possible and would make sense. However, I'm not sure that its the best choice.

From what I can see, OpenWRT routers expose their flash through mtd. Couldn't UBIFS be a better choice for this, instead of squashfs?

Using ubiblock you can also run squashfs ontop of UBI. Hopefully it will be merged in 3.15.

Signature · 2 lines
Thanks,
//richard
#16 lore raw
In reply to Matias Bjørling
Quoted 26 lines · Matias Bjørling

Hi,

Users that have custom firmware SSDs, may choose to expose their flash directly. This allows the host to control logical to physical address mappings, garbage collection strategy, wear-leveling, and so on.

This is beneficial when you either want to strip the cost of a costly controller or want detailed control over an SSD. Such as implementing key-value stores, object-stored, atomic I/Os, etc.

LightNVM implements the host-side core. It supports two modes. Users that doesn't have hardware available and want to emulate an SSD, and users with a physical SSD, that has a LightNVM compatible firmware.

The behavior of the core can be exposed through the various components that make up an FTL. Thus, it is not single implementation, but instead possible to mix the best algorithms for the user-space application workloads.

Currently, LightNVM implements a page-based FTL, cost-based GC and simple wear-leveling. Additionally, it allows simulation of flash timings when hardware isn't available. There's work on getting it to the OpenSSD platform with a custom firmware and getting it stable for broad use.

There is still much work to do. I'm looking for feedback on the approach, dm integration, and more. Any feedback is greatly appreciated.

Quoted 8 lines

A presentation was given at the recent Non-Volatile Memory Workshop (NVMW) workshop. Slides are available at: http://bjorling.me/NVMW2014-LightNVM.pdf

Major todo's:
* Patch has TODO and FIXME in places that needs to be cleaned.
* LightNVM compatible firmware for the OpenSSD platform and integration.
* Performance regressions during GC.
* Durability during power failure.

This sounds very interesting!

Is there also a way to expose the flash directly as MTD device? I'm thinking of UBI. Maybe both projects can benefit from each others.

Signature · 6 lines
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#17 lore raw
Quoted 1 line · Richard Weinberger

On Fri, Mar 21, 2014 at 7:32 AM, Matias Bjørling <[email protected]> wrote:

<snip>

Quoted 6 lines

This sounds very interesting!

Is there also a way to expose the flash directly as MTD device? I'm thinking of UBI. Maybe both projects can benefit from each others.

Hi Richard,

Yes, mostly. It's different from MTD, in that all flash is exposed through a linear address space, from which the FTL is layered on top. This allows the device to still do some work, such as ECC, RAID, etc. if it choose to, but also allows the host to do it.

I think UBI could be a good choice for maintaining each of the flash "partitions" as there's a lot of small subtle details that have to be taken care of.

- Matias