Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760456AbZJNVRZ (ORCPT ); Wed, 14 Oct 2009 17:17:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760194AbZJNVRY (ORCPT ); Wed, 14 Oct 2009 17:17:24 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:40564 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753363AbZJNVRX (ORCPT ); Wed, 14 Oct 2009 17:17:23 -0400 Date: Wed, 14 Oct 2009 22:16:33 +0100 From: Alan Cox To: Oleg Nesterov Cc: Linus Torvalds , Paul Fulghum , Boyan , "Rafael J. Wysocki" , Linux Kernel Mailing List , Kernel Testers List , Dmitry Torokhov , Ed Tomlinson , OGAWA Hirofumi Subject: Re: [Bug #14388] keyboard under X with 2.6.31 Message-ID: <20091014221633.1b865651@lxorguk.ukuu.org.uk> In-Reply-To: <20091014195215.GA12936@redhat.com> References: <4AD4F548.2030506@microgate.com> <1255478932.19056.24.camel@localhost.localdomain> <4AD51D6B.7010509@microgate.com> <20091014125846.1a3c8d40@lxorguk.ukuu.org.uk> <20091014182037.GA10076@redhat.com> <20091014195215.GA12936@redhat.com> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 754 Lines: 18 > Assuming that we should not check all CPUs. And in this case perhaps we can > even do something like > > if (!delayed_work_pending() && > get_wq_data()->current_work != dwork) > return; > > but this needs barriers, and run_workqueue() needs mb__before_clear_bit(). Linus correctly said that we got into the mess because the locking was too clever before. At this point the mutex approach seems to be rather preferable to the other approaches which are at least as "clever" as the current locking -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/