[lkml]   [2004]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch] Per kthread freezer flags
Pavel Machek <> writes:

> Hi!
> > > > - pd->cdrw.thread = kthread_run(kcdrwd, pd, "%s", pd->name);
> > > > + pd->cdrw.thread = kthread_run(kcdrwd, pd, "%s", 0, pd->name);
> > > > if (IS_ERR(pd->cdrw.thread)) {
> > > > printk("pktcdvd: can't start kernel thread\n");
> > > > ret = -ENOMEM;
> > >
> > > What if someone does swapon /dev/pktdvd0?
> >
> > Sorry. That's my ignorance. I thought the packet writer was only for
> > writing :>

pktcdvd devices are standard writable block devices, so you can use
them for anything you want, including swapping.

> Well, swapon /dev/pktdvd would be *very* bad idea as optical drives
> are very slow,

Agreed. Seek times before writes are in the range of 500-1000ms on my
drives. This will probably make your machine unresponsive for a *very*
long time when you start to swap to an optical disc.

It should work though, unless you wear out your disc before it's done
swapping, in which case nasty things will probably happen. I don't
think I/O errors on a swap device can be handled in a sane way by the

> but PF_NOFREEZE is more correct here.

Yes. What about this code in the main loop in kcdrwd?

/* make swsusp happy with our thread */
if (current->flags & PF_FREEZE)

Should it still be there when the task is marked as PF_NOFREEZE?

Peter Osterlund -
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 14:04    [W:0.040 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site