mm/vmalloc: don't set area->caller twice
Subsystems (2)
PATCH v2 1/3 mm/vmalloc: don't set area->caller twice
Changelog:
* rebase against mmotm tree
The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node.
--- mm/vmalloc.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/vmalloc.c +0 -1
@@ -1566,7 +1566,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, pages =kmalloc_node (array_size, nested_gfp, node); } area->pages = pages; - area->caller = caller;if (!area->pages) {remove_vm_area (area->addr);kfree (area);
Signature · 1 line
1.7.5.4
PATCH v2 2/3 mm/vmalloc: don't warning vmalloc allocation failure twice
Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure.
--- mm/vmalloc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
mm/vmalloc.c +1 -1
@@ -1635,7 +1635,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, addr =__vmalloc_area_node (area, gfp_mask, prot, node, caller);if (!addr) - goto fail; +return NULL ;/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED
Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 2/3] mm/vmalloc: don't warning vmalloc allocation failure twice
Quoted 4 lines · Wanpeng Li
Don't warning twice in
__vmalloc_area_nodeand__vmalloc_node_rangeif__vmalloc_area_nodeallocation failure.Signed-off-by Wanpeng Li <[email protected]>
OK, I missed the warning in __vmalloc_area_node(), so you are right. You can just revert the commit 46c001a2753f47ffa621131baa3409e636515347.
Quoted 18 lines
--- mm/vmalloc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)mm/vmalloc.c +1
-1@@ -1635,7 +1635,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, addr =__vmalloc_area_node (area, gfp_mask, prot, node, caller);if (!addr) - goto fail; +return NULL ;/* * In this function, newly allocated vm_struct has VM_UNINITIALIZED
Signature · 8 lines
Thanks. Zhang Yanfei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH v2 3/3 mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info
In reply to Wanpeng LiThe VM_UNINITIALIZED/VM_UNLIST flag introduced by commit f5252e00(mm: avoid null pointer access in vm_struct via /proc/vmallocinfo) is used to avoid accessing the pages field with unallocated page when show_numa_info() is called. This patch move the check just before show_numa_info in order that some messages still can be dumped via /proc/vmallocinfo.
--- mm/vmalloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
mm/vmalloc.c +5 -5
@@ -2590,11 +2590,6 @@ static int s_show(struct seq_file *m, void *p) v = va->vm; -/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ -smp_rmb (); -if (v->flags &VM_UNINITIALIZED ) -return 0 ; -seq_printf (m,"0x%pK-0x%pK %7ld" , v->addr, v->addr + v->size, v->size);
@@ -2622,6 +2617,11 @@ static int s_show(struct seq_file *m, void *p)if (v->flags &VM_VPAGES )seq_printf (m," vpages" ); +/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ +smp_rmb (); +if (v->flags &VM_UNINITIALIZED ) +return 0 ; +show_numa_info (m, v);seq_putc (m,'\n' );return 0 ;
Signature · 7 lines
1.7.5.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 3/3] mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info
Quoted 7 lines · Wanpeng Li
The VM_UNINITIALIZED/VM_UNLIST flag introduced by commit
f5252e00(mm: avoid null pointer access in vm_struct via /proc/vmallocinfo)is used to avoid accessing the pages field with unallocated page whenshow_numa_info()is called. This patch move the check just beforeshow_numa_infoin order that some messages still can be dumped via/proc/vmallocinfo.Signed-off-by Wanpeng Li <[email protected]>
Hmmm, sorry again. Please revert commit d157a55815ffff48caec311dfb543ce8a79e283e. That said, we could still do the check in show_numa_info like before.
Quoted 33 lines
--- mm/vmalloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)mm/vmalloc.c +5
-5@@ -2590,11 +2590,6 @@ static int s_show(struct seq_file *m, void *p) v = va->vm; -/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ -smp_rmb (); -if (v->flags &VM_UNINITIALIZED ) -return 0 ; -seq_printf (m,"0x%pK-0x%pK %7ld" , v->addr, v->addr + v->size, v->size);@@ -2622,6 +2617,11 @@ static int s_show(struct seq_file *m, void *p)if (v->flags &VM_VPAGES )seq_printf (m," vpages" ); +/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ +smp_rmb (); +if (v->flags &VM_UNINITIALIZED ) +return 0 ; +show_numa_info (m, v);seq_putc (m,'\n' );return 0 ;
Signature · 8 lines
Thanks. Zhang Yanfei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 3/3] mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info
Quoted 7 lines · Zhang Yanfei
Quoted 6 lines · Wanpeng Li
The VM_UNINITIALIZED/VM_UNLIST flag introduced by commit
f5252e00(mm: avoid null pointer access in vm_struct via /proc/vmallocinfo)is used to avoid accessing the pages field with unallocated page whenshow_numa_info()is called. This patch move the check just beforeshow_numa_infoin order that some messages still can be dumped via/proc/vmallocinfo.
Quoted 6 lines
Quoted 1 line
Signed-off-by Wanpeng Li <[email protected]>Hmmm, sorry again. Please revert commit
d157a55815ffff48caec311dfb543ce8a79e283e. That said, we could still do the check inshow_numa_infolike before.
Ok.
Regards,
Wanpeng Li
Quoted 24 lines
Quoted 24 lines
--- mm/vmalloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)mm/vmalloc.c +0
-5@@ -2590,11 +2590,6 @@ static int s_show(struct seq_file *m, void *p) v = va->vm; -/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ -smp_rmb (); -if (v->flags &VM_UNINITIALIZED ) -return 0 ; -seq_printf (m,"0x%pK-0x%pK %7ld" , v->addr, v->addr + v->size, v->size);@@ -2622,6 +2617,11 @@ static int s_show(struct seq_file *m, void *p)if (v->flags &VM_VPAGES )seq_printf (m," vpages" );
Quoted 14 lines
Quoted 9 lines
mm/vmalloc.c +5
-0+/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ +smp_rmb (); +if (v->flags &VM_UNINITIALIZED ) +return 0 ; +show_numa_info (m, v);seq_putc (m,'\n' );return 0 ;Signature · 2 lines
Thanks. Zhang Yanfei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH v2 3/3] mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info
In reply to Zhang YanfeiQuoted 7 lines · Zhang Yanfei
Quoted 6 lines · Wanpeng Li
The VM_UNINITIALIZED/VM_UNLIST flag introduced by commit
f5252e00(mm: avoid null pointer access in vm_struct via /proc/vmallocinfo)is used to avoid accessing the pages field with unallocated page whenshow_numa_info()is called. This patch move the check just beforeshow_numa_infoin order that some messages still can be dumped via/proc/vmallocinfo.
Quoted 6 lines
Quoted 1 line
Signed-off-by Wanpeng Li <[email protected]>Hmmm, sorry again. Please revert commit
d157a55815ffff48caec311dfb543ce8a79e283e. That said, we could still do the check inshow_numa_infolike before.
Ok.
Regards,
Wanpeng Li
Quoted 24 lines
Quoted 24 lines
--- mm/vmalloc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)mm/vmalloc.c +0
-5@@ -2590,11 +2590,6 @@ static int s_show(struct seq_file *m, void *p) v = va->vm; -/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ -smp_rmb (); -if (v->flags &VM_UNINITIALIZED ) -return 0 ; -seq_printf (m,"0x%pK-0x%pK %7ld" , v->addr, v->addr + v->size, v->size);@@ -2622,6 +2617,11 @@ static int s_show(struct seq_file *m, void *p)if (v->flags &VM_VPAGES )seq_printf (m," vpages" );
Quoted 14 lines
Quoted 9 lines
mm/vmalloc.c +5
-0+/* Pair with smp_wmb() in clear_vm_uninitialized_flag() */ +smp_rmb (); +if (v->flags &VM_UNINITIALIZED ) +return 0 ; +show_numa_info (m, v);seq_putc (m,'\n' );return 0 ;Signature · 2 lines
Thanks. Zhang Yanfei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Wanpeng Li
Changelog:
* rebase against mmotm treeThe caller address has already been set in
set_vmalloc_vm(), there's no need to set it again in__vmalloc_area_node.Signed-off-by Wanpeng Li <[email protected]>
Quoted 17 lines
--- mm/vmalloc.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)mm/vmalloc.c +0
-1@@ -1566,7 +1566,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, pages =kmalloc_node (array_size, nested_gfp, node); } area->pages = pages; - area->caller = caller;if (!area->pages) {remove_vm_area (area->addr);kfree (area);
Signature · 8 lines
Thanks. Zhang Yanfei -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>