[sheepdog] [PATCH 3/6] sheep, sockfd cache: cache more than one FD for each node

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Jun 25 07:42:02 CEST 2012


At Sun, 24 Jun 2012 20:51:50 +0800,
Liu Yuan wrote:
> 
> From: Liu Yuan <tailai.ly at taobao.com>
> 
> This is inspired by the observation that each Guest can issue as much
> as 4 requests in one go.

Is it true for any kind of guest OSes?


> @@ -42,9 +56,10 @@ static struct sockfd_cache sockfd_cache = {
>  
>  struct sockfd_cache_entry {
>  	struct rb_node rb;
> -	int fd;
> -	uint8_t refcount;
>  	struct node_id nid;
> +#define SOCKFD_CACHE_MAX_FD	8 /* How many FDs we cache for one node */
> +	int fd[SOCKFD_CACHE_MAX_FD];
> +	uint8_t fd_in_use[SOCKFD_CACHE_MAX_FD];
>  };

SOCKFD_CACHE_MAX_FD should be 12 because the default redundancy level
is 3?

Thanks,

Kazutaka



More information about the sheepdog mailing list