From owner-svn-src-stable-12@freebsd.org Tue May 12 18:48:09 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 275ED2F7B24 for ; Tue, 12 May 2020 18:48:09 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49M6J81rMXz4f1g for ; Tue, 12 May 2020 18:48:07 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-qk1-x72c.google.com with SMTP id f83so14730614qke.13 for ; Tue, 12 May 2020 11:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VqSOR7xir5DlzTE/w2zqvXBf1w0EvUeSqL6on8GbBWc=; b=0ON7CwaIyfmuI3Eaa8EclC+SxPcYQVH6s006WWmj2Y4a0Y2HFjrjvhg+W7yJnOyZBn iOh5YsdIM8ZonVWTU1SQVGda1FssWaK8YYh7rKbowXhyljkp9CtXPRIWZdkBCeM0CTSH V6HSxZuZzpu4aPeBB3zW7huybkVA8zFYkyZsJn8KHKWmXcE2kYdDeBCmNIPuqsnKS31E /hevbidEeYkU0M9gNkcQFrPpFDREvTLHMDENks5tD0Mz2QRvwxRTSir7FNnVW4DXg147 3ueaypfIE7+eAiSkKkMtWuGzF6L9hCxxlru4PRMTx4EBQ72H6Or0YQ/EicUsduRuOes1 eTcA== 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:content-transfer-encoding; bh=VqSOR7xir5DlzTE/w2zqvXBf1w0EvUeSqL6on8GbBWc=; b=cQep58uqe1t2DBLEVxc1VjdKQ+w5jUl/mqJ4jIpw+ECp9UNnUTJtP9Je7/hlp/QwHM r505c0Fg5gE7av64vwoOcDnWHvSLWD8QhSReKmN1uPKjpA+ueSAoz2pItr21ycB2JbY7 4G1UFZvTCaiAcOyhu9xXMi0sq5Nj04FJSktnvdYpRlhBdQDz/d0PxbsvYuDWSYrusjGs OxTuTSXbLIWQnNkqHLzkLn951I3fsk+o6E2cfR9ayP/Ig0ryF/75NIJb0TamEvPSKY7o miripGxuwMZvJXbTZ2uvi8gH7r+OB5lW2SzPTSTs2p8MQNB8O0zBbGRBAtUIJaQZGTpg 5fxQ== X-Gm-Message-State: AGi0Puav389MZuuXPEZVfCV9STKtgkW7cIPjYQ8Z4p8Z/U/27+5oiuj4 v6QBlDff+bK73hK0etR3vVH1H7+S71c0yWAamqQS9Q== X-Google-Smtp-Source: APiQypInoIHT71/2EE/BYwdOsDJDJlLQ06RpTGllW1TQz2aQsM54Jj9UgY/IJjs19+cgP55rVH+eYTYqm8lbhgcdIno= X-Received: by 2002:a37:a0d5:: with SMTP id j204mr22603596qke.128.1589309287030; Tue, 12 May 2020 11:48:07 -0700 (PDT) MIME-Version: 1.0 References: <202005121844.04CIiftV032406@repo.freebsd.org> In-Reply-To: <202005121844.04CIiftV032406@repo.freebsd.org> From: Marcin Wojtas Date: Tue, 12 May 2020 20:47:56 +0200 Message-ID: Subject: Re: svn commit: r360985 - stable/12/sys/dev/ena To: Marcin Wojtas Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49M6J81rMXz4f1g X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=0ON7CwaI; dmarc=none; spf=none (mx1.freebsd.org: domain of mw@semihalf.com has no SPF policy when checking 2607:f8b0:4864:20::72c) smtp.mailfrom=mw@semihalf.com X-Spamd-Result: default: False [-4.29 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-stable-12@freebsd.org]; DMARC_NA(0.00)[semihalf.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[c.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.99)[ip: (-9.13), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.42), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 18:48:09 -0000 wt., 12 maj 2020 o 20:44 Marcin Wojtas 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