From: Linus Torvalds 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) Message-ID: References: <200912081323.50606.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:57488 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756067AbZLHPfs (ORCPT ); Tue, 8 Dec 2009 10:35:48 -0500 In-Reply-To: <200912081323.50606.rjw@sisk.pl> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: Alan Stern , Zhang Rui , LKML , ACPI Devel Maling List , pm list 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