From owner-svn-src-all@freebsd.org Fri Jan 24 02:44:01 2020 Return-Path: Delivered-To: svn-src-all@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 67C9222BC62; Fri, 24 Jan 2020 02:44:01 +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 483k410lQjz4Nyx; Fri, 24 Jan 2020 02:44:00 +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 00O2husQ009440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 23 Jan 2020 18:43:57 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 00O2hu8N009439; Thu, 23 Jan 2020 18:43:56 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 23 Jan 2020 18:43:56 -0800 From: Gleb Smirnoff To: Ryan Stone Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r357051 - head/sys/dev/bge Message-ID: <20200124024356.GK1268@FreeBSD.org> References: <202001231636.00NGawrr080128@repo.freebsd.org> <20200123230546.GG1268@FreeBSD.org> <20200124012458.GI1268@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 483k410lQjz4Nyx X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.11 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.87)[-0.874,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.24)[-0.236,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 02:44:01 -0000 On Thu, Jan 23, 2020 at 08:33:58PM -0500, Ryan Stone wrote: R> > Because at interrupt level we can batch multiple packets in a single epoch. R> > This speeds up unfiltered packet forwarding performance by 5%. R> > R> > With driver level pfil hooks I would claim even more improvement, because before R> > the change we needed to enter epoch twice - once for filtering, than for ether_input. R> > R> > Epoch isn't a layer, it is a synchronisation primitive, so I disagree about R> > statement on layering violation. R> R> Epoch is a synchronization primitive, but the net_epoch is absolutely R> a part of the networking layer. If we need better batching then the R> correct solution is to introduce a batched interface for drivers to R> push packets up the stack, not to mess around at the interrupt layer. Such interface of course would be valuable but will not cover case when an interrupt arrives during processing of previous one. So its batching possiblities are limited compared to interrupt level batching. And I already noted that ether_input() isn't the only way to enter the network stack. R> Note that the only reason why this works for mlx4/mlx5 is that R> linuxkpi *always* requests a INTR_TYPE_NET no matter what driver is R> running. This means that all drm graphics driver interrupts are now R> running under the net_epoch: R> R> https://svnweb.freebsd.org/base/head/sys/compat/linuxkpi/common/include/linux/interrupt.h?revision=352205&view=markup#l103 Well, it is not my fault that a video driver requests INTR_TYPE_NET interrupt. I mean, you can't put this as a rationale against using network epoch for all interrrupts that declare theirselves as network interrupts. However, this is harmless. -- Gleb Smirnoff