archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <>
To: Zhaoyang Huang <>
Cc:, Michal Hocko <>,
	Ingo Molnar <>, zijun_hu <>,
	Vlastimil Babka <>,
	Thomas Garnier <>,
	"Kirill A. Shutemov" <>,
	Andrey Ryabinin <>,,,
Subject: Re: [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area
Date: Wed, 19 Jul 2017 13:50:14 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, 19 Jul 2017 18:44:03 +0800 Zhaoyang Huang <> 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

> ...
> @@ -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?

To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to  For more info on Linux MM,
see: .
Don't email: <a href=mailto:""> </a>

  reply	other threads:[~2017-07-19 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 10:44 [PATCH] mm/vmalloc: add vm_struct for vm_map_ram area Zhaoyang Huang
2017-07-19 20:50 ` Andrew Morton [this message]
2017-07-20  1:15   ` Zhaoyang Huang
2017-07-20  1:20     ` Zhaoyang Huang
2017-07-20  2:36 ` zijun_hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).