Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1692194
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area |
| Date | 2017-07-19 23:00 +0200 |
| Message-ID | <u54eB-5rr-9@gated-at.bofh.it> (permalink) |
| References | <u4UIj-7mS-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 19 Jul 2017 18:44:03 +0800 Zhaoyang Huang <huangzhaoyang@gmail.com> wrote:
> /proc/vmallocinfo will not show the area allocated by vm_map_ram, which
> will make confusion when debug. Add vm_struct for them and show them in
> proc.
>
Please provide sample /proc/vmallocinfo so we can better understand the
proposal. Is there a means by which people can determine that a
particular area is from vm_map_ram()? I don't think so. Should there
be?
>
> ...
>
> @@ -1173,6 +1178,12 @@ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t pro
> addr = (unsigned long)mem;
> } else {
> struct vmap_area *va;
> + struct vm_struct *area;
> +
> + area = kzalloc_node(sizeof(*area), GFP_KERNEL, node);
> + if (unlikely(!area))
> + return NULL;
Allocating a vm_struct for each vm_map_ram area is a cost. And we're
doing this purely for /proc/vmallocinfo. I think I'll need more
persuading to convince me that this is a good tradeoff, given that
*every* user will incur this cost, and approximately 0% of them will
ever use /proc/vmallocinfo.
So... do we *really* need this? If so, why?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm/vmalloc: add vm_struct for vm_map_ram area Zhaoyang Huang <huangzhaoyang@gmail.com> - 2017-07-19 12:50 +0200
Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area Andrew Morton <akpm@linux-foundation.org> - 2017-07-19 23:00 +0200
Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area Zhaoyang Huang <huangzhaoyang@gmail.com> - 2017-07-20 03:20 +0200
Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area Zhaoyang Huang <huangzhaoyang@gmail.com> - 2017-07-20 03:30 +0200
Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area zijun_hu <zijun_hu@zoho.com> - 2017-07-20 04:40 +0200
csiph-web