mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: ncunningham@linuxmail.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Patch] Per kthread freezer flags
Date: Wed, 28 Jul 2004 14:20:26 -0700	[thread overview]
Message-ID: <20040728142026.79860177.akpm@osdl.org> (raw)
In-Reply-To: <1090999301.8316.12.camel@laptop.cunninghams>

Nigel Cunningham <ncunningham@linuxmail.org> wrote:
>
> At the moment, all kthreads have PF_NOFREEZE set, meaning that they're
> not refrigerated during a suspend. This isn't right for some threads.
> They should be frozen while suspending. The attached patch implements
> per-kthread freezer flags. It does this by adding a new parameter to the
> create_workqueue call and its siblings. The new parameter contains the
> process flags relevant to suspending to be set. At the moment, this only
> means PF_FREEZE, but when I send the freezer improvements, a
> PF_SYNCTHREAD flag will also be valid here. The new parameter is passed
> down through the calls and applied (after masking invalid bits) once the
> thread is created.
> 
> Pavel has seen the code and requested that I send it.
> 
> Regards,
> 
> Nigel
> 
> diff -ruN linux-2.6.8-rc1-mm1/drivers/acpi/osl.c linux-2.6.8-rc1-mm1-kthread_refrigerator/drivers/acpi/osl.c
> --- linux-2.6.8-rc1-mm1/drivers/acpi/osl.c	2004-07-28 16:37:46.000000000 +1000
> +++ linux-2.6.8-rc1-mm1-kthread_refrigerator/drivers/acpi/osl.c	2004-07-28 16:43:48.000000000 +1000
> @@ -81,7 +81,7 @@
>  		return AE_NULL_ENTRY;
>  	}
>  #endif
> -	kacpid_wq = create_singlethread_workqueue("kacpid");
> +	kacpid_wq = create_singlethread_workqueue("kacpid", 0);

hm.  In some ways I'd prefer to see new
create_singlethread_workqueue_freezer(char *) or whatever, rather than
adding an extra argument.  That's neater, smaller code and
forward-compatible.

But then again, the advantage of breaking the build for unconverted code is
that it makes people think about what their threads should be doing, so
let's go your way.

The one concern I'd have is that $RANDOM_KERNEL_DEVELOPER probably doesn't
have a clue whether or not his kernel thread should be setting PF_NOFREEZE.
What are the guidelines here?

wrt your "Add missing refrigerator support" patch: I'll suck that up, but
be aware that there's a big i2o patch in -mm which basically rips out the
driver which you just fixed up.  Perhaps you can send Markus Lidel
<Markus.Lidel@shadowconnect.com> and I a fix for that version of the driver
sometime?


  reply	other threads:[~2004-07-28 21:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  7:22 Nigel Cunningham
2004-07-28 21:20 ` Andrew Morton [this message]
2004-07-28 22:25   ` Nigel Cunningham
2004-07-28 22:30   ` Felipe Alfaro Solana
2004-07-28 22:27     ` Nigel Cunningham
2004-07-28 22:36     ` Nigel Cunningham
2004-07-28 23:21       ` Felipe Alfaro Solana
2004-07-29  0:46         ` Nigel Cunningham
2004-07-29 10:02           ` Felipe Alfaro Solana
2004-07-29 12:11             ` Nigel Cunningham
2004-07-29 16:10               ` Felipe Alfaro Solana
2004-07-29 22:39                 ` Nigel Cunningham
2004-07-30  8:12                   ` Felipe Alfaro Solana
2004-07-29 22:57           ` Felipe Alfaro Solana
2004-07-29 23:01             ` Nigel Cunningham
2004-07-29 19:04 ` Pavel Machek
2004-07-29 22:24   ` Nigel Cunningham
2004-07-29 22:44     ` Pavel Machek
2004-07-29 22:46       ` Nigel Cunningham
2004-07-29 23:25       ` [Patch] Per kthread freezer flags (Version 2) Nigel Cunningham
2004-07-30  9:18         ` Pavel Machek
2004-07-31 16:53         ` Felipe Alfaro Solana
2004-07-30 12:11       ` [Patch] Per kthread freezer flags Peter Osterlund
2004-07-30 22:15         ` Nigel Cunningham

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=20040728142026.79860177.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncunningham@linuxmail.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

all inboxes | Powered by JetHome®