All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Mahesh Bandewar <maheshb@google.com>,
	Jay Vosburgh <j.vosburgh@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	Veaceslav Falico <vfalico@gmail.com>,
	Nikolay Aleksandrov <nikolay@redhat.com>,
	David Miller <davem@davemloft.net>
Cc: Maciej Zenczykowski <maze@google.com>,
	netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v2 1/4] bonding: Handle notifications during work-queue processing gracefully
Date: Sun, 22 Mar 2015 20:53:27 +0300	[thread overview]
Message-ID: <550F0197.70800@cogentembedded.com> (raw)
In-Reply-To: <1426916361-18328-1-git-send-email-maheshb@google.com>

Hello.

On 3/21/2015 8:39 AM, Mahesh Bandewar wrote:

> RTNL is required for sending notifications and if rtnl can not be
> acquired, current code skips sending notification. This is especially
> bad if the monitoring values selected are large.

> This patch adds a bitmask and uses a bit per such work-queue and attempts
> to reschedule the work (aggressively) until notifications are sent out and
> then resumes the regular cycle.

> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> ---
>   include/net/bonding.h | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)

> diff --git a/include/net/bonding.h b/include/net/bonding.h
> index 0ac45b4f7f2a..fede3ab4bbcf 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
[...]
> @@ -259,6 +260,24 @@ struct bond_vlan_tag {
>   	unsigned short	vlan_id;
>   };
>
> +typedef enum {
> +	BOND_MII_NOTIF = 0,
> +	BOND_ARP_NOTIF,
> +	BOND_AD_NOTIF,
> +} bond_notif_pending_t;
> +
> +static inline bool bond_get_notif_pending(struct bonding *bond,
> +					  bond_notif_pending_t bit)
> +{
> +	return !!test_and_clear_bit(bit, &bond->notif_work_mask);
> +}
> +
> +static inline void bond_set_notif_pending(struct bonding *bond,
> +					  bond_notif_pending_t bit)
> +{
> +		set_bit(bit, &bond->notif_work_mask);

    One tab to many here. :-)

> +}
> +
>   /**
>    * Returns NULL if the net_device does not belong to any of the bond's slaves
>    *

WBR, Sergei

      reply	other threads:[~2015-03-22 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-21  5:39 [PATCH net-next v2 1/4] bonding: Handle notifications during work-queue processing gracefully Mahesh Bandewar
2015-03-22 17:53 ` Sergei Shtylyov [this message]

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=550F0197.70800@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=j.vosburgh@gmail.com \
    --cc=maheshb@google.com \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@redhat.com \
    --cc=vfalico@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.