From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753504AbbHMQue (ORCPT ); Thu, 13 Aug 2015 12:50:34 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:37745 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752210AbbHMQud (ORCPT ); Thu, 13 Aug 2015 12:50:33 -0400 MIME-Version: 1.0 In-Reply-To: <87bnebk51f.fsf@rasmusvillemoes.dk> References: <20150812210027.88dfcf90.akpm@linux-foundation.org> <87bnebk51f.fsf@rasmusvillemoes.dk> Date: Thu, 13 Aug 2015 09:50:32 -0700 X-Google-Sender-Auth: ej0HAwNhfP0FMC7yOA3a-tUwSqs Message-ID: Subject: Re: get_vmalloc_info() and /proc/meminfo insanely expensive From: Linus Torvalds To: Rasmus Villemoes Cc: Andrew Morton , Joonsoo Kim , Al Viro , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 13, 2015 at 12:42 AM, Rasmus Villemoes wrote: > > I think it's simpler and better to fix glibc. Well, I certainly don't disagree, but at the same time I suspect that (a) many distros will not update glibc very aggressively and (b) we should fix the unnecessarily expensive kernel operation regardless. I think that just printing out the ASCII numbers in /proc/meminfo should be a lot more expensive than computing the numbers. Which is clearly not the case now, because we do that crazy expensive dynamic computation every time, even though it hardly ever really changes (and nobody even really cares about the values). So I'd prefer to fix the kernel for existing insane users (because the kernel is just doing stupid things that it didn't expect anybody to care about), _and_ fix glibc. Linus