lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Dec 2013 10:29:11 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Tom Herbert <therbert@...gle.com>
Cc:	davem@...emloft.net, edumazet@...gle.com, netdev@...r.kernel.org
Subject: Re: PATCH] net: Cache align dst refcnt

On Tue, 2013-12-17 at 10:15 -0800, Tom Herbert wrote:
> ipv4_dst_check is coming up very high in perf top for TCP_RR tests and
> it really is not doing much interesting. Looks like we have false
> sharing with dst->refcnt. This patch cache aligns refcnt. There were
> already some comments in the code that refcnt needs to be cache aligned.
> 
> Signed-off-by: Tom Herbert <therbert@...gle.com>
> ---
>  include/net/dst.h | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)

This is not needed. I wonder how you tested this.

Problem was solved in commit 5635c10d976716
("net: make sure struct dst_entry refcount is aligned on 64 bytes")

If this BUILD_BUG_ON() doesn't work for you, we should investigate !

static inline void dst_hold(struct dst_entry *dst)
{
        /*
         * If your kernel compilation stops here, please check
         * __pad_to_align_refcnt declaration in struct dst_entry
         */
        BUILD_BUG_ON(offsetof(struct dst_entry, __refcnt) & 63);
        atomic_inc(&dst->__refcnt);
}

Thanks


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