Subject: Re: [PATCH] Add rtnetlink init_rcvwnd to set the TCP initial receive window

From: Eric Dumazet <[email-masked]>
Date: Tue, 15 Dec 2009 22:00:24 +0100

Le 15/12/2009 21:37, [email-masked] 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 <[email-masked]>
> ---

> 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