Re: [PATCH] lightnvm: calculate device values correctly

2015-11-22 Thread Wenwei Tao
OK, I see. Thanks for the explanation. 2015-11-23 2:34 GMT+08:00 Matias <m...@lightnvm.io>: > On 11/22/2015 02:51 PM, Wenwei Tao wrote: >> >> In the original calculation, the relationships among >> block, plane and lun was confusing, refine

Re: [PATCH] lightnvm: calculate device values correctly

2015-11-22 Thread Wenwei Tao
I'm a new guy to flash, if I'm wrong about this patch, please correct me. Thanks. 2015-11-22 21:51 GMT+08:00 Wenwei Tao <ww.tao0...@gmail.com>: > In the original calculation, the relationships among > block, plane and lun was confusing, refine it on the >

[PATCH] lightnvm: calculate device values correctly

2015-11-22 Thread Wenwei Tao
In the original calculation, the relationships among block, plane and lun was confusing, refine it on the basis of Open-channelSSDInterfaceSpecification. Signed-off-by: Wenwei Tao <ww.tao0...@gmail.com> --- drivers/lightnvm/core.c | 9 - 1 file changed, 4 insertions(+), 5 del

[PATCH] lightnvm: do device max sectors boundary check first

2015-11-22 Thread Wenwei Tao
do device max_phys_sect boundary check first, otherwise we will allocate dma_pools for devices whose max sectors are beyond lightnvm support and register them. Signed-off-by: Wenwei Tao <ww.tao0...@gmail.com> --- drivers/lightnvm/core.c | 8 +--- 1 file changed, 5 insertions(+), 3 del

[PATCH] nvme: lightnvm: use nvme admin queue

2015-11-19 Thread Wenwei Tao
According to Open-ChannelSSDInterfaceSpecification 0.1, NVMe-NVM admin commands use vendor specific admin opcodes of NVMe, so use the NVMe admin queue to dispatch these commands Signed-off-by: Wenwei Tao --- drivers/nvme/host/lightnvm.c | 13 +++-- 1 file changed, 7 insertions(+), 6

[PATCH] lightnvm: fix wrong return value and remove nvme_free(dev) in nvm_init()

2015-11-19 Thread Wenwei Tao
The return value should be non-zero under error conditions. Remove nvme_free(dev) to avoid free dev more than once. Signed-off-by: Wenwei Tao --- drivers/lightnvm/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c

[PATCH] lightnvm: fix wrong return value and remove nvme_free(dev) in nvm_init()

2015-11-19 Thread Wenwei Tao
The return value should be non-zero under error conditions. Remove nvme_free(dev) to avoid free dev more than once. Signed-off-by: Wenwei Tao <ww.tao0...@gmail.com> --- drivers/lightnvm/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lightnvm/co

[PATCH] nvme: lightnvm: use nvme admin queue

2015-11-19 Thread Wenwei Tao
According to Open-ChannelSSDInterfaceSpecification 0.1, NVMe-NVM admin commands use vendor specific admin opcodes of NVMe, so use the NVMe admin queue to dispatch these commands Signed-off-by: Wenwei Tao <ww.tao0...@gmail.com> --- drivers/nvme/host/lightnvm.c | 13 +++-- 1 file c

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread wenwei tao
goto flush_all; } ... } Thank you Wenwei 2015-07-07 5:34 GMT+08:00 Scott Wood : > On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: >> Hi Scott >> >> Thank you for your comments. >> >> Kernel already has that function: is_vm_hugetlb_page() , but the >&g

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-07 Thread wenwei tao
flush_all; } ... } Thank you Wenwei 2015-07-07 5:34 GMT+08:00 Scott Wood scottw...@freescale.com: On Fri, 2015-07-03 at 16:47 +0800, wenwei tao wrote: Hi Scott Thank you for your comments. Kernel already has that function: is_vm_hugetlb_page() , but the original code didn't use it, in order

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-03 Thread wenwei tao
& (VM_LOCKED|VM_PFNMAP) || (vma->vm_flags & (VM_HUGETLB|VM_MERGEABLE)) == VM_HUGETLB". I am a newbie to Linux kernel, do you have any good suggestions on this situation? Thank you Wenwei 2015-07-03 5:49 GMT+08:00 Scott Wood : > On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: >

