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, 26 May 2015 10:19:18 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Tom Herbert <tom@...bertland.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/3] net: Add cache alignment in sock_common
 for socket lookup fields

On Tue, 2015-05-26 at 09:34 -0700, Tom Herbert wrote:
> Use ____cacheline_aligned_in_smp to keep the fields used on socket
> lookup in their own cachelines. These are read only fields and will
> be often accessed on accross CPUs (would be very common with
> SO_REUSEPORT for instance).
> 
> Signed-off-by: Tom Herbert <tom@...bertland.com>
> ---
>  include/net/sock.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/sock.h b/include/net/sock.h
> index 26c1c31..bcf6114 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -211,7 +211,13 @@ struct sock_common {
>  		struct hlist_node	skc_node;
>  		struct hlist_nulls_node skc_nulls_node;
>  	};
> -	int			skc_tx_queue_mapping;
> +
> +	/* Cachelines above this point are read mostly and are used in socket
> +	 * lookup.
> +	 */
> +	int			skc_tx_queue_mapping
> +				____cacheline_aligned_in_smp;
> +
>  	atomic_t		skc_refcnt;
>  	/* private: */
>  	int                     skc_dontcopy_end[0];

No, we do not want to increase the size of sock_common with such a
hammer.

I am pretty sure you never tested this patch, since you placed the
attribute at the wrong place anyway.




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