From: Pavel Machek <pavel@suse.cz>
To: Martin Diehl <lists@mdiehl.de>
Cc: Jean Tourrilhes <jt@hpl.hp.com>,
Neil Brown <neilb@cse.unsw.edu.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Provide refrigerator support for irda
Date: Wed, 25 Jun 2003 20:45:10 +0200 [thread overview]
Message-ID: <20030625184509.GB5028@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0306250754150.1634-100000@notebook.home.mdiehl.de>
Hi!
> > > Without this patch, kIrDAd prevents my notebook from entering suspend
> > > mode.
>
> Are you talking about normal apm or acpi suspend or this swsusp
> thing?
ACPI and swsusp uses same mechanism. apm is different.
> > Wow ! I knew about microwave for 802.11b, but not about
> > refrigerator for IrDA.
>
> Inclined to say "me too".
:-).
> > The man for sir_kthread is Martin Diehl. He is much more
> > intimate with kernel tasks than me, and he has other sir_dev updates
> > in the pipeline.
>
> Admittedly I didn't care about swsusp so far. Given the big fat warning on
> top of Documentation/swsusp.txt I would not even try and i personally
> don't see what I would miss without swsusp.
That's okay... Just support your DMA-ing devices are supported.
> But of course, if we can make all parties happy, why not.
>
> > > + if (current->flags & PF_FREEZE)
> > > + refrigerator(PF_IOTHREAD);
> > > +
>
> I've tried to find some documentation about this - without success. So I
> have no idea why this might be needed and what it will do. Grepping for
> other kernel threads it looks like most of them use the same two lines.
> OTOH the irda thread is very similar to keventd's workqueue which do not
> use this. Not sure about the reason.
> Well, I'm thinking about making the irda thread using workqueue anyway, in
> which case the issue would either disappear or get shifted to
> kernel/workqueue.c.
> For the meantime, I think we should apply this if somebody would explain
> what's going on here.
We need kernel thread to sleep at defined place. Process running
userspace can be stopped any time, but processes running in kernel can
be only stopped at defined places, to avoid unexpected surprises.
If it is possible to sleep at place "a", and no locks needed for
suspend are held at "a", inserting
if (current->flags & PF_FREEZE)
refrigerator(PF_IOTHREAD);
is the right thing to do.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
next prev parent reply other threads:[~2003-06-25 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-25 1:56 Neil Brown
2003-06-25 2:10 ` Jean Tourrilhes
2003-06-25 6:18 ` Martin Diehl
2003-06-25 18:45 ` Pavel Machek [this message]
2003-06-26 13:27 ` Martin Diehl
2003-06-26 18:44 ` 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=20030625184509.GB5028@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@mdiehl.de \
--cc=neilb@cse.unsw.edu.au \
/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®