From owner-svn-src-head@freebsd.org Mon Jan 27 20:21:09 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 902A122D14B; Mon, 27 Jan 2020 20:21:09 +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 4861NP0jm5z47df; Mon, 27 Jan 2020 20:21:08 +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 00RKL1tb037213 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 27 Jan 2020 12:21:01 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00RKKxd3037212; Mon, 27 Jan 2020 12:20:59 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 27 Jan 2020 12:20:59 -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: <20200127202059.GV1268@FreeBSD.org> References: <202001230124.00N1OlXi029506@repo.freebsd.org> <23f272a4-c997-a454-19d6-10392713e71f@selasky.org> <20200124170532.GO1268@FreeBSD.org> <7d7db96d-26b1-1d2b-9f8d-a3f8fbe8c33c@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d7db96d-26b1-1d2b-9f8d-a3f8fbe8c33c@selasky.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 4861NP0jm5z47df X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.59 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.74)[-0.742,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.85)[-0.847,0] 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: Mon, 27 Jan 2020 20:21:09 -0000 Hans, On Fri, Jan 24, 2020 at 08:21:54PM +0100, Hans Petter Selasky wrote: H> > If a driver has interrupt moderation than epoch batching counter H> > basically won't ever grow over 1. It kicks in only of driver doesn't H> > have it, or receives interrupts at a very high rate. H> H> Depending on the load an interrupt imposes, this batching counter may H> cause epochs to last for a long time. Have you considered using ticks H> for this instead? I.E. if the congestion lasts more than two ticks, then H> re-acquire the EPOCH? H> H> For example if the network controller spends more time processing H> packets then there is between interrupts, then this unconditional 1000x H> thing can be quite dangerous. I didn't try using ticks instead of execution counter. It could be ticks would be better. Needs more experiments. H> > H> 2) You need to make a new request function for interrupts which take a H> > H> pointer to an EPOCH and replace that IH_NET in hflags! H> > H> > Initially I did that way, but then pondered over this approach and have H> > abandoned it. Most likely we will have just few globally recognized H> > epochs in the kernel. And even less might be associated with interrupt H> > handlers. Complexity and performance impact of using a pointer are H> > noted by Drew in D23347. H> H> Let not the network epoch become the new Giant of EPOCH's. There might H> be realtime constraints for EPOCH's aswell. Epoch isn't a lock, so it can't become the new Giant. -- Gleb Smirnoff