linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: get_vmalloc_info() and /proc/meminfo insanely expensive
Date: Wed, 12 Aug 2015 22:52:44 -0700	[thread overview]
Message-ID: <CA+55aFzjhAoa6aiEfuwM_XyYn0OWRjUuHyEasfj=q4tzOHFGYA@mail.gmail.com> (raw)
In-Reply-To: <20150812210027.88dfcf90.akpm@linux-foundation.org>

On Wed, Aug 12, 2015 at 9:00 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> Do your /proc/meminfo vmalloc numbers actually change during that build?
> Mine don't.  Perhaps we can cache the most recent vmalloc_info and
> invalidate that cache whenever someone does a vmalloc/vfree/etc.

Sure, that works too.

Looking at that mm/vmalloc.c file, the locking is pretty odd. It looks
pretty strange in setup_vmalloc_vm(), for example. If that newly
allocated "va" that we haven't even exposed to anybody yet has its
address or size changed, we're screwed in so many ways.

I get the feeling this file should be rewritten. But that's not going
to happen. The "let's just cache the last value for one jiffy" seemed
to be the minimal fixup to it.

                     Linus

  reply	other threads:[~2015-08-13  5:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  3:29 get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds
2015-08-13  4:00 ` Andrew Morton
2015-08-13  5:52   ` Linus Torvalds [this message]
2015-08-13  7:42     ` Rasmus Villemoes
2015-08-13 16:50       ` Linus Torvalds
2015-08-13 18:32     ` Linus Torvalds
2015-08-13 18:52       ` Linus Torvalds
2015-08-13 19:50         ` David Rientjes
2015-08-13 20:04           ` Linus Torvalds
2015-08-13 21:15       ` Tony Luck
2015-08-13 22:56         ` Linus Torvalds
2015-08-13 20:26     ` Andrew Morton

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CA+55aFzjhAoa6aiEfuwM_XyYn0OWRjUuHyEasfj=q4tzOHFGYA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).