linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper
@ 2017-11-29 18:59 Dan Williams
  2017-11-29 19:00 ` [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER Dan Williams
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Williams @ 2017-11-29 18:59 UTC (permalink / raw)
  To: snitzer
  Cc: kbuild test robot, linux-nvdimm, Michael Ellerman,
	Heiko Carstens, Bart Van Assche, dm-devel, Paul Mackerras,
	Gerald Schaefer, Benjamin Herrenschmidt, Martin Schwidefsky,
	Alasdair Kergon

Changes since v5 [1]:
* Make DAX_DRIVER select DAX to simplify the Kconfig dependencies
  (Michael)
* Rebase on 4.15-rc1 and add new IS_ENABLED(CONFIG_DAX_DRIVER) checks in
  drivers/md/dm-log-writes.c.

[1]: https://lists.01.org/pipermail/linux-nvdimm/2017-September/012569.html

---

Hi Mike,

Bart points out that the DAX core is unconditionally enabled if
device-mapper is enabled. Add some config machinery and some
stub/static-inline routines to allow dax infrastructure to be deleted
from device-mapper at compile time.

---

Dan Williams (2):
      dax: introduce CONFIG_DAX_DRIVER
      dm: allow device-mapper to operate without dax support


 arch/powerpc/platforms/Kconfig |    2 -
 drivers/dax/Kconfig            |    5 ++
 drivers/md/Kconfig             |    1 
 drivers/md/dm-linear.c         |    6 +++
 drivers/md/dm-log-writes.c     |   95 +++++++++++++++++++++-------------------
 drivers/md/dm-stripe.c         |    6 +++
 drivers/md/dm.c                |   10 +++-
 drivers/nvdimm/Kconfig         |    2 -
 drivers/s390/block/Kconfig     |    2 -
 include/linux/dax.h            |   30 ++++++++++---
 10 files changed, 99 insertions(+), 60 deletions(-)
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER
  2017-11-29 18:59 [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Dan Williams
@ 2017-11-29 19:00 ` Dan Williams
  2018-01-08 16:07   ` Mike Snitzer
  2017-11-29 19:00 ` [PATCH v6 2/2] dm: allow device-mapper to operate without dax support Dan Williams
  2018-01-04 18:12 ` [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Mike Snitzer
  2 siblings, 1 reply; 8+ messages in thread
From: Dan Williams @ 2017-11-29 19:00 UTC (permalink / raw)
  To: snitzer
  Cc: linux-nvdimm, Michael Ellerman, Heiko Carstens, Bart Van Assche,
	dm-devel, Paul Mackerras, Benjamin Herrenschmidt,
	Martin Schwidefsky, Gerald Schaefer

In support of allowing device-mapper to compile out idle/dead code when
there are no dax providers in the system, introduce the DAX_DRIVER
symbol. This is selected by all leaf drivers that device-mapper might be
layered on top. This allows device-mapper to conditionally 'select DAX'
only when a provider is present.

Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 arch/powerpc/platforms/Kconfig |    2 +-
 drivers/dax/Kconfig            |    5 ++++-
 drivers/nvdimm/Kconfig         |    2 +-
 drivers/s390/block/Kconfig     |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 5a96a2763e4a..1c14b943d9ff 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -296,7 +296,7 @@ config CPM2
 config AXON_RAM
 	tristate "Axon DDR2 memory device driver"
 	depends on PPC_IBM_CELL_BLADE && BLOCK
-	select DAX
+	select DAX_DRIVER
 	default m
 	help
 	  It registers one block device per Axon's DDR2 memory bank found
diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index b79aa8f7a497..e0700bf4893a 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -1,3 +1,7 @@
+config DAX_DRIVER
+	select DAX
+	bool
+
 menuconfig DAX
 	tristate "DAX: direct access to differentiated memory"
 	select SRCU
@@ -16,7 +20,6 @@ config DEV_DAX
 	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
 	  restrictions that make the mapping behavior deterministic.
 
-
 config DEV_DAX_PMEM
 	tristate "PMEM DAX: direct access to persistent memory"
 	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index a65f2e1d9f53..40cbdb16e23e 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -20,7 +20,7 @@ if LIBNVDIMM
 config BLK_DEV_PMEM
 	tristate "PMEM: Persistent memory block device support"
 	default LIBNVDIMM
-	select DAX
+	select DAX_DRIVER
 	select ND_BTT if BTT
 	select ND_PFN if NVDIMM_PFN
 	help
diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig
index 31f014b57bfc..5c4d6f8ff0e5 100644
--- a/drivers/s390/block/Kconfig
+++ b/drivers/s390/block/Kconfig
@@ -14,7 +14,7 @@ config BLK_DEV_XPRAM
 
 config DCSSBLK
 	def_tristate m
-	select DAX
+	select DAX_DRIVER
 	prompt "DCSSBLK support"
 	depends on S390 && BLOCK
 	help

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* [PATCH v6 2/2] dm: allow device-mapper to operate without dax support
  2017-11-29 18:59 [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Dan Williams
  2017-11-29 19:00 ` [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER Dan Williams
@ 2017-11-29 19:00 ` Dan Williams
  2018-01-08 16:08   ` Mike Snitzer
  2018-01-04 18:12 ` [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Mike Snitzer
  2 siblings, 1 reply; 8+ messages in thread
From: Dan Williams @ 2017-11-29 19:00 UTC (permalink / raw)
  To: snitzer
  Cc: Bart Van Assche, dm-devel, kbuild test robot, Alasdair Kergon,
	linux-nvdimm

Change device-mapper's DAX dependency to require the presence of at
least one DAX_DRIVER. This allows device-mapper to be built without
bringing the DAX core along which is especially wasteful when there are
no DAX drivers, like BLK_DEV_PMEM, configured.

Cc: Alasdair Kergon <agk@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/md/Kconfig         |    1 
 drivers/md/dm-linear.c     |    6 +++
 drivers/md/dm-log-writes.c |   95 +++++++++++++++++++++++---------------------
 drivers/md/dm-stripe.c     |    6 +++
 drivers/md/dm.c            |   10 +++--
 include/linux/dax.h        |   30 +++++++++++---
 6 files changed, 92 insertions(+), 56 deletions(-)

diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 83b9362be09c..b843292a605e 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -201,7 +201,6 @@ config BLK_DEV_DM_BUILTIN
 config BLK_DEV_DM
 	tristate "Device mapper support"
 	select BLK_DEV_DM_BUILTIN
-	select DAX
 	---help---
 	  Device-mapper is a low level volume manager.  It works by allowing
 	  people to specify mappings for ranges of logical sectors.  Various
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index d5f8eff7c11d..89443e0ededa 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -154,6 +154,7 @@ static int linear_iterate_devices(struct dm_target *ti,
 	return fn(ti, lc->dev, lc->start, ti->len, data);
 }
 
+#if IS_ENABLED(CONFIG_DAX_DRIVER)
 static long linear_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
 		long nr_pages, void **kaddr, pfn_t *pfn)
 {
@@ -184,6 +185,11 @@ static size_t linear_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff,
 	return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i);
 }
 
+#else
+#define linear_dax_direct_access NULL
+#define linear_dax_copy_from_iter NULL
+#endif
+
 static struct target_type linear_target = {
 	.name   = "linear",
 	.version = {1, 4, 0},
diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
index 189badbeddaf..63c7c3999458 100644
--- a/drivers/md/dm-log-writes.c
+++ b/drivers/md/dm-log-writes.c
@@ -610,51 +610,6 @@ static int log_mark(struct log_writes_c *lc, char *data)
 	return 0;
 }
 
-static int log_dax(struct log_writes_c *lc, sector_t sector, size_t bytes,
-		   struct iov_iter *i)
-{
-	struct pending_block *block;
-
-	if (!bytes)
-		return 0;
-
-	block = kzalloc(sizeof(struct pending_block), GFP_KERNEL);
-	if (!block) {
-		DMERR("Error allocating dax pending block");
-		return -ENOMEM;
-	}
-
-	block->data = kzalloc(bytes, GFP_KERNEL);
-	if (!block->data) {
-		DMERR("Error allocating dax data space");
-		kfree(block);
-		return -ENOMEM;
-	}
-
-	/* write data provided via the iterator */
-	if (!copy_from_iter(block->data, bytes, i)) {
-		DMERR("Error copying dax data");
-		kfree(block->data);
-		kfree(block);
-		return -EIO;
-	}
-
-	/* rewind the iterator so that the block driver can use it */
-	iov_iter_revert(i, bytes);
-
-	block->datalen = bytes;
-	block->sector = bio_to_dev_sectors(lc, sector);
-	block->nr_sectors = ALIGN(bytes, lc->sectorsize) >> lc->sectorshift;
-
-	atomic_inc(&lc->pending_blocks);
-	spin_lock_irq(&lc->blocks_lock);
-	list_add_tail(&block->list, &lc->unflushed_blocks);
-	spin_unlock_irq(&lc->blocks_lock);
-	wake_up_process(lc->log_kthread);
-
-	return 0;
-}
-
 static void log_writes_dtr(struct dm_target *ti)
 {
 	struct log_writes_c *lc = ti->private;
@@ -920,6 +875,52 @@ static void log_writes_io_hints(struct dm_target *ti, struct queue_limits *limit
 	limits->io_min = limits->physical_block_size;
 }
 
+#if IS_ENABLED(CONFIG_DAX_DRIVER)
+static int log_dax(struct log_writes_c *lc, sector_t sector, size_t bytes,
+		   struct iov_iter *i)
+{
+	struct pending_block *block;
+
+	if (!bytes)
+		return 0;
+
+	block = kzalloc(sizeof(struct pending_block), GFP_KERNEL);
+	if (!block) {
+		DMERR("Error allocating dax pending block");
+		return -ENOMEM;
+	}
+
+	block->data = kzalloc(bytes, GFP_KERNEL);
+	if (!block->data) {
+		DMERR("Error allocating dax data space");
+		kfree(block);
+		return -ENOMEM;
+	}
+
+	/* write data provided via the iterator */
+	if (!copy_from_iter(block->data, bytes, i)) {
+		DMERR("Error copying dax data");
+		kfree(block->data);
+		kfree(block);
+		return -EIO;
+	}
+
+	/* rewind the iterator so that the block driver can use it */
+	iov_iter_revert(i, bytes);
+
+	block->datalen = bytes;
+	block->sector = bio_to_dev_sectors(lc, sector);
+	block->nr_sectors = ALIGN(bytes, lc->sectorsize) >> lc->sectorshift;
+
+	atomic_inc(&lc->pending_blocks);
+	spin_lock_irq(&lc->blocks_lock);
+	list_add_tail(&block->list, &lc->unflushed_blocks);
+	spin_unlock_irq(&lc->blocks_lock);
+	wake_up_process(lc->log_kthread);
+
+	return 0;
+}
+
 static long log_writes_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
 					 long nr_pages, void **kaddr, pfn_t *pfn)
 {
@@ -956,6 +957,10 @@ static size_t log_writes_dax_copy_from_iter(struct dm_target *ti,
 dax_copy:
 	return dax_copy_from_iter(lc->dev->dax_dev, pgoff, addr, bytes, i);
 }
+#else
+#define log_writes_dax_direct_access NULL
+#define log_writes_dax_copy_from_iter NULL
+#endif
 
 static struct target_type log_writes_target = {
 	.name   = "log-writes",
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
index b5e892149c54..ac2e8ee9d586 100644
--- a/drivers/md/dm-stripe.c
+++ b/drivers/md/dm-stripe.c
@@ -311,6 +311,7 @@ static int stripe_map(struct dm_target *ti, struct bio *bio)
 	return DM_MAPIO_REMAPPED;
 }
 
+#if IS_ENABLED(CONFIG_DAX_DRIVER)
 static long stripe_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
 		long nr_pages, void **kaddr, pfn_t *pfn)
 {
@@ -351,6 +352,11 @@ static size_t stripe_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff,
 	return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i);
 }
 
+#else
+#define stripe_dax_direct_access NULL
+#define stripe_dax_copy_from_iter NULL
+#endif
+
 /*
  * Stripe status:
  *
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index de17b7193299..810582cfba18 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1682,7 +1682,7 @@ static void cleanup_mapped_device(struct mapped_device *md)
 static struct mapped_device *alloc_dev(int minor)
 {
 	int r, numa_node_id = dm_get_numa_node();
-	struct dax_device *dax_dev;
+	struct dax_device *dax_dev = NULL;
 	struct mapped_device *md;
 	void *old_md;
 
@@ -1748,9 +1748,11 @@ static struct mapped_device *alloc_dev(int minor)
 	md->disk->private_data = md;
 	sprintf(md->disk->disk_name, "dm-%d", minor);
 
-	dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops);
-	if (!dax_dev)
-		goto bad;
+	if (IS_ENABLED(CONFIG_DAX_DRIVER)) {
+		dax_dev = alloc_dax(md, md->disk->disk_name, &dm_dax_ops);
+		if (!dax_dev)
+			goto bad;
+	}
 	md->dax_dev = dax_dev;
 
 	add_disk(md->disk);
diff --git a/include/linux/dax.h b/include/linux/dax.h
index 5258346c558c..32af6439f8c2 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -26,16 +26,39 @@ extern struct attribute_group dax_attribute_group;
 
 #if IS_ENABLED(CONFIG_DAX)
 struct dax_device *dax_get_by_host(const char *host);
+struct dax_device *alloc_dax(void *private, const char *host,
+		const struct dax_operations *ops);
 void put_dax(struct dax_device *dax_dev);
+void kill_dax(struct dax_device *dax_dev);
+void dax_write_cache(struct dax_device *dax_dev, bool wc);
+bool dax_write_cache_enabled(struct dax_device *dax_dev);
 #else
 static inline struct dax_device *dax_get_by_host(const char *host)
 {
 	return NULL;
 }
-
+static inline struct dax_device *alloc_dax(void *private, const char *host,
+		const struct dax_operations *ops)
+{
+	/*
+	 * Callers should check IS_ENABLED(CONFIG_DAX) to know if this
+	 * NULL is an error or expected.
+	 */
+	return NULL;
+}
 static inline void put_dax(struct dax_device *dax_dev)
 {
 }
+static inline void kill_dax(struct dax_device *dax_dev)
+{
+}
+static inline void dax_write_cache(struct dax_device *dax_dev, bool wc)
+{
+}
+static inline bool dax_write_cache_enabled(struct dax_device *dax_dev)
+{
+	return false;
+}
 #endif
 
 int bdev_dax_pgoff(struct block_device *, sector_t, size_t, pgoff_t *pgoff);
@@ -80,18 +103,13 @@ static inline struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev)
 
 int dax_read_lock(void);
 void dax_read_unlock(int id);
-struct dax_device *alloc_dax(void *private, const char *host,
-		const struct dax_operations *ops);
 bool dax_alive(struct dax_device *dax_dev);
-void kill_dax(struct dax_device *dax_dev);
 void *dax_get_private(struct dax_device *dax_dev);
 long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages,
 		void **kaddr, pfn_t *pfn);
 size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
 		size_t bytes, struct iov_iter *i);
 void dax_flush(struct dax_device *dax_dev, void *addr, size_t size);
-void dax_write_cache(struct dax_device *dax_dev, bool wc);
-bool dax_write_cache_enabled(struct dax_device *dax_dev);
 
 ssize_t dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
 		const struct iomap_ops *ops);

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper
  2017-11-29 18:59 [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Dan Williams
  2017-11-29 19:00 ` [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER Dan Williams
  2017-11-29 19:00 ` [PATCH v6 2/2] dm: allow device-mapper to operate without dax support Dan Williams
@ 2018-01-04 18:12 ` Mike Snitzer
  2018-01-07 20:31   ` Dan Williams
  2 siblings, 1 reply; 8+ messages in thread
From: Mike Snitzer @ 2018-01-04 18:12 UTC (permalink / raw)
  To: Dan Williams
  Cc: kbuild test robot, linux-nvdimm, Michael Ellerman,
	Heiko Carstens, Martin Schwidefsky, dm-devel, Paul Mackerras,
	Alasdair Kergon, Benjamin Herrenschmidt, Bart Van Assche,
	Gerald Schaefer

On Wed, Nov 29 2017 at  1:59pm -0500,
Dan Williams <dan.j.williams@intel.com> wrote:

> Changes since v5 [1]:
> * Make DAX_DRIVER select DAX to simplify the Kconfig dependencies
>   (Michael)
> * Rebase on 4.15-rc1 and add new IS_ENABLED(CONFIG_DAX_DRIVER) checks in
>   drivers/md/dm-log-writes.c.
> 
> [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-September/012569.html
> 
> ---
> 
> Hi Mike,
> 
> Bart points out that the DAX core is unconditionally enabled if
> device-mapper is enabled. Add some config machinery and some
> stub/static-inline routines to allow dax infrastructure to be deleted
> from device-mapper at compile time.

Hey Dan,

Did you want me to pick this up for 4.16 or were you thinking of sending
the changes through a different tree?

I'm fine with picking these up so long as you don't expect the dax.h and
Kconfig changes to become a source of conflict come merge time.

Let me know, thanks!
Mike
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper
  2018-01-04 18:12 ` [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Mike Snitzer
@ 2018-01-07 20:31   ` Dan Williams
  2018-01-08 16:06     ` Mike Snitzer
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Williams @ 2018-01-07 20:31 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: kbuild test robot, linux-nvdimm, Michael Ellerman,
	Heiko Carstens, Bart Van Assche, device-mapper development,
	Paul Mackerras, Gerald Schaefer, Benjamin Herrenschmidt,
	Martin Schwidefsky, Alasdair Kergon

On Thu, Jan 4, 2018 at 10:12 AM, Mike Snitzer <snitzer@redhat.com> wrote:
> On Wed, Nov 29 2017 at  1:59pm -0500,
> Dan Williams <dan.j.williams@intel.com> wrote:
>
>> Changes since v5 [1]:
>> * Make DAX_DRIVER select DAX to simplify the Kconfig dependencies
>>   (Michael)
>> * Rebase on 4.15-rc1 and add new IS_ENABLED(CONFIG_DAX_DRIVER) checks in
>>   drivers/md/dm-log-writes.c.
>>
>> [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-September/012569.html
>>
>> ---
>>
>> Hi Mike,
>>
>> Bart points out that the DAX core is unconditionally enabled if
>> device-mapper is enabled. Add some config machinery and some
>> stub/static-inline routines to allow dax infrastructure to be deleted
>> from device-mapper at compile time.
>
> Hey Dan,
>
> Did you want me to pick this up for 4.16 or were you thinking of sending
> the changes through a different tree?
>
> I'm fine with picking these up so long as you don't expect the dax.h and
> Kconfig changes to become a source of conflict come merge time.

There might be some more collisions as we are going to kill the DAX
support in axonram and dcssblk. If I get your reviewed-by on these
I'll take them through the nvdimm tree.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper
  2018-01-07 20:31   ` Dan Williams
@ 2018-01-08 16:06     ` Mike Snitzer
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Snitzer @ 2018-01-08 16:06 UTC (permalink / raw)
  To: Dan Williams
  Cc: kbuild test robot, linux-nvdimm, Michael Ellerman,
	Heiko Carstens, Bart Van Assche, device-mapper development,
	Paul Mackerras, Gerald Schaefer, Benjamin Herrenschmidt,
	Martin Schwidefsky, Alasdair Kergon

On Sun, Jan 07 2018 at  3:31pm -0500,
Dan Williams <dan.j.williams@intel.com> wrote:

> On Thu, Jan 4, 2018 at 10:12 AM, Mike Snitzer <snitzer@redhat.com> wrote:
> > On Wed, Nov 29 2017 at  1:59pm -0500,
> > Dan Williams <dan.j.williams@intel.com> wrote:
> >
> >> Changes since v5 [1]:
> >> * Make DAX_DRIVER select DAX to simplify the Kconfig dependencies
> >>   (Michael)
> >> * Rebase on 4.15-rc1 and add new IS_ENABLED(CONFIG_DAX_DRIVER) checks in
> >>   drivers/md/dm-log-writes.c.
> >>
> >> [1]: https://lists.01.org/pipermail/linux-nvdimm/2017-September/012569.html
> >>
> >> ---
> >>
> >> Hi Mike,
> >>
> >> Bart points out that the DAX core is unconditionally enabled if
> >> device-mapper is enabled. Add some config machinery and some
> >> stub/static-inline routines to allow dax infrastructure to be deleted
> >> from device-mapper at compile time.
> >
> > Hey Dan,
> >
> > Did you want me to pick this up for 4.16 or were you thinking of sending
> > the changes through a different tree?
> >
> > I'm fine with picking these up so long as you don't expect the dax.h and
> > Kconfig changes to become a source of conflict come merge time.
> 
> There might be some more collisions as we are going to kill the DAX
> support in axonram and dcssblk. If I get your reviewed-by on these
> I'll take them through the nvdimm tree.

OK, I've dropped these and will respond with my Reviewed-by:s.

Thanks.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER
  2017-11-29 19:00 ` [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER Dan Williams
@ 2018-01-08 16:07   ` Mike Snitzer
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Snitzer @ 2018-01-08 16:07 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-nvdimm, Michael Ellerman, Heiko Carstens, Bart Van Assche,
	dm-devel, Paul Mackerras, Benjamin Herrenschmidt,
	Martin Schwidefsky, Gerald Schaefer

On Wed, Nov 29 2017 at  2:00pm -0500,
Dan Williams <dan.j.williams@intel.com> wrote:

> In support of allowing device-mapper to compile out idle/dead code when
> there are no dax providers in the system, introduce the DAX_DRIVER
> symbol. This is selected by all leaf drivers that device-mapper might be
> layered on top. This allows device-mapper to conditionally 'select DAX'
> only when a provider is present.
> 
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: Bart Van Assche <Bart.VanAssche@wdc.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Mike Snitzer <snitzer@redhat.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH v6 2/2] dm: allow device-mapper to operate without dax support
  2017-11-29 19:00 ` [PATCH v6 2/2] dm: allow device-mapper to operate without dax support Dan Williams
@ 2018-01-08 16:08   ` Mike Snitzer
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Snitzer @ 2018-01-08 16:08 UTC (permalink / raw)
  To: Dan Williams
  Cc: Bart Van Assche, dm-devel, kbuild test robot, Alasdair Kergon,
	linux-nvdimm

On Wed, Nov 29 2017 at  2:00pm -0500,
Dan Williams <dan.j.williams@intel.com> wrote:

> Change device-mapper's DAX dependency to require the presence of at
> least one DAX_DRIVER. This allows device-mapper to be built without
> bringing the DAX core along which is especially wasteful when there are
> no DAX drivers, like BLK_DEV_PMEM, configured.
> 
> Cc: Alasdair Kergon <agk@redhat.com>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Reported-by: Bart Van Assche <Bart.VanAssche@wdc.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Mike Snitzer <snitzer@redhat.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

end of thread, other threads:[~2018-01-08 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 18:59 [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Dan Williams
2017-11-29 19:00 ` [PATCH v6 1/2] dax: introduce CONFIG_DAX_DRIVER Dan Williams
2018-01-08 16:07   ` Mike Snitzer
2017-11-29 19:00 ` [PATCH v6 2/2] dm: allow device-mapper to operate without dax support Dan Williams
2018-01-08 16:08   ` Mike Snitzer
2018-01-04 18:12 ` [PATCH v6 0/2] dax, dm: stop requiring dax for device-mapper Mike Snitzer
2018-01-07 20:31   ` Dan Williams
2018-01-08 16:06     ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).