From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Kumar Singh Subject: RE: [PATCH] bonding:avoid repeated display of same link status change Date: Thu, 25 Oct 2018 02:21:05 -0700 (PDT) Message-ID: References: <20181023152924.24033-1-mk.singh@oracle.com> <65f98009-1ce0-d6fd-06dc-233aa115abc9@gmail.com> <20181023162613.GA22291@unicorn.suse.cz> <20181023163825.GB22291@unicorn.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: =?utf-8?B?TWFoZXNoIEJhbmRld2Fy?= =?utf-8?B?ICjgpK7gpLngpYfgpLYg4KSs4KSC4KSh4KWH4KS14KS+4KSwKQ==?= , linux-netdev , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , linux-kernel@vger.kernel.org To: Michal Kubecek , Eric Dumazet Return-path: In-Reply-To: <20181023163825.GB22291@unicorn.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > -----Original Message----- > From: Michal Kubecek [mailto:mkubecek@suse.cz] > Sent: 23 =E0=A4=85=E0=A4=95=E0=A5=8D=E0=A4=A4=E0=A5=82=E0=A4=AC=E0=A4=B0 = 2018 22:08 > To: Eric Dumazet > Cc: Mahesh Bandewar (=E0=A4=AE=E0=A4=B9=E0=A5=87=E0=A4=B6 =E0=A4=AC=E0=A4= =82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4=BE=E0=A4=B0); Manish Kumar Singh; linu= x-netdev; Jay > Vosburgh; Veaceslav Falico; Andy Gospodarek; David S. Miller; linux- > kernel@vger.kernel.org > Subject: Re: [PATCH] bonding:avoid repeated display of same link status > change >=20 > On Tue, Oct 23, 2018 at 06:26:14PM +0200, Michal Kubecek wrote: > > On Tue, Oct 23, 2018 at 09:10:44AM -0700, Eric Dumazet wrote: > > > > > > > > > On 10/23/2018 08:54 AM, Mahesh Bandewar (=E0=A4=AE=E0=A4=B9=E0=A5=87= =E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4=BE=E0=A4=B0) = wrote: > > > > > > > Atomic operations are expensive (on certain architectures) and miim= on > > > > runs quite frequently. Is the added cost of these atomic operations > > > > even worth just to avoid *duplicate info* messages? This seems like= a > > > > overkill! > > > > > > atomic_read() is a simple read, no atomic operation involved. > > > > > > Same remark for atomic_set() > > > > Which makes me wonder if the patch really needs atomic_t. >=20 > IMHO it does not. AFAICS multiple instances of bond_mii_monitor() cannot > run simultaneously for the same bond so that there doesn't seem to be > anything to collide with. (And if they could, we would need to test and > set the flag atomically in bond_miimon_inspect().) >=20 Yes, Michal, we are inline with your understanding. when the -original- patch was posted to upstream there was no -synchronizat= ion- nor -racing- addressing code was in read/write of this added filed, as= we -never- saw need for either. -only- writer of the added field is bond_mii_monitor. -only- reader of the added field is bond_miimon_inspect. -this writer & reader -never- can run concurrently. -writer invokes the reader. hence, imo uint_8 rtnl_needed is all what is needed; with bond_mii_monitor = doing rtnl_needed =3D 1; and bond_miimon_inspect doing if rtnl_needed. here is the gravity of the situation with multiple customers whose names in= cluding machine names redacted: 4353 May 31 02:38:57 hostname kernel: ixgbe 0000:03:00.0: removed PHC on p= 2p1 4354 May 31 02:38:57 hostname kernel: public: link status down for active = interface p2p1, disabling it in 100 ms 4355 May 31 02:38:57 hostname kernel: public: link status down for active = interface p2p1, disabling it in 100 ms 4356 May 31 02:38:57 hostname kernel: public: link status definitely down = for interface p2p1, disabling it 4357 May 31 02:38:57 hostname kernel: public: making interface p2p2 the ne= w active one 4358 May 31 02:38:59 hostname kernel: ixgbe 0000:03:00.0: registered PHC d= evice on p2p1 4359 May 31 02:39:00 hostname kernel: ixgbe 0000:03:00.0 p2p1: NIC Link is= Up 10 Gbps, Flow Control: RX/TX 4360 May 31 02:39:00 hostname kernel: public: link status up for interface= p2p1, enabling it in 200 ms 4361 May 31 02:39:00 hostname kernel: public: link status definitely up fo= r interface p2p1, 10000 Mbps full duplex 4362 May 31 02:45:37 hostname journal: Missed 217723 kernel messages 4363 May 31 02:45:37 hostname kernel: public: link status down for active = interface p2p2, disabling it in 100 ms =09--------------------- 11000+ APPROX SAME REPEATED MESSAGES in second =09--------------------- 15877 May 31 02:45:37 hostname kernel: public: link status down for active = interface p2p2, disabling it in 100 ms 15878 May 31 02:45:37 hostname kernel: public: link status definitely down = for interface p2p2, disabling it 15879 May 31 02:45:37 hostname kernel: public: making interface p2p1 the ne= w active one Thanks, Manish > Michal Kubecek