From nobody Wed Jun 02 11:57:27 2021 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 67D04EFB9A3 for ; Wed, 2 Jun 2021 11:57:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fw6w82RhJz4vdd for ; Wed, 2 Jun 2021 11:57:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CD7516986 for ; Wed, 2 Jun 2021 11:57:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 152BvS67040783 for ; Wed, 2 Jun 2021 11:57:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 152BvSBU040782 for net@FreeBSD.org; Wed, 2 Jun 2021 11:57:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 256375] iflib/if_em: unplugging network cable causes huge KTorrent slowdown Date: Wed, 02 Jun 2021 11:57:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: iflib, performance X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danfe@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256375 Bug ID: 256375 Summary: iflib/if_em: unplugging network cable causes huge KTorrent slowdown Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: iflib, performance Severity: Affects Only Me Priority: --- Component: kern Assignee: net@FreeBSD.org Reporter: danfe@FreeBSD.org Created attachment 225494 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D225494&action= =3Dedit procstat -kk output I'm experiencing strange and very prominent performance loss with KTorrent = when unplugging Ethernet cable from em0, that is, switch to WiFi: it now takes several tens seconds for it to update the window contents, react to mouse clicks, and transfer speeds drop down to single bytes per second. At this time, the ktorrent process, as displayed by top(1), is in "iflib" state whi= ch occasionally briefly changes to "e1000_". But once I plug the network cable back, everything goes back to normal, and= the process returns to "select" state like it should. This happens on Lenovo L= 470 laptop with the following NIC: em0@pci0:0:31:6: class=3D0x020000 rev=3D0x21 hdr=3D0x00 vendor=3D0x8= 086 device=3D0x15d8 subvendor=3D0x17aa subdevice=3D0x505f vendor =3D 'Intel Corporation' device =3D 'Ethernet Connection (4) I219-V' class =3D network subclass =3D ethernet Both today's kernel and my normal Jan/Feb'ish kernel behave identically. T= he driver from `net/intel-em-kmod' port does not exhibit this problem. I'm attaching procstat -kk $ktorrent_pid output, in case it could be useful. T= his line looks suspicious as if something is holding the lock: mi_switch+0xc1 _sx_xlock_hard+0x3d1 iflib_media_status+0xf2 ifmedia_ioctl+0= x16a ifhwioctl+0x2bd ifioctl+0x48d kern_ioctl+0x23b sys_ioctl+0xf6 amd64_syscall+0x100 fast_syscall_common+0xf8 Please advise on any other debug information I could provide which may help= to track the bug down and fix it. --=20 You are receiving this mail because: You are the assignee for the bug.=