On Thu, 10 Dec 2009, Rafael J. Wysocki wrote:What was so hard with the "Try the simple one first" to understand? You had a simpler working patch, why are you making this more complex one without ever having had any problems with the simpler one? Btw, your 'atomic_set()' with errors is pure voodoo programming. That's not how atomics work. They do SMP-atomic addition etc, the 'atomic_set()' and 'atomic_read()' things are not in any way more atomic than any other access. They are meant for racy reads (atomic_read()) and for initializations (atomic_set()), and the way you use them that 'atomic' part is entirely pointless, because it really isn't anything different from an 'int', except that it may be very very expensive on some architectures due to hashed spinlocks etc. So stop this overdesign thing. Start simple. If you _ever_ see real problems, that's when you add stuff. As it is, any time you add complexity, you just add bugs. And this, for example, is pretty disgusting. Not only is that INIT_COMPLETION purely brought on by the whole problem with completions (they are fundamentally one-shot, but you want to use them over and over so you need to re-initialize them: a nice lock wouldn't have that problem to begin with), but the comment isn't even accurate. Sure, it waits for any async jobs, but that's the _least_ of what the function actually does, so the comment is actively misleading, isn't it? Linus --
| Greg KH | Og dreams of kernels |
| Jens Axboe | [PATCH 31/33] Fusion: sg chaining support |
| Arnd Bergmann | Re: finding your own dead "CONFIG_" variables |
| Mark Brown | [PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset |
| Tony Breeds | [LGUEST] Look in object dir for .config |
git: | |
| Brian Downing | Re: Git in a Nutshell guide |
| John Benes | Re: master has some toys |
| Matthias Lederhofer | [PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree |
| Alexander Sulf |
