linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mk.singh@oracle.com
Cc: netdev@vger.kernel.org, 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, 23 Oct 2018 11:08:02 -0700 (PDT)	[thread overview]
Message-ID: <20181023.110802.2298971732908535065.davem@davemloft.net> (raw)
In-Reply-To: <20181023152924.24033-1-mk.singh@oracle.com>

From: mk.singh@oracle.com
Date: Tue, 23 Oct 2018 20:59:24 +0530

> @@ -229,6 +229,7 @@ struct bonding {
>  	struct	 dentry *debug_dir;
>  #endif /* CONFIG_DEBUG_FS */
>  	struct rtnl_link_stats64 bond_stats;
> +	atomic_t rtnl_needed;

As mentioned by others, if the only operations you perform on a value
are set and read, using atomic_t is utterly and totally pointless.

I really have no idea what is achieved by using atomic_t in this set
of circumstances.

It is not guaranteeing that the value stays stable after you read it,
and it is not guaranteeing that another thread won't overwrite the
value you just set it to.

All of those things, if important, need proper synchronization.  An
atomic_t by itself will not do that for you.

  parent reply	other threads:[~2018-10-23 18:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 15:29 [PATCH] bonding:avoid repeated display of same link status change 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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-31 10:57 mk.singh
2018-11-03  6:31 ` David Miller
2018-11-04 19:41   ` Michal Kubecek
2018-11-20 10:41     ` Manish Kumar Singh
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

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=20181023.110802.2298971732908535065.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andy@greyhouse.net \
    --cc=j.vosburgh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mk.singh@oracle.com \
    --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;
as well as URLs for NNTP newsgroup(s).