Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2520244pxu; Fri, 18 Dec 2020 15:51:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx93TBqKgyqABy0kIXdOYkXCk7HMkBRWytrk3CGhGDfxz9XR2IejCWE3lUQc0vJYkFrrUyK X-Received: by 2002:a17:906:d930:: with SMTP id rn16mr6371903ejb.412.1608335518399; Fri, 18 Dec 2020 15:51:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608335518; cv=none; d=google.com; s=arc-20160816; b=pmDKNQkniLIAEpC1bjdr9okFiduAKx0DT92wNgXfxneHI9dKcDRzbcYe9eXumcOrJ1 gXH7YrftVHTumPiJk+nIY6t76fsb8V3pIifBr1ZSxXehNMKQz/vm6mN6XFzs0RkMbZL2 Ex5AfMzLjlj4Wb8oFz4JcJLN+M1MszZ4wlOn5W6hzTsQdb/fzquaRLIXwF0cEUxVU6Sr wpLDPfLJUYf3HPZrMYN/3EnL1g4ppDqXpnLw33QV0IuBDRcEQIvVJlTR0VMB/TJmaFMc pUqrarBXvneerKxp4BHNg+D7bEJ+k6EEoDUdka80Rw5hmXQY1EzabwC8dag51LARWS1Z DNOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+ltfjKp0a0CZjK5VqWOENgE7djMo2w8zSxVmcmLegAo=; b=D2wuULKL2bInCjgCysNLg54mw4FSWIVaUvYWrU9fTYRLI7EE57OBKxJfI6AY/ohMoO iDsLFnHd+JuJo2opdpZ/osyq9dEtltOXSa0OOMiNevKhIu5LseV6yCT/Rbiz46wJwBIp VxfZiA7g7Ohf4aSF1tUG/xhxIdEXkBQjTjmJOvT3KydqWNP7MxA6KVoniz7JZk/thku+ t2v6VdN3puMT7aAYqt8/gJDJZm3DsFLieHtrE4ti22gt6Kf2S0FRt8uc5o6p2F1odu2A S3ll1SKUzboqFMDnvHkDkzkybZTznKQJtaz7QqtXwp+b6JqemzQ+djwUku2ttys/adiI u7Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cCI35rG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 97si7215134edr.112.2020.12.18.15.51.35; Fri, 18 Dec 2020 15:51:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cCI35rG0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbgLRXuM (ORCPT + 99 others); Fri, 18 Dec 2020 18:50:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40345 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbgLRXuM (ORCPT ); Fri, 18 Dec 2020 18:50:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608335325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+ltfjKp0a0CZjK5VqWOENgE7djMo2w8zSxVmcmLegAo=; b=cCI35rG0EgMsIpBcQyllz8zUMtI09O8trpCaun2Fh6dkKNuRjd6hS0Kg4qLAO2g28ITRkM B2xIG1AR9Ce7yotaUG0VMXpXPT0nG18geAfSXlIswyPhOgUPMqYsrR0ktFQb7+D9IzzBHp ibgAzh57Nw5MJ1q+d1TL5CnWQWj04iA= Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-581-5f5NV1PGORWHY0mUEC87dA-1; Fri, 18 Dec 2020 18:48:43 -0500 X-MC-Unique: 5f5NV1PGORWHY0mUEC87dA-1 Received: by mail-oi1-f199.google.com with SMTP id f190so2096762oib.10 for ; Fri, 18 Dec 2020 15:48:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+ltfjKp0a0CZjK5VqWOENgE7djMo2w8zSxVmcmLegAo=; b=SFopJneFNDiLae72aawIAm8PgF24vunsPfNbCf/uBh6G42OG7uLQiueJPyCyPAmcWV xJ7mzEuaWPiBJB8OY0SSyPlnWu5IHU21W+DqPktdJoV0ZgtAKmMI/vcS+dRWBn2RHcSi gvqauwEqpDhC4X8iC5YNcy0Q1sUkp4SvxNBqrtuNaLNx/oc25pYhiVxnPJrxtE6tOYOE E3963XQyUe+cSXQcDF2O38APzvIjefaZk4YgX8cGeRwb2026higz3ZNAJvV96FA0eCmp 9ujsh0T68V4VpEGf3V43B0dhyFd5wXnXUi8WoCgoJaUJLRq8yCJqOVBPqTKoyESaIYK0 plFA== X-Gm-Message-State: AOAM532HPTAOQxEXyoL9kNM5kToiduzg2M6bCm0ERz/YCezalQJHRPN6 xrcs7Epb2LjhkVjdhn4ZgNn7G8KUViY4TH+AwaegYD8sWDMgJmPF1g365OkTOKaijwRFEwR57Qy c+tbjvbTzhCc+v1FVDWc4VW7xPdiOJYPaRFjIKA0U X-Received: by 2002:a9d:749a:: with SMTP id t26mr4581980otk.277.1608335323019; Fri, 18 Dec 2020 15:48:43 -0800 (PST) X-Received: by 2002:a9d:749a:: with SMTP id t26mr4581966otk.277.1608335322797; Fri, 18 Dec 2020 15:48:42 -0800 (PST) MIME-Version: 1.0 References: <20201205234354.1710-1-jarod@redhat.com> <11900.1607459690@famine> In-Reply-To: <11900.1607459690@famine> From: Jarod Wilson Date: Fri, 18 Dec 2020 18:48:32 -0500 Message-ID: Subject: Re: [PATCH net] bonding: reduce rtnl lock contention in mii monitor thread To: Jay Vosburgh Cc: LKML , Mahesh Bandewar , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Jakub Kicinski , Thomas Davis , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 3:35 PM Jay Vosburgh wrote: > > Jarod Wilson wrote: ... > >The addition of a case BOND_LINK_BACK in bond_miimon_commit() is somewhat > >separate from the fix for the actual hang, but it eliminates a constant > >"invalid new link 3 on slave" message seen related to this issue, and it's > >not actually an invalid state here, so we shouldn't be reporting it as an > >error. ... > In principle, bond_miimon_commit should not see _BACK or _FAIL > state as a new link state, because those states should be managed at the > bond_miimon_inspect level (as they are the result of updelay and > downdelay). These states should not be "committed" in the sense of > causing notifications or doing actions that require RTNL. > > My recollection is that the "invalid new link" messages were the > result of a bug in de77ecd4ef02, which was fixed in 1899bb325149 > ("bonding: fix state transition issue in link monitoring"), but maybe > the RTNL problem here induces that in some other fashion. > > Either way, I believe this message is correct as-is. For reference, with 5.10.1 and this script: #!/bin/sh slave1=ens4f0 slave2=ens4f1 modprobe -rv bonding modprobe -v bonding mode=2 miimon=100 updelay=200 ip link set bond0 up ifenslave bond0 $slave1 $slave2 sleep 5 while : do ip link set $slave1 down sleep 1 ip link set $slave1 up sleep 1 done I get this repeating log output: [ 9488.262291] sfc 0000:05:00.0 ens4f0: link up at 10000Mbps full-duplex (MTU 1500) [ 9488.339508] bond0: (slave ens4f0): link status up, enabling it in 200 ms [ 9488.339511] bond0: (slave ens4f0): invalid new link 3 on slave [ 9488.547643] bond0: (slave ens4f0): link status definitely up, 10000 Mbps full duplex [ 9489.276614] bond0: (slave ens4f0): link status definitely down, disabling slave [ 9490.273830] sfc 0000:05:00.0 ens4f0: link up at 10000Mbps full-duplex (MTU 1500) [ 9490.315540] bond0: (slave ens4f0): link status up, enabling it in 200 ms [ 9490.315543] bond0: (slave ens4f0): invalid new link 3 on slave [ 9490.523641] bond0: (slave ens4f0): link status definitely up, 10000 Mbps full duplex [ 9491.356526] bond0: (slave ens4f0): link status definitely down, disabling slave [ 9492.285249] sfc 0000:05:00.0 ens4f0: link up at 10000Mbps full-duplex (MTU 1500) [ 9492.291522] bond0: (slave ens4f0): link status up, enabling it in 200 ms [ 9492.291523] bond0: (slave ens4f0): invalid new link 3 on slave [ 9492.499604] bond0: (slave ens4f0): link status definitely up, 10000 Mbps full duplex [ 9493.331594] bond0: (slave ens4f0): link status definitely down, disabling slave "invalid new link 3 on slave" is there every single time. Side note: I'm not actually able to reproduce the repeating "link status up, enabling it in 200 ms" and never recovering from a downed link on this host, no clue why it's so reproducible w/another system. -- Jarod Wilson jarod@redhat.com