[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170719135014.fdc882d1e28fd130104eff5d@linux-foundation.org>
Date: Wed, 19 Jul 2017 13:50:14 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Zhaoyang Huang <huangzhaoyang@...il.com>
Cc: zhaoyang.huang@...eadtrum.com, Michal Hocko <mhocko@...e.com>,
Ingo Molnar <mingo@...nel.org>, zijun_hu <zijun_hu@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Thomas Garnier <thgarnie@...gle.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, zijun_hu@...o.com
Subject: Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area
On Wed, 19 Jul 2017 18:44:03 +0800 Zhaoyang Huang <huangzhaoyang@...il.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?
Powered by blists - more mailing lists