From: Huaisheng Ye
When uncommitted entry has been discarded, correct wc->uncommitted_block
for getting the exact number.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecach
From: Huaisheng Ye
The array bio_in_progress is only used with ssd mode. So skip
writecache_wait_for_ios in writecache_discard when pmem mode.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm
From: Huaisheng Ye
When wc_entry has been removed from wbl->list in writeback, it will
be not used again except waiting to be set free in writecache_free_entry.
That is a little of annoying, it has to reinitialize lru of wc_entry
in endio before calling writecache_free_entry.
Us
From: Huaisheng Ye
The array bio_in_progress[2] only have chance to be increased and
decreased with ssd mode. For pmem mode, they are not involved at all.
So skip writecache_wait_for_ios in writecache_flush for pmem.
Suggested-by: Doris Yu
Signed-off-by: Huaisheng Ye
---
drivers/md/dm
From: Huaisheng Ye
The stucture member pointer page in writeback_struct never has been
used actually. Remove it.
Signed-off-by: Huaisheng Ye
Acked-by: Mikulas Patocka
---
drivers/md/dm-writecache.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm
From: Huaisheng Ye
During the process of writeback, the blocks, which have been placed in wbl.list
for writeback soon, are partially ordered for the contiguous ones.
When writeback_all has been set, for most cases, also by default, there will be
a lot of blocks in pmem need to writeback
From: Huaisheng Ye
In function writecache_writeback, entries g and f has same original
sector only happens at entry f has been committed, but entry g has
NOT yet.
The probability of this happening is very low in the following
256 blocks at most of entry e.
Signed-off-by: Huaisheng Ye
Acked
From: Huaisheng Ye
Patch 1 and 2 are used for cleaning the code, and they have got
Acked-by from Mikulas.
Patch 3 is used for performance optimization when writeback_all,
which could save more than half of time.
Of course, if the blocks in writecache are more uncontinuous and
disordered
From: Huaisheng Ye
In function writecache_writeback, entries g and f has same original
sector only happens at entry f has been committed, but entry g has
NOT yet.
The probability of this happening is very low in the following
256 blocks at most of entry e, so add unlikely for the result
From: Huaisheng Ye
The stucture member pointer page in writeback_struct never has been
used actually. Remove it.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 1cb137f
From: Huaisheng Ye
Only when entry has been found, that would only be necessary to check the
lowest or highest seq-count.
Add local variable "found" in writecache_find_entry, if no entry has been
found, it is meaningless that having a useless rb_prev or rb_next.
This patch is no
From: Huaisheng Ye
In functions writecache_discard() and writecache_find_entry() there is a
high probablity that the pointer of structure rb_node won't equal NULL.
Add unlikely for the pointer node NULL.
Signed-off-by: Huaisheng Ye
Acked-by: Mikulas Patocka
Signed-off-by: Mike Snitzer
From: Huaisheng Ye
This patch set is a collection about some patches for dm-writecache.
Patches 0001-0003 have got Acked-by or Signed-off-by from the author and
dm maintainer.
Patches 0004 is still under review. Any comments and suggestion are welcome.
Huaisheng Ye (4):
dm writecache
From: Huaisheng Ye
bio is already available so there is no need to access it in terms of
the wb pointer.
Signed-off-by: Huaisheng Ye
Signed-off-by: Mike Snitzer
---
drivers/md/dm-writecache.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm
From: Huaisheng Ye
Only when entry has been found, that would only be necessary to check the
lowest or highest seq-count.
Add local variable "found" in writecache_find_entry, if no entry has been
found, it is meaningless that having a useless rb_prev or rb_next.
Signed-off-by: Hu
From: Huaisheng Ye
The structure member page_offset in writeback_struct never has been
used actually. Remove it.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index
From: Huaisheng Ye
In functions writecache_discard and writecache_find_entry, there is
high probablity that the pointer of structure rb_node doesn't equal
to NULL. Add unlikly for the pointer node.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 4 ++--
1 file changed, 2
From: Huaisheng Ye
In function __writecache_writeback_pmem, the pointer bio has been
already there, it doesn't need to seek bio's address from pointer wb.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
From: Huaisheng Ye
The workqueue's name should be "writecache-writeback" instead of
"writecache-writeabck".
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-writecache.c b/driver
From: Huaisheng Ye
When use persistent memory as cache data device, sometimes
the super block of pmem has messy data stored in it. That would
have risk to lead fn ctr failed to work due to invalid magic or
version.
Here we expand pmem_reinit to optional parameters in order to solve
this issue
From: Huaisheng Ye
seq_count is important for flush operations, output it within status
for debugging and analyzing code behavior.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-writecache.c b
From: Huaisheng Ye
writecache_flush_region doesn't use size to calculate flush region.
That uses _set_bits to mark the region in dirty_bitmap directly.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
From: Huaisheng Ye
writecache_flush_region only works when SSD mode.
If wc->pmem_mode sets, writecache_flush_region doesn't need to be called in
writecache_flush_entry.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers
From: Huaisheng Ye
Add intro and usage guide for reinit.
Signed-off-by: Huaisheng Ye
---
Documentation/device-mapper/writecache.txt | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/device-mapper/writecache.txt
b/Documentation/device-mapper/writecache.txt
index 01532b3
From: Huaisheng Ye
This patch set could be used for dm-writecache when use persistent
memory as cache data device.
Patch 1 and 2 go towards removing unused parameter and codes which
actually doesn't really work.
Patch 3 and 4 are targeted at solving problem fn ctr failed to work
due to invalid
From: Huaisheng Ye
When use persistent memory as cache data device, sometimes
the super block of pmem has messy data stored in it. That would
have risk to lead fn ctr failed to work due to invalid magic or
version.
Here we expand pmem_reinit to optional parameters in order to solve
this issue
From: Huaisheng Ye
Add intro and usage guide for reinit.
Signed-off-by: Huaisheng Ye
---
Documentation/device-mapper/writecache.txt | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/device-mapper/writecache.txt
b/Documentation/device-mapper/writecache.txt
index 01532b3
From: Huaisheng Ye
writecache_flush_region only works when SSD mode.
If wc->pmem_mode sets, writecache_flush_region doesn't need to be called in
writecache_flush_entry.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers
From: Huaisheng Ye
This patch set could be used for dm-writecache when use persistent
memory as cache data device.
Patch 1 and 2 go towards removing unused parameter and codes which
actually doesn't really work.
Patch 3 and 4 are targeted at solving problem fn ctr failed to work
due to invalid
From: Huaisheng Ye
writecache_flush_region doesn't use size to calculate flush region.
That uses _set_bits to mark the region in dirty_bitmap directly.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
From: Huaisheng Ye
writecache_flush_region doesn't use size to calculate flush region.
That uses _set_bits to mark the region in dirty_bitmap directly.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
From: Huaisheng Ye
writecache_flush_region only works when SSD mode.
If wc->pmem_mode sets, writecache_flush_region doesn't need to be called in
writecache_flush_entry.
Signed-off-by: Huaisheng Ye
---
drivers/md/dm-writecache.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers
lkml/2018/11/21/281
In the beginning, I haven't considered the situation of mmap write faults.
>From Dan's reply and this email thread, now I have a more clear understanding.
The question is that, even the virtual dm block device has been informed that
the mmap may have write operations through PROT
From: Huaisheng Ye
Reconstruct origin_dax_direct_access and expand functions
origin_dax_copy_to/from_iter for DAX operations of dm-snapshot.
Here is the call trace of origin_dax_copy_to_iter,
origin_dax_copy_to_iter will callin dm-linear (-real) for further
dax_operation.
[518597.924019] Call
From: Huaisheng Ye
Reconstruct origin_dax_direct_access and expand functions
origin_dax_copy_to/from_iter for DAX operations of dm-snapshot.
Here is the call trace of origin_dax_copy_to_iter,
origin_dax_copy_to_iter will callin dm-linear (-real) for further
dax_operation.
[518597.924019] Call
From: Huaisheng Ye
If use DAX way to mount the origin device of dm_snapshot, when
merging back snapshot to origin, system call table_load during the
construction of snapshot-merge will try to detect new dm_table's type
equals to the existed md's type or not.
The existed type equals
From: Huaisheng Ye
Changes
v1->v2:
Add NULL funtions for origin_dax_direct_access and
origin_dax_copy_from/to_iter in order to avoid building
error when CONFIG_DAX_DRIVER has NOT been enabled.
[v1]: https://lkml.org/lkml/2018/11/20/759
This series patches are u
From: Huaisheng Ye
Sometimes dm_swap_table couldn't be used in time.
For example, during the origin construction of
dm-snapshot, the sys_ioctl table_load will try to
detect the lower device origin-real whether support
direct access or not. But origin-real md's struct
dm-table pointer has
From: Huaisheng Ye
Sometimes dm_swap_table couldn't be used in time.
For example, during the origin construction of
dm-snapshot, the sys_ioctl table_load will try to
detect the lower device origin-real whether support
direct access or not. But origin-real md's struct
dm-table pointer has
From: Huaisheng Ye
This series patches are used to realize the dax_operations for dm-snapshot
with persistent memory device.
Here are the steps about how to verify the function.
1. Configure the persistent memory to fs-dax mode and create namespace with
ndctl;
2. find them in /dev;
# ndctl
From: Huaisheng Ye
If use DAX way to mount the origin device of dm_snapshot, when
merging back snapshot to origin, system call table_load during the
construction of snapshot-merge will try to detect new dm_table's type
equals to the existed md's type or not.
The existed type equals
From: Huaisheng Ye
Function __bdev_dax_supported doesn't need to get local pointer kaddr
from direct_access. Using NULL instead of having to pass in a useless
local pointer that caller then just throw away.
Signed-off-by: Huaisheng Ye
Reviewed-by: Ross Zwisler
---
drivers/dax/super.c | 3
From: Huaisheng Ye
Some functions within fs/dax don't need to get local pointer kaddr
or variable pfn from direct_access. Using NULL instead of having to
pass in useless pointer or variable that caller then just throw away.
Signed-off-by: Huaisheng Ye
Reviewed-by: Ross Zwisler
---
fs/dax.c
From: Huaisheng Ye
Changes since v2 [2]:
* Collect Martin and Mike's acks for dcssblk and dm-writecache;
* Rebase the series of patch to v4.18-rc7.
Changes since v1 [1]:
* Involve the previous patches for pfn can be NULL.
* Reword the patch descriptions according to Christian's comment
From: Huaisheng Ye
Function persistent_memory_claim doesn't need to get local pointer
dummy_addr from direct_access. Using NULL instead of having to pass
in a useless local pointer that caller then just throw away.
Suggested-by: Ross Zwisler
Signed-off-by: Huaisheng Ye
Reviewed-by: Ross
From: Huaisheng Ye
dcssblk_direct_access() needs to check the validity of pointers kaddr
and pfn for NULL assignment. If anyone equals to NULL, it doesn't need
to calculate the value.
If either of them is equal to NULL, that is to say callers may
have no need for kaddr or pfn, so this patch
From: Huaisheng Ye
pmem_direct_access() needs to check the validity of pointers kaddr
and pfn for NULL assignment. If anyone equals to NULL, it doesn't need
to calculate the value.
If pointer equals to NULL, that is to say callers may have no need for
kaddr or pfn, so this patch is prepared
From: Huaisheng Ye
The mock / test version of pmem_direct_access() needs to check the
validity of pointers kaddr and pfn for NULL assignment. If anyone
equals to NULL, it doesn't need to calculate the value.
If pointer equals to NULL, that is to say callers may have no need for
kaddr or pfn, so
From: Huaisheng Ye
Function persistent_memory_claim doesn't need to get local pointer
dummy_addr from direct_access. Using NULL instead of having to pass
in a useless local pointer that caller then just throw away.
Suggested-by: Ross Zwisler
Signed-off-by: Huaisheng Ye
---
drivers/md/dm
From: Huaisheng Ye
Function __bdev_dax_supported doesn't need to get local pointer kaddr
from direct_access. Using NULL instead of having to pass in a useless
local pointer that caller then just throw away.
Signed-off-by: Huaisheng Ye
---
drivers/dax/super.c | 3 +--
1 file changed, 1
From: Huaisheng Ye
Changes since v1 [1]:
* Involve the previous patches for pfn can be NULL.
* Reword the patch descriptions according to Christian's comment.
* According to Ross's suggestion, replace local pointer dummy_addr
with NULL within md/dm-writecache for direct_access.
[1]: https
From: Huaisheng Ye
pmem_direct_access() needs to check the validity of pointers kaddr
and pfn for NULL assignment. If anyone equals to NULL, it doesn't need
to calculate the value.
If pointer equals to NULL, that is to say callers may have no need for
kaddr or pfn, so this patch is prepared
From: Huaisheng Ye
dcssblk_direct_access() needs to check the validity of pointers kaddr
and pfn for NULL assignment. If anyone equals to NULL, it doesn't need
to calculate the value.
If either of them is equal to NULL, that is to say callers may
have no need for kaddr or pfn, so this patch
From: Huaisheng Ye
Some functions within fs/dax don't need to get local pointer kaddr
or variable pfn from direct_access. Using NULL instead of having to
pass in useless pointer or variable that caller then just throw away.
Signed-off-by: Huaisheng Ye
---
fs/dax.c | 13 -
1 file
From: Huaisheng Ye
The mock / test version of pmem_direct_access() needs to check the
validity of pointers kaddr and pfn for NULL assignment. If anyone
equals to NULL, it doesn't need to calculate the value.
If pointer equals to NULL, that is to say callers may have no need for
kaddr or pfn, so
55 matches
Mail list logo