From: Pavel Machek <pavel@ucw.cz>
To: "Seshadri, Harinarayanan" <harinarayanan.seshadri@intel.com>
Cc: inux-pm@lists.osdl.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] Power S3 Resume Optimization Patch. Request for Comment
Date: Fri, 19 Jan 2007 09:29:37 +0000 [thread overview]
Message-ID: <20070119092936.GA5590@ucw.cz> (raw)
In-Reply-To: <5B3EF00AF56209498A59172917BFE8130165151B@bgsmsx412.gar.corp.intel.com>
Hi!
> [RFC][PATCH] Power S3 Resume optimisation
> Here is a simple patch for optimising the S3 resume. With this
> patch the resume time is 0.85. Given the fact that device initialisation
> on the resume takes almost 70% of time, By executing the whole
> "device_resume()" function on a seperate kernel thread, the resume gets
> completed( ie. the user can precieve) by ~0.85 sec.
Yep, but you also break it completely...
> To avoid any possible race condition while processing the IO
> request and to make sure all the io request are queued till the device
> resume thread exits, the IO schedulars (patched cfq and as) checks a for
> system_resume flag, which is set when the device resume thread starts,
> if the flag is set, it doesnt put the request in the dispatch queue.
> Once the flag is cleared i.e when the device resume thread is complete,
> the IO-schedular behave as in normal situation.
And you noticed that, so you fixed obvious problems on block devices.
Ignoring char and net devices completely.
> @@ -1088,6 +1088,19 @@
> if (list_empty(&ad->fifo_list[adir]))
> return 0;
>
> + /*
> + * Check here for the System resume flag to be cleared, if flag
> is
> + * still set the resume thread hasnt completed yet, and hence
> dont
> + * takeout any new request from the FIFO
> + */
> + extern int system_resuming;
> + if (system_resuming != 0)
> + {
Locking. CodingStyle.
> -static void suspend_finish(suspend_state_t state)
> +static int dev_resume_proc(void * data)
> {
> + /* Set the global resume flag, this will be checked by the
> IO_schedular
Broken mail client.
> + * before dispatching the IO request
> + */
> + system_resuming =1;
Add mdelay(1 hour) here. Then try to use your wifi card and your tv
grabber.
> device_resume();
> + system_resuming = 0;
> +#ifdef DEBUG
> + printk(" reseting system_resume \n");
> +#endif
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-01-21 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-19 8:08 [RFC] [PATCH] Power S3 Resume Optimization Patch. Request for Comment Seshadri, Harinarayanan
2007-01-19 9:29 ` Pavel Machek [this message]
2007-01-22 3:55 ` Seshadri, Harinarayanan
2007-01-22 12:51 ` Pavel Machek
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=20070119092936.GA5590@ucw.cz \
--to=pavel@ucw.cz \
--cc=harinarayanan.seshadri@intel.com \
--cc=inux-pm@lists.osdl.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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