Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp506510imu; Tue, 20 Nov 2018 02:42:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNT/384kRQLE9Lvw7pQVsHm0MQ6E48ZWt/w4EGib0dwLXGaV0g5VCvf0wa5emxeA1E4lLv X-Received: by 2002:a65:610d:: with SMTP id z13mr1413363pgu.427.1542710579315; Tue, 20 Nov 2018 02:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542710579; cv=none; d=google.com; s=arc-20160816; b=oGB8ObF9T0yY0mhehLVhYXBANiwumRbx5XaeQ0LoejS3/lklnG2jvzgq76ldTFaDwC 5uktKULNM9Je/095mNKY39MBFZiuRJtX3dlrEft4JAQk6qdsCXwfjPBqEny+XGPScmfF eoxfjVYCqLaAckRhEpBVi1rpXwsvWdela5Q4xwAiYu9lTCBqxqw+u6b79rLzrtPHwYOH +vCh6NWg8XTMGf3x9jMmlLdtTnTJ/fI44lMbXkcb6pm4CIkDrpSk+41SIUKcHYg3mpGI MOT1JPtCa4Nt2y3iMZwH+3rc/JuJrvvZeI9TofjmBGZRBTzEzyqHsRq9ZBoVX0Y++6rR 0iOw== 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:in-reply-to :references:subject:cc:to:from:date:message-id:mime-version :dkim-signature; bh=ZRvJh9x3cVXMK5NhxU36PEd9NnuY1dH0bUZ8xvCYRoY=; b=I1O6rwNRzObQMjE2pReI/sceQabkusTyCgj68yLNNdROgUmtLPX9iplLLFW16fjot/ Is4mkjsb1KqnSqhjJV4gCUUwmSN/ZJVFgXX+jGvzNR3m0y2rMo7OQfjI+uUjYVA8ffIh gh8ScUg+JcAvjKX5zKFTRf2T/9ae/iaF8CcK14fKl+MjYfWcr6wj1bJ1ehmymZdQCHcI X4nb/xDfyEvjmDy3+bZG2abIWkk6+ctsWm1CoT/oToelauWliaNDwxKYlHRRqcmymrv6 s3KwqStMeiE6EaMo0v/cx6ll0eqL+z2tV7T9Ax+5L8Kbu+mjVEErs2C9KuteORSOf+4J mSSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@oracle.com header.s=corp-2018-07-02 header.b=Q9JcuHaY; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184si3857446pgj.329.2018.11.20.02.42.43; Tue, 20 Nov 2018 02:42:59 -0800 (PST) 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; dkim=fail header.i=@oracle.com header.s=corp-2018-07-02 header.b=Q9JcuHaY; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728579AbeKTVKd (ORCPT + 99 others); Tue, 20 Nov 2018 16:10:33 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:48580 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbeKTVKd (ORCPT ); Tue, 20 Nov 2018 16:10:33 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAKAfM4F162972; Tue, 20 Nov 2018 10:41:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=ZRvJh9x3cVXMK5NhxU36PEd9NnuY1dH0bUZ8xvCYRoY=; b=Q9JcuHaYofS/5Li90jiJ7RysYSbo5qRgRp+wnhMNKzKfOL0cf+jgZc+MLV5+oAabj962 s3XIzo+nEGBG9Tu60GxamsSWj9U63CHJGEQHFOhpqxzBxywCSnyeDYBqai17rb90CPfI JkQHGpOZXSAzf7zjkdoKlNohSFBhvTj8zE1vx9G6k0sgqTeEx8hsqvd5WoVq9YM/HKe2 yaCnlH1bYQSeP1uyy166q/LyEdl6jhl5uBZKUaeODgNmtno1IvdCGdgwo9blSp23eD/3 99e4jH/xD3sNdWaaIJlk9RfhdCPh8zO3yvIJWbT1pJsEKDQ52SDzQ2iFuAsLSHx/7qTX +g== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2ntaxq36p9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Nov 2018 10:41:55 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAKAfsVT025681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Nov 2018 10:41:55 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wAKAfslY015062; Tue, 20 Nov 2018 10:41:54 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 20 Nov 2018 02:41:52 -0800 (PST) From: Manish Kumar Singh To: Michal Kubecek , David Miller 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 References: <20181031105729.7442-1-mk.singh@oracle.com> <20181102.233138.738200505012734856.davem@davemloft.net> <20181104194121.GA29914@unicorn.suse.cz> In-Reply-To: <20181104194121.GA29914@unicorn.suse.cz> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 14.0.7214.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9082 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811200097 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michal Kubecek [mailto:mkubecek@suse.cz] > Sent: 05 =E0=A4=A8=E0=A4=B5=E0=A4=AE=E0=A5=8D=E0=A4=AC=E0=A4=B0 2018 01:1= 1 > 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 >=20 > 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 > > > > > -=09=09=09if (slave->delay) { > > > +=09=09=09if (slave->delay && > > > +=09=09=09 !atomic64_read(&bond->rtnl_needed)) { > > ... > > > +=09=09=09 !atomic64_read(&bond->rtnl_needed)) { > > ... > > > +=09=09=09atomic64_set(&bond->rtnl_needed, 1); > > ... > > > +=09=09atomic64_set(&bond->rtnl_needed, 0); > > ... > > > @@ -229,6 +229,7 @@ struct bonding { > > > =09struct=09 dentry *debug_dir; > > > #endif /* CONFIG_DEBUG_FS */ > > > =09struct rtnl_link_stats64 bond_stats; > > > +=09atomic64_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. >=20 > Part of the misunderstanding is caused by the fact that this is actually > a v4 but not marked as such: >=20 > v1: https://patchwork.ozlabs.org/patch/955789/ > v2: https://patchwork.ozlabs.org/patch/970421/ > v3: https://patchwork.ozlabs.org/patch/988241/ >=20 > When commenting v3, I didn't know about the v2 discussion where Eric > Dumazet NACKed the patch because of potential conflict issues: >=20 > https://patchwork.ozlabs.org/patch/970421/#1992397 > https://patchwork.ozlabs.org/patch/988241/#2017317 >=20 > 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 ?=20 Thanks, Manish >=20 > Michal Kubecek