Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207218

Re: get_vmalloc_info() and /proc/meminfo insanely expensive

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!bofh.it!news.nic.it!robomod
From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: get_vmalloc_info() and /proc/meminfo insanely expensive
Date Fri, 14 Aug 2015 01:00:02 +0200
Message-ID <pX9DA-q0-15@gated-at.bofh.it> (permalink)
References <pWRnk-7WT-1@gated-at.bofh.it> <pWS01-tB-7@gated-at.bofh.it> <pWTIu-2Kb-1@gated-at.bofh.it> <pX5zY-32e-13@gated-at.bofh.it> <pX8eu-6ZO-17@gated-at.bofh.it>
X-Original-To Tony Luck <tony.luck@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Mi4bQSWSXvEKrfOteRo6Anfrwg5qZuZ71G8BAdQqzoc=; b=NL2C6J44a4CO1MQcHmUpt8xAauZNWsPxGG4Gfx5T/WBCk9BoBt9Ww4EgvqDBBv3VJB 9cVdV1bScui3M66t2agaE3nf8+hhoI4/lRMBb4iKZqGOpYKvbntt28mKwavoXDeVK2uj yvuq/5gBy4xG6Z64tbftaKzQ+s/okyHNXyP2oZtukLfHSJusqpNzOm0b7nsIhQcabE7A rl7is4EVzp74hnxYuE54kboiNatfkZpB4wvoWVZZoW3xT19dCUdol3qKi3J+ZS4I5Uqd tA0bEPJHj/TSGDXtY4do/hq6Wxxct5CA+agsSYs24uN22lpsrscloATit/V7UKNjxOnf pRLA==
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Mi4bQSWSXvEKrfOteRo6Anfrwg5qZuZ71G8BAdQqzoc=; b=Co2sYL9a9nEc7AkNRQqre4lZXVL6vng4Q5G0WWn59SXbA2kDM9y96MSayPrH06sfhH JYHPBALg2nPgqa0eYMJVK4Th2zDd+nbDkVyyZMXgOBpMo43hOZZ6PLiuX8c26/BoG2Fi yRr5BpQJkZbS9Y3xudgXpRT91pySLsQSExmKg=
MIME-Version 1.0
X-Received by 10.107.167.207 with SMTP id q198mr48101198ioe.137.1439506567621; Thu, 13 Aug 2015 15:56:07 -0700 (PDT)
X-Google-Sender-Auth i-bLkDgj_arukJssEV5KEAiTfrc
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 18
Organization linux.* mail to news gateway
X-Original-Cc Andrew Morton <akpm@linux-foundation.org>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Al Viro <viro@zeniv.linux.org.uk>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 13 Aug 2015 15:56:07 -0700
X-Original-Message-ID <CA+55aFzh--4diDL5GutA_B7vGhjx03KLnYMWLc4KZPo_UqAwOA@mail.gmail.com>
X-Original-References <CA+55aFzUDiGRY_CZz0hON9AxkD1Fw_B-YSLiHH8tt_3rkKUrzw@mail.gmail.com> <20150812210027.88dfcf90.akpm@linux-foundation.org> <CA+55aFzjhAoa6aiEfuwM_XyYn0OWRjUuHyEasfj=q4tzOHFGYA@mail.gmail.com> <CA+55aFxzOAx7365Mx2o55TZOS+bZGh_Pfr=vVF3QGg0btsDumg@mail.gmail.com> <CA+8MBb+LGW0tc8Deta0qiJ0_N37LC2XxWSiHDYaQczYSE097vg@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1207218

Show key headers only | View raw


On Thu, Aug 13, 2015 at 2:15 PM, Tony Luck <tony.luck@gmail.com> 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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 05:30 +0200
  Re: get_vmalloc_info() and /proc/meminfo insanely expensive Andrew Morton <akpm@linux-foundation.org> - 2015-08-13 06:10 +0200
    Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 08:00 +0200
      Re: get_vmalloc_info() and /proc/meminfo insanely expensive Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-08-13 09:50 +0200
        Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 19:00 +0200
      Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 20:40 +0200
        Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 21:00 +0200
          Re: get_vmalloc_info() and /proc/meminfo insanely expensive David Rientjes <rientjes@google.com> - 2015-08-13 22:00 +0200
            Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-13 22:10 +0200
        Re: get_vmalloc_info() and /proc/meminfo insanely expensive Tony Luck <tony.luck@gmail.com> - 2015-08-13 23:30 +0200
          Re: get_vmalloc_info() and /proc/meminfo insanely expensive Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 01:00 +0200
      Re: get_vmalloc_info() and /proc/meminfo insanely expensive Andrew Morton <akpm@linux-foundation.org> - 2015-08-13 22:30 +0200

csiph-web