Messages in this thread | | | Date | Fri, 29 Jun 2007 17:36:58 +0400 | From | Alexey Kuznetsov <> | Subject | Re: [RFC PATCH 0/6] Convert all tasklets to workqueues |
| |
Hello!
> I felt that three calls to tasklet_disable were better than a gazillion calls to > spin_(un)lock.
It is not better.
Actually, it also has something equivalent to spinlock inside. It raises some flag and waits for completion of already running tasklets (cf. spin_lock_bh). And if tasklet_schedule happens while it is disabled, it tries to take that lock gazillion of times until the tasklet is reenabled back.
Old days that was acceptable, you had not gazillion of attempts but just a few, but since some time (also old already) it became disasterous.
It is really better just to avoid calling tasklet_schedule(), when you do not want it to be executed. :-)
Alexey - 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/
| |