Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "\"Oleg A. Arkhangelsky\"" <sysoleg@yandex.ru>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6 1/2] mq: support for bonding
Date: Sat, 27 Feb 2010 17:29:14 +0100	[thread overview]
Message-ID: <1267288154.9082.23.camel@edumazet-laptop> (raw)
In-Reply-To: <310461267277260@webmail48.yandex.ru>

Le samedi 27 février 2010 à 16:27 +0300, "Oleg A. Arkhangelsky" a
écrit :
> 
> Make bonding driver multiqueue aware.
> 

I wish it could be true :)

> Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru> 
> 
> ---
> 
>  drivers/net/bonding/bond_main.c |    5 +++--
>  drivers/net/bonding/bonding.h   |    1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 430c022..ea4ff33 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -4928,8 +4928,9 @@ int bond_create(struct net *net, const char *name)
>  
>  	rtnl_lock();
>  
> -	bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "",
> -				bond_setup);
> +	bond_dev = alloc_netdev_mq(sizeof(struct bonding), name ? name : "",
> +				bond_setup,
> +				min_t(u32, BOND_MAX_TX_QUEUES, num_online_cpus()));
>  	if (!bond_dev) {
>  		pr_err("%s: eek! can't alloc netdev!\n", name);
>  		res = -ENOMEM;
> diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
> index 257a7a4..4a6cfb4 100644
> --- a/drivers/net/bonding/bonding.h
> +++ b/drivers/net/bonding/bonding.h
> @@ -29,6 +29,7 @@
>  #define DRV_DESCRIPTION	"Ethernet Channel Bonding Driver"
>  
>  #define BOND_MAX_ARP_TARGETS	16
> +#define BOND_MAX_TX_QUEUES	8 
>  
>  #define IS_UP(dev)					   \
>  	      ((((dev)->flags & IFF_UP) == IFF_UP)	&& \
> 
> ---
> 

Hi Oleg

1) Could you explain why this arbitrary value (8) was chosen ?

My dev machine has 16 cpus, and my network card has 16 queues per NIC

2) This multi queue support is not a real one, since bond driver is
currently using a per device central lock (bond->lock and
bond->curr_slave_lock).
Every xmit has to get this lock(s) and performance is not optimal.




  reply	other threads:[~2010-02-27 16:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 13:27 [PATCH net-next-2.6 1/2] mq: support for bonding "Oleg A. Arkhangelsky"
2010-02-27 16:29 ` Eric Dumazet [this message]
2010-02-28  8:25   ` "Oleg A. Arkhangelsky"
2010-02-28  9:05     ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267288154.9082.23.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sysoleg@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox