[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070629165247.GA457@tv-sign.ru>
Date: Fri, 29 Jun 2007 20:52:47 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Alexey Kuznetsov <kuznet@....inr.ac.ru>
Cc: Ingo Molnar <mingo@...e.hu>, Jeff Garzik <jeff@...zik.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Christoph Hellwig <hch@...radead.org>,
john stultz <johnstul@...ibm.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Dipankar Sarma <dipankar@...ibm.com>,
"David S. Miller" <davem@...emloft.net>, matthew.wilcox@...com
Subject: Re: [RFC PATCH 0/6] Convert all tasklets to workqueues
On 06/29, Alexey Kuznetsov wrote:
>
> > If I understand correctly, this is because tasklet_head.list is protected
> > by local_irq_save(), and t could be scheduled on another CPU, so we just
> > can't steal it, yes?
>
> Yes. All that code is written to avoid synchronization as much as possible.
Thanks!
>
> > If we use worqueues, we can change the semantics of tasklet_kill() so
> > that it really cancels an already scheduled tasklet.
> >
> > The question is: would it be the wrong/good change?
>
> If it does not add another usec to tasklet_schedule(), it would be good.
No, it won't slowdown tasklet_schedule(). Instead it will speedup tasklet_kill.
Steven, unless you have some objections, could you change tasklet_kill() ?
> +static inline void tasklet_kill(struct tasklet_struct *t)
> {
> - return test_bit(TASKLET_STATE_SCHED, &t->state);
> + flush_workqueue(ktaskletd_wq);
> }
Just change flush_workqueue(ktaskletd_wq) to cancel_work_sync(t-work).
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists