From: Jeff Garzik <jeff@garzik.org>
To: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Jon Mason <jdmason@us.ibm.com>, Andi Kleen <ak@suse.de>,
Muli Ben-Yehuda <muli@il.ibm.com>,
Linux-Kernel <linux-kernel@vger.kernel.org>,
discuss@x86-64.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 2/4] x86-64: Calgary IOMMU - move valid_dma_direction into the callers
Date: Thu, 25 May 2006 05:58:43 -0400 [thread overview]
Message-ID: <44757FD3.3070805@garzik.org> (raw)
In-Reply-To: <20060525094236.GB22495@granada.merseine.nu>
Muli Ben-Yehuda wrote:
> On Thu, May 25, 2006 at 12:35:07AM -0400, Jeff Garzik wrote:
>> Jon Mason wrote:
>>> >From Andi Kleen's comments on the original Calgary patch, move
>>> valid_dma_direction into the calling functions.
>>>
>>> Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
>>> Signed-off-by: Jon Mason <jdmason@us.ibm.com>
>> Even though BUG_ON() includes unlikely(), this introduces additional
>> tests in very hot paths.
>
> Are they really very hot? I mean if you're calling the DMA API, you're
> about to frob the hardware or have already frobbed it - does this
> check really matter?
When you are adding a check that will _never_ be hit in production, to
the _hottest_ paths in the kernel, you can be assured it matters...
>> _Why_ do we need this at all?
>
> It was helpful for us during the dma-ops work and Calgary bringup and
> Andi requested that we move it from Calgary to common code. I think
> we're fine with dropping it if that's the consensus, but it did catch
> a few bugs early on and the cost is tiny.
Key phrase: "early on"
These checks will only be useful during _early_ development of a new DMA
platform. For _100%_ of the real world users, these checks are useless.
Not 99%, 100%.
Jeff
next prev parent reply other threads:[~2006-05-25 9:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 3:35 [PATCH 2/4] x86-64: Calgary IOMMU - move valid_dma_direction into the callers Jon Mason
2006-05-25 4:35 ` Jeff Garzik
2006-05-25 9:42 ` Muli Ben-Yehuda
2006-05-25 9:58 ` Jeff Garzik [this message]
2006-05-26 7:57 ` [discuss] " Andi Kleen
2006-05-26 8:55 ` Jeff Garzik
2006-05-26 9:35 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44757FD3.3070805@garzik.org \
--to=jeff@garzik.org \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=discuss@x86-64.org \
--cc=jdmason@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=mulix@mulix.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox