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] [day] [month] [year] [list]
Date:	Tue, 15 Dec 2009 22:00:24 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	chavey@...gle.com
CC:	davem@...emloft.net, netdev@...r.kernel.org, therbert@...gle.com
Subject: Re: [PATCH] Add rtnetlink init_rcvwnd to set the TCP initial receive
 window

Le 15/12/2009 21:37, chavey@...gle.com a écrit :
> Add rtnetlink init_rcvwnd to set the TCP initial receive window size
> advertised by passive and active TCP connections.
> The current Linux TCP implementation limits the advertised TCP initial
> receive window to the one prescribed by slow start. For short lived
> TCP connections used for transaction type of traffic (i.e. http
> requests), bounding the advertised TCP initial receive window results
> in increased latency to complete the transaction.
> Support for setting initial congestion window is already supported
> using rtnetlink init_cwnd, but the feature is useless without the
> ability to set a larger TCP initial receive window.
> The rtnetlink init_rcvwnd allows increasing the TCP initial receive
> window, allowing TCP connection to advertise larger TCP receive window
> than the ones bounded by slow start.
> 
> Signed-off-by: Laurent Chavey <chavey@...gle.com>
> ---

> diff --git a/include/net/dst.h b/include/net/dst.h
> index 5a900dd..ac7a116 100644
> --- a/include/net/dst.h
> +++ b/include/net/dst.h
> @@ -78,21 +78,13 @@ struct dst_entry
>  	__u32			__pad2;
>  #endif
>  
> -
>  	/*
> -	 * Align __refcnt to a 64 bytes alignment
> +	 * Align client references, __refcnt to a 64 bytes alignment
>  	 * (L1_CACHE_SIZE would be too much)
> -	 */
> -#ifdef CONFIG_64BIT
> -	long			__pad_to_align_refcnt[2];
> -#else
> -	long			__pad_to_align_refcnt[1];
> -#endif
> -	/*
>  	 * __refcnt wants to be on a different cache line from
>  	 * input/output/ops or performance tanks badly
>  	 */
> -	atomic_t		__refcnt;	/* client references	*/
> +	atomic_t		__refcnt __attribute__((__aligned__(64)));

Please dont do that.

There is a reason for not hiding holes in this structure.

Next time someone wants to add a new metric... bang... 64 bytes silently added...

->
#ifdef CONFIG_64BIT
	long			__pad_to_align_refcnt[1];
#endif


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