Date: Tue, 5 Feb 2013 14:11:17 -0500 From: John Baldwin <jhb@freebsd.org> To: Randall Stewart <rrs@lakerest.net> Cc: freebsd-net@freebsd.org, Robert Watson <rwatson@freebsd.org>, Jack Vogel <jfvogel@gmail.com>, Kip Macy <kmacy@freebsd.org> Subject: Re: Driver patch to look at... Message-ID: <201302051411.17883.jhb@freebsd.org> In-Reply-To: <990BD290-643B-4BC7-8D64-6D4CE987025A@lakerest.net> References: <D3AA078A-CD19-4228-A019-BE9C985895E2@lakerest.net> <201302051352.52741.jhb@freebsd.org> <990BD290-643B-4BC7-8D64-6D4CE987025A@lakerest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, February 05, 2013 2:04:12 pm Randall Stewart wrote: > Hmm >=20 > That would trade off a stack pointer + a compare > vs always doing the move. Right, the store is probably cheaper than the branch. :) However, minimizi= ng=20 the duplicated code in drivers and having this interface be as clear/readab= le=20 as possible is my main goal. > Thats fine until I have to add the _mc() version, then the put > back would be an atomic, and most of the time the return from > this is probably not changed=85 >=20 > I really would prefer not to since the compare and maybe store vs > the always store.. though the same now, would be far more expensive > in the _mc version.. if we do a _mc version of course ;-) I would just not bother with an _mc version until we actually need it. :) I think doing the sort of peek/advance type logic only works well with single consumers anyway. =2D-=20 John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302051411.17883.jhb>