[lkml]   [2003]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Provide refrigerator support for irda

> > > 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)

is the right thing to do.

When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.069 / U:2.676 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site