Date: Tue, 3 Dec 2019 12:34:55 -0500 From: Alexander Motin <mav@FreeBSD.org> To: Ian Lepore <ian@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r355333 - stable/12/sys/cam Message-ID: <9f7bcc85-42a0-2a4c-2a78-1d65f64cca4a@FreeBSD.org> In-Reply-To: <1dbc23eac25b2c0cece884fc54734e02868d75c6.camel@freebsd.org> References: <201912031642.xB3GgXRD089746@repo.freebsd.org> <f7f0165f66282ab634d32e60cfb85225e54257b6.camel@freebsd.org> <1c18cdbb-2a6e-3cbb-048b-8f1f49a4cef5@FreeBSD.org> <1dbc23eac25b2c0cece884fc54734e02868d75c6.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03.12.2019 12:00, Ian Lepore wrote: > On Tue, 2019-12-03 at 11:54 -0500, Alexander Motin wrote: >> On 03.12.2019 11:47, Ian Lepore wrote: >>> On Tue, 2019-12-03 at 16:42 +0000, Alexander Motin wrote: >>>> Author: mav >>>> Date: Tue Dec 3 16:42:32 2019 >>>> New Revision: 355333 >>>> URL: https://svnweb.freebsd.org/changeset/base/355333 >>>> >>>> Log: >>>> MFC r341756 (by scottl): >>>> Don't allocate the config_intrhook separately from the softc, >>>> it's >>>> small >>>> enough that it costs more code to handle the malloc/free than >>>> it >>>> saves. >>>> >>> >>> If it's a situation where the called hook routine always does a >>> disestablish of the hook (and nothing else does so), just use >>> config_intrhook_oneshot() and you don't need to manage the data >>> struct >>> yourself at all. >> >> Right. That is what I have done in my later commit. The only downside >> of config_intrhook_oneshot() is that it require memory allocation unlike >> previous. > > Yeah, it's all about convenience rather than peformance. Usually when > I need an intrhook it's a "one device instance once at bootup" kind of > thing where performance doesn't matter much. I don't worry so much about performance as about need to have sleepable context. -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f7bcc85-42a0-2a4c-2a78-1d65f64cca4a>