[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071115.005208.60086049.davem@davemloft.net>
Date: Thu, 15 Nov 2007 00:52:08 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: andi@...stfloor.org
Cc: dada1@...mosbay.com, netdev@...r.kernel.org
Subject: Re: [PATCH] NET : rt_check_expire() can take a long time, add a
cond_resched()
From: Andi Kleen <andi@...stfloor.org>
Date: Thu, 15 Nov 2007 08:30:16 +0100
> Eric Dumazet <dada1@...mosbay.com> writes:
> >
> > Using a "if (need_resched())" test before calling "cond_resched();" is
> > necessary to avoid spending too much time doing the resched check.
>
> The only difference between cond_resched() and if (need_resched())
> cond_resched() is one function call less and one might_sleep less. If
> the might_sleep or the function call are really problems (did you
> measure it? -- i doubt it somewhat) then it would be better to fix the
> generic code to either inline that or supply a __cond_resched()
> without might_sleep.
>
> A cheaper change might have been to just limit the number of buckets
> scanned.
Fix up unmap_vmas() too if this is done as it does a similar
need_resched() check too.
-
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