[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181102.233138.738200505012734856.davem@davemloft.net>
Date: Fri, 02 Nov 2018 23:31:38 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: mk.singh@...cle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, mkubecek@...e.cz,
j.vosburgh@...il.com, vfalico@...il.com, andy@...yhouse.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bonding:avoid repeated display of same link status
change
From: mk.singh@...cle.com
Date: Wed, 31 Oct 2018 16:27:28 +0530
> - if (slave->delay) {
> + if (slave->delay &&
> + !atomic64_read(&bond->rtnl_needed)) {
...
> + !atomic64_read(&bond->rtnl_needed)) {
...
> + atomic64_set(&bond->rtnl_needed, 1);
...
> + atomic64_set(&bond->rtnl_needed, 0);
...
> @@ -229,6 +229,7 @@ struct bonding {
> struct dentry *debug_dir;
> #endif /* CONFIG_DEBUG_FS */
> struct rtnl_link_stats64 bond_stats;
> + atomic64_t rtnl_needed;
There is nothing "atomic" about a value that is only set and read.
And using a full 64-bit value for something taking on only '0' and
'1' is unnecessary as well.
Powered by blists - more mailing lists