Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511AbbHMW4K (ORCPT ); Thu, 13 Aug 2015 18:56:10 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:34238 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754056AbbHMW4I (ORCPT ); Thu, 13 Aug 2015 18:56:08 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150812210027.88dfcf90.akpm@linux-foundation.org> Date: Thu, 13 Aug 2015 15:56:07 -0700 X-Google-Sender-Auth: i-bLkDgj_arukJssEV5KEAiTfrc Message-ID: Subject: Re: get_vmalloc_info() and /proc/meminfo insanely expensive From: Linus Torvalds To: Tony Luck 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 Content-Length: 646 Lines: 18 On Thu, Aug 13, 2015 at 2:15 PM, Tony Luck wrote: > > could you at least care enough to write that as > > if (time_after(now, last + HZ)) { Absolutely not. That would be wrong. "time_after()" covers half the "unsigned long" space (very much on purpose). We want the cached case to trigger _only_ for the much tighter case of exactly 1000 jiffies. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/