From: David Miller <davem@davemloft.net>
To: andi@firstfloor.org
Cc: dada1@cosmosbay.com, netdev@vger.kernel.org
Subject: Re: [PATCH] NET : rt_check_expire() can take a long time, add a cond_resched()
Date: Thu, 15 Nov 2007 00:52:08 -0800 (PST) [thread overview]
Message-ID: <20071115.005208.60086049.davem@davemloft.net> (raw)
In-Reply-To: <p73r6isc6ev.fsf@bingen.suse.de>
From: Andi Kleen <andi@firstfloor.org>
Date: Thu, 15 Nov 2007 08:30:16 +0100
> Eric Dumazet <dada1@cosmosbay.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.
prev parent reply other threads:[~2007-11-15 8:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 21:34 [PATCH] NET : rt_check_expire() can take a long time, add a cond_resched() Eric Dumazet
2007-11-15 0:13 ` David Miller
2007-11-15 7:30 ` Andi Kleen
2007-11-15 7:37 ` Herbert Xu
2007-11-15 8:25 ` Eric Dumazet
2007-11-15 8:57 ` David Miller
2007-11-17 13:08 ` Andi Kleen
2007-11-17 16:23 ` Eric Dumazet
2007-11-17 21:46 ` Andi Kleen
2007-11-18 0:27 ` David Miller
2007-11-15 8:52 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071115.005208.60086049.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andi@firstfloor.org \
--cc=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).