Re: [RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-07-03 Thread wenwei tao
|VM_MERGEABLE)) == VM_HUGETLB. I am a newbie to Linux kernel, do you have any good suggestions on this situation? Thank you Wenwei 2015-07-03 5:49 GMT+08:00 Scott Wood scottw...@freescale.com: On Wed, 2015-06-10 at 14:27 +0800, Wenwei Tao wrote: Hugetlb VMAs are not mergeable, that means a VMA couldn't

[RFC PATCH 3/6] perf: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao --- kernel/events/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index f04daab..6313bdd 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5624,7 +5624,7 @@ static void

[RFC PATCH 2/6] mm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao --- include/linux/hugetlb_inline.h |2 +- include/linux/mempolicy.h |2 +- mm/gup.c |6 -- mm/huge_memory.c | 17 - mm/madvise.c |6 -- mm/memory.c

[RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao --- arch/powerpc/kvm/e500_mmu_host.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index cc536d4..d76f518 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc

[RFC PATCH 5/6] x86/mm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao --- arch/x86/mm/tlb.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 3250f23..0247916 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -195,7 +195,8 @@ void flush_tlb_mm_range(struct

[RFC PATCH 4/6] fs/binfmt_elf.c: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao --- fs/binfmt_elf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 995986b..f529c8e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1242,7 +1242,7 @@ static unsigned long vma_dump_size(struct

[RFC PATCH 1/6] mm: add defer mechanism to ksm to make it more suitable

2015-06-10 Thread Wenwei Tao
to KSM. This defer mechanism can automatic lower the scan frequency in the above case. Signed-off-by: Wenwei Tao --- mm/ksm.c | 230 ++ 1 file changed, 203 insertions(+), 27 deletions(-) diff --git a/mm/ksm.c b/mm/ksm.c index 4162dce

[RFC PATCH 0/6] add defer mechanism to ksm to make it more suitable for Android devices

2015-06-10 Thread Wenwei Tao
nned twice, we use VM_HUGETLB to indicate new mergeable VMAs since hugetlb vm are not supported by KSM. Wenwei Tao (6): mm: add defer mechanism to ksm to make it more suitable mm: change the condition of identifying hugetlb vm perf: change the condition of identifying hugetlb vm fs/binfmt_elf.c:

[RFC PATCH 1/6] mm: add defer mechanism to ksm to make it more suitable

2015-06-10 Thread Wenwei Tao
to KSM. This defer mechanism can automatic lower the scan frequency in the above case. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- mm/ksm.c | 230 ++ 1 file changed, 203 insertions(+), 27 deletions(-) diff --git a/mm/ksm.c b/mm

[RFC PATCH 0/6] add defer mechanism to ksm to make it more suitable for Android devices

2015-06-10 Thread Wenwei Tao
since hugetlb vm are not supported by KSM. Wenwei Tao (6): mm: add defer mechanism to ksm to make it more suitable mm: change the condition of identifying hugetlb vm perf: change the condition of identifying hugetlb vm fs/binfmt_elf.c: change the condition of identifying hugetlb vm x86/mm

[RFC PATCH 4/6] fs/binfmt_elf.c: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- fs/binfmt_elf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 995986b..f529c8e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1242,7 +1242,7 @@ static unsigned

[RFC PATCH 6/6] powerpc/kvm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- arch/powerpc/kvm/e500_mmu_host.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index cc536d4..d76f518 100644 --- a/arch/powerpc/kvm

[RFC PATCH 5/6] x86/mm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- arch/x86/mm/tlb.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 3250f23..0247916 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -195,7 +195,8 @@ void

[RFC PATCH 2/6] mm: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- include/linux/hugetlb_inline.h |2 +- include/linux/mempolicy.h |2 +- mm/gup.c |6 -- mm/huge_memory.c | 17 - mm/madvise.c |6 -- mm

[RFC PATCH 3/6] perf: change the condition of identifying hugetlb vm

2015-06-10 Thread Wenwei Tao
time. Signed-off-by: Wenwei Tao wenweitaowen...@gmail.com --- kernel/events/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index f04daab..6313bdd 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5624,7

<    1   2   3