Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751553AbZLGF27 (ORCPT ); Mon, 7 Dec 2009 00:28:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751247AbZLGF26 (ORCPT ); Mon, 7 Dec 2009 00:28:58 -0500 Received: from casper.infradead.org ([85.118.1.10]:49564 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751239AbZLGF25 (ORCPT ); Mon, 7 Dec 2009 00:28:57 -0500 Date: Sun, 6 Dec 2009 21:31:12 -0800 From: Arjan van de Ven To: Dmitry Torokhov Cc: Linus Torvalds , "Rafael J. Wysocki" , LKML , ACPI Devel Maling List , pm list , Alan Stern Subject: Re: [GIT PULL] PM updates for 2.6.33 Message-ID: <20091206213112.568c602b@infradead.org> In-Reply-To: <20091207022706.GA20770@core.coreip.homeip.net> References: <200912052216.19540.rjw@sisk.pl> <200912060055.36130.rjw@sisk.pl> <200912060254.10081.rjw@sisk.pl> <20091206113555.5a646713@infradead.org> <20091206121803.70385c33@infradead.org> <7AB497C7-8495-4535-9E83-81307E008BF4@gmail.com> <20091206171856.394ce6d8@infradead.org> <20091207022706.GA20770@core.coreip.homeip.net> Organization: Intel X-Mailer: Claws Mail 3.7.3 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2079 Lines: 52 On Sun, 6 Dec 2009 18:27:07 -0800 Dmitry Torokhov wrote: > On Sun, Dec 06, 2009 at 05:18:56PM -0800, Arjan van de Ven wrote: > > On Sun, 6 Dec 2009 14:54:48 -0800 > > Dmitry Torokhov wrote: > > > > > Yes, that's your PS/2 mouse (rather touchpad) and the delay comes > > > from device reset (needed by some keyboard controllers - I > > > remember HP -or it and keyboard will be dead at resume). > > > > > > > btw could we do this reset in an async function call (as long as we > > wait for it to complete before we pull the plug finally) ? > > It has to complete before we start shutting down i8042, so there are > dependencies involved... async function calls have 2 methods for synchronization: * inside an async function, you can wait for all "earlier" async functions to complete (async_synchronize_cookie) * outside an async function, you can wait for all scheduled async functions to complete (async_synchronize_full) so there's two options to use the async code to cut down this time: 1) Make both the mouse, keyboard AND the i8042 suspend functions async, and in the i8042 function the code first synchronizes on all previous async work 2) only make the mouse and keyboard suspend async, and just wait for all async work in i8042 suspend I strongly prefer number 1, in terms of getting the best suspend speed. It means that all other suspend code can run in parallel to the whole serio/i8042 suspend. Option two is simpler, but the delay is in the normal, synchronous path, so other suspend code will not run in parallel. The good news is that neither is hard for someone familiar with the code... -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/