[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1365758166.17140.35.camel@laptop>
Date: Fri, 12 Apr 2013 11:16:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Olivier Langlois <olivier@...llion01.com>
Cc: mingo@...hat.com, tglx@...utronix.de, fweisbec@...il.com,
schwidefsky@...ibm.com, rostedt@...dmis.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] process cputimer is moving faster than its
corresponding clock
On Wed, 2013-04-10 at 11:48 -0400, Olivier Langlois wrote:
> Please explain how expensive it is. All I am seeing is a couple of
> additions.
Let me start with this, since your earlier argument also refers to
this.
So yes it does look simple and straight fwd, only one addition. However
its an atomic operation across all threads of the same process. Imagine
a single process with 512 threads, all running on a separate cpu.
Do you see the problem? The cacheline contention of that one atomic is
enough to bring a machine that size to its knees. People tried, it
works.
This is a fundamentally unscalable problem that is part of the POSIX
interface.
Also, since its a concurrent problem, the entire question: "what is the
current runtime of the process" is uncertain and fuzzy. I prefer to
look at it as a Heisenberg uncertainty principle of SMP computing; you
cannot know the exact state of your SMP system and have it run (fast).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists