From owner-svn-src-head@freebsd.org Fri Jan 24 17:05:37 2020 Return-Path: Delivered-To: svn-src-head@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 0B70C1F59C5; Fri, 24 Jan 2020 17:05:37 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4845B84zxBz4GxL; Fri, 24 Jan 2020 17:05:36 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 00OH5WhR013637 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 24 Jan 2020 09:05:32 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00OH5W9V013636; Fri, 24 Jan 2020 09:05:32 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Fri, 24 Jan 2020 09:05:32 -0800 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357004 - in head/sys: kern sys Message-ID: <20200124170532.GO1268@FreeBSD.org> References: <202001230124.00N1OlXi029506@repo.freebsd.org> <23f272a4-c997-a454-19d6-10392713e71f@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23f272a4-c997-a454-19d6-10392713e71f@selasky.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 4845B84zxBz4GxL X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.75)[-0.745,0]; NEURAL_HAM_LONG(-0.24)[-0.236,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 17:05:37 -0000 On Fri, Jan 24, 2020 at 10:24:53AM +0100, Hans Petter Selasky wrote: H> What you want to do here is right, but how it is implemented is wrong, H> in my opinion. H> H> 1) Remove intr_epoch_batch. Most network drivers use interrupt H> moderation, and a timeout of 1000 iterations can easily become 1 second H> under heavly load ! If a driver has interrupt moderation than epoch batching counter basically won't ever grow over 1. It kicks in only of driver doesn't have it, or receives interrupts at a very high rate. H> 2) You need to make a new request function for interrupts which take a H> pointer to an EPOCH and replace that IH_NET in hflags! Initially I did that way, but then pondered over this approach and have abandoned it. Most likely we will have just few globally recognized epochs in the kernel. And even less might be associated with interrupt handlers. Complexity and performance impact of using a pointer are noted by Drew in D23347. -- Gleb Smirnoff