[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071117.181313.217111568.davem@davemloft.net>
Date: Sat, 17 Nov 2007 18:13:13 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: dada1@...mosbay.com, netdev@...r.kernel.org
Subject: Re: [PATCH] IPV4 : Move ip route cache flush (secret_rebuild) from
softirq to workqueue
From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Sun, 18 Nov 2007 10:07:37 +0800
> On Sat, Nov 17, 2007 at 04:45:42PM -0800, David Miller wrote:
> >
> > Herbert, you asked about just nop'ing out cond_resched() when we're
> > doing real preemption.
> >
> > A lot of code goes:
> >
> > if (need_resched()) {
> > /* drop some locks, etc. */
> > cond_resched();
> > /* reacquire locks, etc. */
> > }
> >
> > So it has to do something even with real preemption enabled.
>
> Actually that shouldn't be necessary. Because things like spin_unlock
> does preempt_enable which in turn does:
>
> #define preempt_enable() \
> do { \
> preempt_enable_no_resched(); \
> barrier(); \
> preempt_check_resched(); \
> } while (0)
>
> when CONFIG_PREEMPT is enabled. So at least in this case the
> cond_resched call is superfluous.
I see what you mean, ok yes that would catch it.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists