Commit d4033af
mm, vmalloc: iterate vmap_area_list, instead of vmlist, in vmallocinfo()
This patch is a preparatory step for removing vmlist entirely. For
above purpose, we change iterating a vmap_list codes to iterating a
vmap_area_list. It is somewhat trivial change, but just one thing
should be noticed.
Using vmap_area_list in vmallocinfo() introduce ordering problem in SMP
system. In s_show(), we retrieve some values from vm_struct.
vm_struct's values is not fully setup when va->vm is assigned. Full
setup is notified by removing VM_UNLIST flag without holding a lock.
When we see that VM_UNLIST is removed, it is not ensured that vm_struct
has proper values in view of other CPUs. So we need smp_[rw]mb for
ensuring that proper values is assigned when we see that VM_UNLIST is
removed.
Therefore, this patch not only change a iteration list, but also add a
appropriate smp_[rw]mb to right places.
Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent f98782d commit d4033af
1 file changed
+42
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1307 | 1313 | | |
| 1314 | + | |
1308 | 1315 | | |
1309 | 1316 | | |
1310 | 1317 | | |
| |||
2542 | 2549 | | |
2543 | 2550 | | |
2544 | 2551 | | |
2545 | | - | |
| 2552 | + | |
2546 | 2553 | | |
2547 | 2554 | | |
2548 | | - | |
| 2555 | + | |
2549 | 2556 | | |
2550 | | - | |
2551 | | - | |
2552 | | - | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
2553 | 2560 | | |
2554 | | - | |
| 2561 | + | |
2555 | 2562 | | |
2556 | | - | |
2557 | | - | |
| 2563 | + | |
| 2564 | + | |
2558 | 2565 | | |
2559 | 2566 | | |
2560 | 2567 | | |
2561 | 2568 | | |
2562 | 2569 | | |
2563 | 2570 | | |
2564 | 2571 | | |
2565 | | - | |
| 2572 | + | |
2566 | 2573 | | |
2567 | 2574 | | |
2568 | | - | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
2569 | 2580 | | |
2570 | 2581 | | |
2571 | 2582 | | |
2572 | | - | |
| 2583 | + | |
2573 | 2584 | | |
2574 | | - | |
| 2585 | + | |
2575 | 2586 | | |
2576 | 2587 | | |
2577 | 2588 | | |
| |||
2582 | 2593 | | |
2583 | 2594 | | |
2584 | 2595 | | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
2585 | 2601 | | |
2586 | 2602 | | |
2587 | 2603 | | |
| |||
2595 | 2611 | | |
2596 | 2612 | | |
2597 | 2613 | | |
2598 | | - | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
2599 | 2628 | | |
2600 | 2629 | | |
2601 | 2630 | | |
| |||
0 commit comments