]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: syncookies: do not use getnstimeofday()
authorEric Dumazet <edumazet@google.com>
Thu, 20 Mar 2014 04:02:21 +0000 (21:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Mar 2014 20:22:42 +0000 (16:22 -0400)
commit1610d166b6873604e007804463ead3d45056487d
tree1e09d6a821d8b176f08da6a4e3c24c63a2b2c4ea
parent1a11f7fed8fd8fbc05ccc927ac4d567db1d61244
tcp: syncookies: do not use getnstimeofday()

While it is true that getnstimeofday() uses about 40 cycles if TSC
is available, it can use 1600 cycles if hpet is the clocksource.

Switch to get_jiffies_64(), as this is more than enough, and
go back to 60 seconds periods.

Fixes: 590e7caf21e3 ("tcp: syncookies: reduce cookie lifetime to 128 seconds")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h