Re: Async resume patch (was: Re: [GIT PULL] PM updates for 2.6.33)
[Posted December 9, 2009 by corbet]
| From: |
| Linus Torvalds <torvalds-AT-linux-foundation.org> |
| To: |
| "Rafael J. Wysocki" <rjw-AT-sisk.pl> |
| Subject: |
| Re: Async resume patch (was: Re: [GIT PULL] PM updates for 2.6.33) |
| Date: |
| Tue, 8 Dec 2009 07:35:27 -0800 (PST) |
| Cc: |
| Alan Stern <stern-AT-rowland.harvard.edu>,
Zhang Rui <rui.zhang-AT-intel.com>,
LKML <linux-kernel-AT-vger.kernel.org>,
ACPI Devel Maling List <linux-acpi-AT-vger.kernel.org>,
pm list <linux-pm-AT-lists.linux-foundation.org> |
| Archive-link: |
| Article, Thread
|
On Tue, 8 Dec 2009, Rafael J. Wysocki wrote:
>
> The wait queue plus the op_complete flag combo plays the role of the locking
> in the Linus' picture
Please just use the lock. Don't make up your own locking crap. Really.
Your patch is horrible. Exactly because your locking is horribly
mis-designed. You can't say things are complete from an interrupt, for
example, since you made it some random bitfield, which has unknown
characteristics (ie non-atomic read-modify-write etc).
The fact is, any time anybody makes up a new locking mechanism, THEY
ALWAYS GET IT WRONG. Don't do it.
I suggested using the rwsem locking for a good reason. It made sense. It
was simpler. Just do it that way, stop making up crap.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
(
Log in to post comments)