mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Linux-usb <linux-usb@vger.kernel.org>,
	Linux USB <linux-usb-devel@lists.sourceforge.net>
Subject: Re: [PATCH 2.6.34] ehci-hcd: add option to enable 64-bit DMA support
Date: Wed, 17 Feb 2010 23:13:05 -0600	[thread overview]
Message-ID: <51f3faa71002172113o65a85ed6y5fa39d0b3a96f7ce@mail.gmail.com> (raw)
In-Reply-To: <20100218042626.GB11649@kroah.com>

On Wed, Feb 17, 2010 at 10:26 PM, Greg KH <greg@kroah.com> wrote:
> On Wed, Feb 17, 2010 at 09:10:13PM -0600, Robert Hancock wrote:
>> Add a module parameter to allow the user to enable 64-bit DMA support in EHCI,
>> which has been forcibly disabled since 2003 - see:
>>
>> http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg17230.html
>>
>> At that time the comment was "it'd only matter on a few big Intel boxes anyway",
>> however the situation is much different today when many new machines have 4GB
>> or more of RAM and IOMMU/SWIOTLB are thus needlessly required for USB transfers.
>> For now, the support remains disabled by default and is controlled by an
>> allow_64bit module parameter.
>>
>> Note that some USB device drivers may require updates to pass the DMA
>> capabilities up to their higher layers to avoid unnecessary IOMMU or bounce-
>> buffer use (i.e. networking layer NETIF_F_HIGHDMA). Some of these checks were
>> disabled by the patch listed above, and more may be required again today.
>> However, those previous checks were done incorrectly using dma_supported,
>> which checks to see whether a device's DMA mask can be validly set to a given
>> mask, not whether its previously set mask will accomodate the mask passed in.
>>
>> Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
>
> What is the "advantage" that setting this option would allow people to
> do that the code currently does not?  Is such an advantage measurable at
> the slow rates that the EHCI driver controls?

I expect it would likely be quite system-dependent. However,
particularly with devices like high-speed USB storage on systems with
lots of RAM, especially 8GB or more (where more of the memory can't be
addressed with 32-bit than can), I suspect it would likely be
measurable in terms of CPU usage, throughput or both, especially if
there's no hardware IOMMU and software bounce-buffering is required.

>
> Is there any way to dynamically figure out if we can enable this or not?
> Adding module paramaters sucks, as they are hard to configure for most
> users, and they tend to be ignored.

Well, the option only has an effect if the controller indicates the
64-bit addressing feature flag in the first place. The only issue
would be with potential controllers that report the feature flag but
it doesn't work. Based on the libata experience with AHCI which has a
similar 64-bit feature flag, there are some controllers that didn't do
it properly, but not many (only ATI SB600 it appears, and only on
certain boards, as it seems it was a BIOS configuration issue).

Having the ability to turn it on manually for testing would likely be
the first step towards turning it on for all controllers that indicate
support, not the end goal in itself.

>
> And are you really ok with enabling this on a system-wide level, and not
> on a per-controller level?  Does that work properly on all systems?

As above, the only issue is if the controller reports the capability
but it doesn't function properly. If a user runs into the case where
one of their controllers doesn't work with it enabled, that likely
means that we need to add blacklisting for that device ID, etc. (or
blacklist 64-bit DMA for their platform in general).

>
> And if the system does not support it, and a user enables it, who is
> going to support their broken system?  :)

That would be me/us :-) We need those reports though, to know how to
proceed, and better to be from those who opted into testing for now..

  reply	other threads:[~2010-02-18  5:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18  3:10 Robert Hancock
2010-02-18  4:26 ` Greg KH
2010-02-18  5:13   ` Robert Hancock [this message]
2010-02-18  5:22     ` Greg KH
2010-02-19  0:33       ` Robert Hancock
2010-02-19  0:47         ` Greg KH
2010-02-19  3:46           ` Robert Hancock
2010-02-19  3:54             ` Greg KH
2010-02-20  1:30               ` Robert Hancock
2010-02-20  4:26                 ` Greg KH
2010-02-20  5:39         ` David Brownell
2010-02-20  7:15           ` Robert Hancock
2010-02-20  8:07             ` David Brownell
2010-02-20 18:13               ` Robert Hancock
2010-02-23  6:48             ` Yuhong Bao
2010-02-24  0:26               ` Robert Hancock
2010-02-25  2:28                 ` Tejun Heo
2010-02-25  2:41                   ` Yuhong Bao
2010-02-25  2:58                     ` Tejun Heo
2010-02-25  3:15                   ` Yuhong Bao
2010-02-25  3:29                     ` Tejun Heo
2010-02-25  4:03                       ` Oliver Neukum
2010-02-25  5:25                         ` Tejun Heo
2010-02-25 16:14                           ` Greg KH
2010-02-25 23:15                             ` Robert Hancock
2010-02-25 23:25                               ` Greg KH
2010-02-26  7:01                                 ` Oliver Neukum
2010-02-24  3:53     ` SB600 64-bit DMA BIOS misconfiguration (formerly RE: [PATCH 2.6.34] ehci-hcd: add option to enable 64-bit DMA support) Yuhong Bao
2010-02-24  4:30       ` Robert Hancock
2010-02-24  4:33         ` Yuhong Bao
2010-02-24 13:30         ` Huang, Shane
2010-02-23  6:28 ` [PATCH 2.6.34] ehci-hcd: add option to enable 64-bit DMA support Yuhong Bao

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=51f3faa71002172113o65a85ed6y5fa39d0b3a96f7ce@mail.gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linux-usb@vger.kernel.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

all inboxes | Powered by JetHome®