Re: cat /proc/net/tcp takes 0.5 seconds on x86_64
From: Hans de Goede <hidden>
Date: 2008-08-28 08:01:01
From: Hans de Goede <hidden>
Date: 2008-08-28 08:01:01
David Miller wrote:
From: Andi Kleen <redacted> Date: Thu, 28 Aug 2008 09:45:36 +0200quoted
quoted
When scanning route cache hash table, we can avoid taking locks for empty buckets.I'm not sure it's worth it in this case. A rcu_read_lock() is a nop (on non preemptible kernel) to very cheap (non atomic increment/decrement in cached task_struct)It's not one, it's at least two such increments, plus function calls, state checks, etc. since this is rcu_read_lock_bh().
I'm very happy to see some progress on this and this leading to even more optimalizations elsewhere, Thanks guys! Regards, Hans p.s. Can I please be removed from the CC, thanks!