Date: Tue, 12 May 2020 20:47:56 +0200 From: Marcin Wojtas <mw@semihalf.com> To: Marcin Wojtas <mw@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r360985 - stable/12/sys/dev/ena Message-ID: <CAPv3WKddVB7Tr%2BG0b%2B-jWsCfYBXfu7P252GAbk7YVzkL_CWW9A@mail.gmail.com> In-Reply-To: <202005121844.04CIiftV032406@repo.freebsd.org> References: <202005121844.04CIiftV032406@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
wt., 12 maj 2020 o 20:44 Marcin Wojtas <mw@freebsd.org> napisa=C5=82(a): > > Author: mw > Date: Tue May 12 18:44:41 2020 > New Revision: 360985 > URL: https://svnweb.freebsd.org/changeset/base/360985 > > Log: > MFC r360777: Optimize ENA Rx refill for low memory conditions > > Sometimes, especially when there is not much memory in the system left, > allocating mbuf jumbo clusters (like 9KB or 16KB) can take a lot of tim= e > and it is not guaranteed that it'll succeed. In that situation, the > fallback will work, but if the refill needs to take a place for a lot o= f > descriptors at once, the time spent in m_getjcl looking for memory can > cause system unresponsiveness due to high priority of the Rx task. This > can also lead to driver reset, because Tx cleanup routine is being > blocked and timer service could detect that Tx packets aren't cleaned > up. The reset routine can further create another unresponsiveness - Rx > rings are being refilled there, so m_getjcl will again burn the CPU. > This was causing NVMe driver timeouts and resets, because network drive= r > is having higher priority. > > Instead of 16KB jumbo clusters for the Rx buffers, 9KB clusters are > enough - ENA MTU is being set to 9K anyway, so it's very unlikely that > more space than 9KB will be needed. > > However, 9KB jumbo clusters can still cause issues, so by default the > page size mbuf cluster will be used for the Rx descriptors. This can ha= ve a > small (~2%) impact on the throughput of the device, so to restore > original behavior, one must change sysctl "hw.ena.enable_9k_mbufs" to > "1" in "/boot/loader.conf" file. > > As a part of this patch (important fix), the version of the driver > was updated to v2.1.2. > For the record - on stable/12 the version was bumped to 0.8.5 with this com= mit. Marcin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPv3WKddVB7Tr%2BG0b%2B-jWsCfYBXfu7P252GAbk7YVzkL_CWW9A>