From: Eric Dumazet <eric.dumazet@gmail.com>
To: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
Cc: opurdila@ixiacom.com, netdev@vger.kernel.org
Subject: Re: udp: break from the lookup when hitting the maximum score value
Date: Fri, 23 Oct 2009 18:57:32 +0200 [thread overview]
Message-ID: <4AE1E07C.5030502@gmail.com> (raw)
In-Reply-To: <200910231936.16022.lgrijincu@ixiacom.com>
Lucian Adrian Grijincu a écrit :
> Before udp hashes were converted to rcu in
> udp: introduce struct udp_table and multiple spinlocks
> 645ca708f936b2fbeb79e52d7823e3eb2c0905f8
> we stopped searching in list upon hitting the maximum score value (which is
> 9).
>
> This got removed in the conversion to rcu.
> I'm not sure whether this was intentional or it just slipped by.
>
> As far as I understand it this does not interfere with the lockless rcu: there
> is another score check the result will have to pass and if it doesn't have a
> score of 9 (which will be the value of badness) we'll just restart the lookup.
>
> Even if the node was deleted from the chain and reclaimed at a later time, if
> at the second score test we have value 9 again, we can still return with this
> result.
>
> Am I missing something?
>
>
This was intentional.
This never happens in practice and slowdown lookups.
(To reach score 9, your UDP socket must be connected, and bound to a device)
Most developpers dont even know UDP socket can be connected...
We added large hashtables in commit f86dcc5aa8c7908f2c287e7a211228df599e3e71
(udp: dynamically size hash tables at boot time), so average chain length should
be small anyway...
prev parent reply other threads:[~2009-10-23 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 16:36 udp: break from the lookup when hitting the maximum score value Lucian Adrian Grijincu
2009-10-23 16:57 ` Eric Dumazet [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=4AE1E07C.5030502@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=lgrijincu@ixiacom.com \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.