public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	linux-acpi <linux-acpi@vger.kernel.org>,
	"Van De Ven, Arjan" <arjan.van.de.ven@intel.com>
Subject: Re: [linux-pm] [PATCH 2/8] introduce the device async action mechanism
Date: Wed, 15 Jul 2009 02:31:44 +0200	[thread overview]
Message-ID: <20090715003144.GD2360@ucw.cz> (raw)
In-Reply-To: <1247643516.26272.77.camel@rzhang-dt>

On Wed 2009-07-15 15:38:36, Zhang Rui wrote:
> Introduce the device async action mechanism.
> 
> In order to speed up Linux suspend/resume/shutdown process,
> we introduce the device async action mechanism that allow devices
> to suspend/resume/shutdown asynchronously.
> 
> The basic idea is that,
> if the suspend/resume/shutdown process of a device set,
> including a root device and its child devices, are independent of
> other devices, we create an async domain for this device set,
> and make them suspend/resume/shutdown asynchronously.
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/base/Makefile     |    3 
>  drivers/base/async_dev.c  |  180 ++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/async_dev.h |   40 ++++++++++
>  include/linux/device.h    |    2 
>  4 files changed, 224 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/include/linux/async_dev.h
> ===================================================================
> --- /dev/null
> +++ linux-2.6/include/linux/async_dev.h
> @@ -0,0 +1,40 @@
> +/*
> + * async_dev.h: function calls for device async actions
> + *
> + * (C) Copyright 2009 Intel Corporation
> + * Author: Zhang Rui <rui.zhang@intel.com>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; version 2
> + * of the License.
> + */
> +
> +#ifndef _ASYNC_DEV_H_
> +#define _ASYNC_DEV_H_
> +
> +#include <linux/types.h>
> +#include <linux/list.h>
> +#include <linux/async.h>
> +#include <linux/device.h>
> +#include <linux/pm.h>
> +
> +struct dev_async_struct {
> +	struct device *dev;
> +	int type;
> +	/* Synchronization Domain for device async actions */
> +	struct list_head domain;
> +	struct list_head node;
> +	async_cookie_t cookie;
> +};
> +
> +#define DEV_ASYNC_ACTIONS_ALL	0
> +
> +extern int dev_async_schedule(struct device *, void *,
> +			void *, int);
> +extern void dev_async_synchronization(void);

'_synchronize' to be consistent with schedule?

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2009-07-15 15:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  7:38 [PATCH 2/8] introduce the device async action mechanism Zhang Rui
2009-07-15  0:31 ` Pavel Machek [this message]
2009-07-15 13:00 ` Arjan van de Ven
2009-07-16  2:05   ` Zhang Rui
2009-07-17  1:11     ` Rafael J. Wysocki
2009-07-17  2:44       ` Zhang Rui
2009-07-19 22:16         ` Pavel Machek
2009-07-20  3:09           ` Zhang Rui
2009-07-20 16:24         ` Rafael J. Wysocki
2009-07-17  4:31       ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090715003144.GD2360@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=arjan.van.de.ven@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox