Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.158.31.10.MISMATCH!newsfeed-0.progon.net!progon.net!bofh.it!news.nic.it!robomod From: Peter Zijlstra Newsgroups: linux.kernel Subject: Re: High CPU load when machine is idle (related to PROBLEM: Unusually high load average when idle in 2.6.35, 2.6.35.1 and later) Date: Tue, 26 Oct 2010 16:10:02 +0200 Message-ID: References: X-Original-To: Venkatesh Pallipadi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: robo...@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robo...@news.nic.it Lines: 44 Organization: linux.* mail to news gateway X-Original-Cc: Damien Wyart , Chase Douglas , Ingo Molnar , tmhik...@gmail.com, Thomas Gleixner , linux-ker...@vger.kernel.org X-Original-Date: Tue, 26 Oct 2010 16:05:58 +0200 X-Original-Message-ID: <1288101958.15336.284.camel@twins> X-Original-References: <1287788622-25860-1-git-send-email-ve...@google.com> <1288001573.15336.52.camel@twins> <1288097074.15336.211.camel@twins> X-Original-Sender: linux-kernel-ow...@vger.kernel.org On Tue, 2010-10-26 at 14:44 +0200, Peter Zijlstra wrote: > a smarter patch will try and avoid that loop. a1 = a0 * e + a * (1 - e) a2 = a1 * e + a * (1 - e) = (a0 * e + a * (1 - e)) * e + a * (1 - e) = a0 * e^2 + a * (1 - e) * (1 + e) a3 = a2 * e + a * (1 - e) = (a0 * e^2 + a * (1 - e) * (1 + e)) * e + a * (1 - e) = a0 * e^3 + a * (1 - e) * (1 + e + e^2) an = a0 * e^n + a * (1 - e) * (1 + e + ... + e^n-1) = a0 * e^n + a * (1 - e) * (1 - e^n)/(1 - e) = a0 * e^n + a * (1 - e^n) the trouble seems to be that that is a rather slow function, stuffing that in a table will either give us very large tables or very coarse decay. n: an an * 2048 1: 0.99446 2037 2: 0.98895 2025 4: 0.978023 2003 8: 0.956529 1959 16: 0.914947 1874 32: 0.837128 1714 64: 0.700784 1435 128: 0.491098 1006 256: 0.241177 494 512: 0.0581666 119 1024: 0.00338335 7 2048: 1.14471e-05 0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/