Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp272650imd; Fri, 2 Nov 2018 23:34:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5fIujQhtbFBc5hvwVMz+zsnL0W7Cm7zG3pCx/LrVDuF5WiJeKfEZfOsWvcnuRKqm3mc+HpD X-Received: by 2002:a62:85cb:: with SMTP id m72-v6mr14346628pfk.173.1541226848754; Fri, 02 Nov 2018 23:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541226848; cv=none; d=google.com; s=arc-20160816; b=fs/YCc4sp7R2wQcSmoZn5r/9PQxGoznFjLs4XSTuelnIHPuWwivoxP/qDIBTPkdSHM WNDxpYHRv0N+MhK886SG46mBa+1eYzqqhd9PZBfhiscrVy0iSqnh53Uh99I4e4jd4sJh f5FhdK2GzRgjKklh1bXhmqUJcutSfRZ7mnO5XeGSLPPN8QoHdl0zjOla7GzAAUW48sFU WTZrRvWTyM5YsToAJojQOyXYo4E9pGVDGY5xAhI7ypiVB3T824n4TKNERkF5GrBrPf/h TTA7Dh872SI9c7+RePg0kWCxC+2YYLpf6rsNBTyqhbj1NMpAhY2CQnFk5L/Fa7tBuXmd QMRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=7J1z2TH074Zm0hE391iR522Syp1Mu0I1g0heO/maunI=; b=sreXTdoALJDCQSwR9xHMaeCjlHUhKKhXBAmqiMeWgj8iAZvfQy5MTBsltBqiAjM9Un DBoC/N4+YimdDD7VqBAcHCZKlxeAL/m7hKDziEw+VZWZBCkFQls/7TXnRHPU4CzYo9J2 8dq89Mj0O3aDL1JchWgW7NVPF4wxm4ZSrj65Caxu0kBigcFqVaqL/KruWW9R7XuBpwew rG1P3MFzrPH/0Bl+tUwqH6BdYMY2mnw5VsiFtLTyOiYV+S/mvURzC+KxtpZRc2cyukjP OlvMjZVuUoyGLHrJWlvqbVc11e/mAuNQmbKWguHHzJLNqGWfV8pu+c5nocG6jaTczm0k z1Pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si41674777pfe.76.2018.11.02.23.33.54; Fri, 02 Nov 2018 23:34:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728020AbeKCPlx (ORCPT + 99 others); Sat, 3 Nov 2018 11:41:53 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:46106 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbeKCPlx (ORCPT ); Sat, 3 Nov 2018 11:41:53 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EEB3A14525CCC; Fri, 2 Nov 2018 23:31:38 -0700 (PDT) Date: Fri, 02 Nov 2018 23:31:38 -0700 (PDT) Message-Id: <20181102.233138.738200505012734856.davem@davemloft.net> To: mk.singh@oracle.com Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, mkubecek@suse.cz, 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 From: David Miller In-Reply-To: <20181031105729.7442-1-mk.singh@oracle.com> References: <20181031105729.7442-1-mk.singh@oracle.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 02 Nov 2018 23:31:39 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.