public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to completely disable async fastboot?
@ 2009-04-16  0:20 Jeff Garzik
  2009-04-16  1:31 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2009-04-16  0:20 UTC (permalink / raw)
  To: Arjan van de Ven, LKML; +Cc: Andrew Morton

The following commit

> commit 9710794383ee5008d67f1a6613a4717bf6de47bc
> Author: Arjan van de Ven <arjan@linux.intel.com>
> Date:   Sun Mar 15 11:11:44 2009 -0700
> 
>     async: remove the temporary (2.6.29) "async is off by default" code

not only changes a default, it completely removes the ability to turn 
off async AFAICS.

At present, I need to turn this off to debug boot-time operation.

	Jeff




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to completely disable async fastboot?
  2009-04-16  0:20 How to completely disable async fastboot? Jeff Garzik
@ 2009-04-16  1:31 ` Arjan van de Ven
  2009-04-16  1:48   ` [PATCH] " Jeff Garzik
  2009-04-17 18:45   ` Stefan Richter
  0 siblings, 2 replies; 4+ messages in thread
From: Arjan van de Ven @ 2009-04-16  1:31 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: LKML, Andrew Morton

On Wed, 15 Apr 2009 20:20:32 -0400
Jeff Garzik <jeff@garzik.org> wrote:

> The following commit
> 
> > commit 9710794383ee5008d67f1a6613a4717bf6de47bc
> > Author: Arjan van de Ven <arjan@linux.intel.com>
> > Date:   Sun Mar 15 11:11:44 2009 -0700
> > 
> >     async: remove the temporary (2.6.29) "async is off by default"
> > code
> 
> not only changes a default, it completely removes the ability to turn 
> off async AFAICS.

this is on the request of Andrew and others who want to be able to use
these API's (soon) in an "forced offload" scenario. 

> 
> At present, I need to turn this off to debug boot-time operation.

can you give some details? Maybe I can help suggest things...


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Re: How to completely disable async fastboot?
  2009-04-16  1:31 ` Arjan van de Ven
@ 2009-04-16  1:48   ` Jeff Garzik
  2009-04-17 18:45   ` Stefan Richter
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-04-16  1:48 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: LKML, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

Arjan van de Ven wrote:
> On Wed, 15 Apr 2009 20:20:32 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
> 
>> The following commit
>>
>>> commit 9710794383ee5008d67f1a6613a4717bf6de47bc
>>> Author: Arjan van de Ven <arjan@linux.intel.com>
>>> Date:   Sun Mar 15 11:11:44 2009 -0700
>>>
>>>     async: remove the temporary (2.6.29) "async is off by default"
>>> code
>> not only changes a default, it completely removes the ability to turn 
>> off async AFAICS.
> 
> this is on the request of Andrew and others who want to be able to use
> these API's (soon) in an "forced offload" scenario. 
> 
>> At present, I need to turn this off to debug boot-time operation.
> 
> can you give some details? Maybe I can help suggest things...

Too much shit is occurring in parallel, which completely obscures the 
operation of the driver I am currently debugging.  A new and unwelcome 
behavior, as it is directly impacting workflow.

Commit 9710794383ee5008d67f1a6613a4717bf6de47bc was fine for the normal 
case, but please have pity on developers!  Just like many multi-threaded 
userland programs have an option to run single-threaded (usually for 
debug purposes), the kernel should have this too.

I need a slowboot option, like the attached patch.

The patch is basically the reverse of your 
9710794383ee5008d67f1a6613a4717bf6de47bc in a different way.

	Jeff




[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 796 bytes --]

diff --git a/kernel/async.c b/kernel/async.c
index 968ef94..8c553ce 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -68,6 +68,7 @@ static LIST_HEAD(async_running);
 static DEFINE_SPINLOCK(async_lock);
 
 static int async_enabled = 0;
+static int async_disabled;
 
 struct async_entry {
 	struct list_head list;
@@ -388,6 +389,11 @@ static int async_manager_thread(void *unused)
 
 static int __init async_init(void)
 {
+	if (async_disabled) {
+		async_enabled = 0;
+		return 0;
+	}
+
 	async_enabled =
 		!IS_ERR(kthread_run(async_manager_thread, NULL, "async/mgr"));
 
@@ -395,4 +401,12 @@ static int __init async_init(void)
 	return 0;
 }
 
+static int __init setup_async(char *str)
+{
+	async_disabled = 1;
+	return 1;
+}
+
+__setup("slowboot", setup_async);
+
 core_initcall(async_init);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: How to completely disable async fastboot?
  2009-04-16  1:31 ` Arjan van de Ven
  2009-04-16  1:48   ` [PATCH] " Jeff Garzik
@ 2009-04-17 18:45   ` Stefan Richter
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2009-04-17 18:45 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Jeff Garzik, LKML, Andrew Morton, David Howells

On 4/16/2009 3:31 AM, Arjan van de Ven wrote:
> On Wed, 15 Apr 2009 20:20:32 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
>> > commit 9710794383ee5008d67f1a6613a4717bf6de47bc
...
>> not only changes a default, it completely removes the ability to turn 
>> off async AFAICS.
> 
> this is on the request of Andrew and others who want to be able to use
> these API's (soon) in an "forced offload" scenario. 

Indeed, because the async API is a threadpool API.
However, 2.6.30-rc1 also gained David Howell's <linux/slow-work.h>, and
I for one am still wondering which one of these I'm going to use...
-- 
Stefan Richter
-=====-==--= -=-- =---=
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-17 18:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16  0:20 How to completely disable async fastboot? Jeff Garzik
2009-04-16  1:31 ` Arjan van de Ven
2009-04-16  1:48   ` [PATCH] " Jeff Garzik
2009-04-17 18:45   ` Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox