Re: [Patch] Per kthread freezer flags

From: Peter Osterlund (petero2_at_telia.com)
Date: 07/30/04

  • Next message: Willy Tarreau: "Re: PATCH: VLAN support for 3c59x/3c90x"
    To: Pavel Machek <pavel@ucw.cz>
    Date:	30 Jul 2004 14:11:22 +0200
    
    

    Pavel Machek <pavel@ucw.cz> 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
    kernel.

    > 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)
                                    refrigerator(PF_FREEZE);

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

    -- 
    Peter Osterlund - petero2@telia.com
    http://w1.894.telia.com/~u89404340
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Willy Tarreau: "Re: PATCH: VLAN support for 3c59x/3c90x"

    Relevant Pages

    • Re: 2.6.4 on Alpha uninterruptible sleep of processes
      ... > The system starts swapping like crazy, most processes are in the D-state ... mentioned when processes begins to hang, all file operations like tail -f ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: [PATCH] remove dead drivers/ide/ppc/swarm.c
      ... > IDE bus must be always LE independently of system being LE or BE. ... > when system is BE swapping is also needed. ... Maciej W. Rozycki, Technical University of Gdansk, Poland + ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.0-test9 - poor swap performance on low end machines
      ... > even most modern servers, due to assumptions that are incorrect today ... Swapping out a 64kB process to a disk that does 180kB/s ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] userland swsusp
      ... filesystem code from grub. ... userspace could write the image to swap as the kernel ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: CELF interest in suspend-to-flash
      ... > Can flash be treated as a swap device at the moment? ... > the resume2= boot parameter. ... > for full time work, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)