From owner-svn-src-all@freebsd.org Fri Feb 15 23:10:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D3B14ED1BA; Fri, 15 Feb 2019 23:10:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 9C5DD8AB3A; Fri, 15 Feb 2019 23:10:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 1C1D243499C; Sat, 16 Feb 2019 10:10:25 +1100 (AEDT) Date: Sat, 16 Feb 2019 10:10:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Stephen Hurd cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344162 - head/sys/net In-Reply-To: <201902151851.x1FIpi5O090646@repo.freebsd.org> Message-ID: <20190216085932.H4743@besplex.bde.org> References: <201902151851.x1FIpi5O090646@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=UJetJGXy c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=4D6hHVmNwRxqVlg0ZgEA:9 a=MHp4VuOATcU7LnBb:21 a=NvwWWhmslw5eMDLA:21 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 9C5DD8AB3A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,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, 15 Feb 2019 23:10:29 -0000 On Fri, 15 Feb 2019, Stephen Hurd wrote: > Log: > iflib: Improve return values of interrupt handlers. > > iflib was returning FILTER_HANDLED, in cases where FILTER_STRAY was more > correct. This potentially caused issues with shared legacy interrupts. > > Driver filters returning FILTER_STRAY are now properly handled. INTR_FILTER was a mistake that was backed out in r334170. Except it added hundreds if not thousands of FILTER_XXX returns from drivers, some apparently wrong so thee return values can't be checked much, and this wasn't backed out. There were a lot of uses under INTR_FILTER. Now the only uses seem to be: - a few in a KASSERT() in kern_intr.c - 1 in kern_intr.c for wrappers like in pccard and pccbb - 1 in subr_intr.c under INTR_SOLO. I intentionally left out return values from interrupt handlers when I unpessimized the interrupt system in ~1992 in 386BSD. They were rarely useful then since i386 interrupts were mostly unshareable due to being edge-triggered. Edge triggering requires every driver to check all interrupt sources for devices that it handles, since the interrupt won't repeat unless it is fully handled. This also makes sharing difficult. Sharing for PCI level-triggered interrupts was more common a few years later. INTR_FILTER was committed much later. I think it was committed just in time to rarely be useful, since MSI was fairly old then. It is only a minor optimization for shared interrupts to return from all interrupt handlers when one handler claims FILTER_HANDLED. This pessimizes all the non-shared interrupts (more in 1992 than now since CPUs are relatively much faster than i/o). Bruce