From owner-freebsd-acpi@FreeBSD.ORG Thu Jan 10 16:25:17 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9E7C16A417 for ; Thu, 10 Jan 2008 16:25:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E116F13C46E for ; Thu, 10 Jan 2008 16:25:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 4BF871A4D89; Thu, 10 Jan 2008 08:22:22 -0800 (PST) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 10 Jan 2008 11:24:17 -0500 User-Agent: KMail/1.9.7 References: <200712311556.lBVFuVZf030567@freefall.freebsd.org> <4782BA24.8030703@root.org> <200801101015.29669.jhb@freebsd.org> In-Reply-To: <200801101015.29669.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801101124.18406.jhb@freebsd.org> Cc: Alexey Starikovskiy , "Moore, Robert" Subject: Re: GPE handler livelock X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2008 16:25:18 -0000 On Thursday 10 January 2008 10:15:29 am John Baldwin wrote: > On Monday 07 January 2008 06:47:48 pm Nate Lawson wrote: > > This makes sense. For the _L00 method in question, it runs 2 notifies > > before it completes. So in our queue, that would be: > > > > T1: GPE:_L00 > > [_LOO method runs, GPE removed] > > [_L00 queues 2 more Notifies] > > T2: Notify, Notify > > [_L00 completes] > > > > Right now, there is nothing in our code to synchronize _L00's completion > > with completion of the Notifys. In fact, _L00 finishes before the > > Notifys run. Also, if another GPE comes in while this GPE is running, > > it will be queued in front of the Notifys and so would execute first. > > > > So I think with just your evgpe.c change, we will defer re-enabling the > > GPE until after the queued Notifys complete since the re-enable task > > will be queued at the same priority. > > > > The only remaining concern I have is if another GPE comes in before one > > or both Notifys run, it will be inserted at the head of the queue. So > > as a hack, I'm setting the priority of these to be equal. > > > > Yousif, please try the attached patch and don't load a custom ASL. > > This patch appears to work for me in my testing. I think this might also > explain the weird hangs I reported seeing when running on battery with > powerd on older kernels, but I haven't tested that case yet. Update to note that it did not fix the issue I have with powerd. However debug.cpufreq.lowest does seem to help my issues with powerd. -- John Baldwin