From: Manish Kumar Singh <mk.singh@oracle.com>
To: Michal Kubecek <mkubecek@suse.cz>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
linux-kernel@vger.kernel.org
Subject: RE: [PATCH] bonding:avoid repeated display of same link status change
Date: Tue, 20 Nov 2018 02:41:52 -0800 (PST) [thread overview]
Message-ID: <f44a64cc-c267-48e9-8838-4bc7c34fcbda@default> (raw)
In-Reply-To: <20181104194121.GA29914@unicorn.suse.cz>
> -----Original Message-----
> From: Michal Kubecek [mailto:mkubecek@suse.cz]
> Sent: 05 नवम्बर 2018 01:11
> To: David Miller
> Cc: Manish Kumar Singh; netdev@vger.kernel.org; eric.dumazet@gmail.com;
> j.vosburgh@gmail.com; vfalico@gmail.com; andy@greyhouse.net; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] bonding:avoid repeated display of same link status
> change
>
> On Fri, Nov 02, 2018 at 11:31:38PM -0700, David Miller wrote:
> > From: mk.singh@oracle.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.
>
> Part of the misunderstanding is caused by the fact that this is actually
> a v4 but not marked as such:
>
> v1: https://patchwork.ozlabs.org/patch/955789/
> v2: https://patchwork.ozlabs.org/patch/970421/
> v3: https://patchwork.ozlabs.org/patch/988241/
>
> When commenting v3, I didn't know about the v2 discussion where Eric
> Dumazet NACKed the patch because of potential conflict issues:
>
> https://patchwork.ozlabs.org/patch/970421/#1992397
> https://patchwork.ozlabs.org/patch/988241/#2017317
>
> On the other hand, there is no need for atomic64_t. Simple atomic_t
> (with explaining comment) would suffice. On architectures allowing
> atomic read/write for 32-bit integers, there would be no performance
> penalty. On architectures not allowing it, atomic_read() and
> atomic_set() are implemented to be safe.
Sorry for late response, I was off to work for couple of weeks.
v3: https://patchwork.ozlabs.org/patch/988241/ was sent with atomic_t and after seeing your comment, I sent it with atomic64_t.
Please let me know if v3 was fine ?
Thanks,
Manish
>
> Michal Kubecek
next prev parent reply other threads:[~2018-11-20 10:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 10:57 [PATCH] bonding:avoid repeated display of same link status change mk.singh
2018-11-03 6:31 ` David Miller
2018-11-04 19:41 ` Michal Kubecek
2018-11-20 10:41 ` Manish Kumar Singh [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-23 15:29 mk.singh
2018-10-23 15:54 ` Mahesh Bandewar (महेश बंडेवार)
2018-10-23 16:10 ` Eric Dumazet
2018-10-23 16:26 ` Michal Kubecek
2018-10-23 16:38 ` Michal Kubecek
2018-10-25 9:21 ` Manish Kumar Singh
2018-10-25 9:29 ` Michal Kubecek
2018-10-26 6:49 ` Manish Kumar Singh
2018-10-23 18:08 ` David Miller
2018-09-17 7:20 [PATCH] bonding: avoid " mk.singh
2018-09-17 14:38 ` Eric Dumazet
2018-09-18 5:05 ` Manish Kumar Singh
2018-09-18 14:00 ` Eric Dumazet
2018-09-24 7:05 ` Manish Kumar Singh
2018-10-22 7:29 ` Manish Kumar Singh
[not found] <1534191017-25630-1-git-send-email-rama.nichanamatlu@oracle.com>
2018-08-20 19:02 ` rama nichanamatlu
2018-08-09 21:12 rama nichanamatlu
2018-08-11 16:41 ` David Miller
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=f44a64cc-c267-48e9-8838-4bc7c34fcbda@default \
--to=mk.singh@oracle.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=j.vosburgh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox