lkml.org 
[lkml]   [2015]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3 v3] mm/vmalloc: Cache the vmalloc memory info
Date
On Sun, Aug 23 2015, Ingo Molnar <mingo@kernel.org> wrote:

> Ok, fair enough - so how about the attached approach instead, which
> uses a 64-bit generation counter to track changes to the vmalloc
> state.

How does this invalidation approach compare to the jiffies approach? In
other words, how often does the vmalloc info actually change (or rather,
in this approximation, how often is vmap_area_lock taken)? In
particular, does it also solve the problem with git's test suite and
similar situations with lots of short-lived processes?

> ==============================>
> From f9fd770e75e2edb4143f32ced0b53d7a77969c94 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@kernel.org>
> Date: Sat, 22 Aug 2015 12:28:01 +0200
> Subject: [PATCH] mm/vmalloc: Cache the vmalloc memory info
>
> Linus reported that glibc (rather stupidly) reads /proc/meminfo
> for every sysinfo() call,

Not quite: It is done by the two functions get_{av,}phys_pages
functions; and get_phys_pages is called (once per process) by glibc's
qsort implementation. In fact, sysinfo() is (at least part of) the cure,
not the disease. Whether qsort should care about the total amount of
memory is another discussion.

<http://thread.gmane.org/gmane.comp.lib.glibc.alpha/54342/focus=54558>

Rasmus


\
 
 \ /
  Last update: 2015-08-23 23:01    [W:0.117 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site