All of lore.kernel.org
 help / color / mirror / Atom feed
From: sshtylyov@mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: Improve MMC performance on Versatile Express
Date: Fri, 21 Jan 2011 18:09:44 +0300	[thread overview]
Message-ID: <4D39A1B8.4020607@ru.mvista.com> (raw)
In-Reply-To: <1295618352-26432-1-git-send-email-pawel.moll@arm.com>

Hello.

Pawel Moll wrote:

> VE suffers from serious problem with MMC transfers - low performance,
> errors when other IO peripherals (especially USB) are used at the
> same time etc.

> It all boils down to the MMC controller short FIFO and - in result -
> timing constrains. The most problematic case - USB driver hogging
> CPU and MMC FIFO under/overruns in the result - can be mitigated on
> SMP system by distributing interrupts handling for these peripherals
> between cores.

> With this, the MMC card clock can be safely (at least it looks like
> it) increased to 1.5MHz, improving performance.

> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
> ---
>  arch/arm/mach-vexpress/v2m.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
> index 4b5af01..300ac72 100644
> --- a/arch/arm/mach-vexpress/v2m.c
> +++ b/arch/arm/mach-vexpress/v2m.c
[...]
>  static AMBA_DEVICE(aaci,  "mb:aaci",  V2M_AACI, NULL);
> @@ -391,6 +392,19 @@ static void __init v2m_init(void)
>  	for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++)
>  		amba_device_register(v2m_amba_devs[i], &iomem_resource);
>  
> +	/* WARNING: HACK HACK HACK!
> +	 *
> +	 * MMCI cell has very tight timing requirements regarding interrupt
> +	 * handling (fractions of millisecond), while the USB host controller
> +	 * interrupt handler can hog the CPU for more then 1 millisecond!
> +	 *
> +	 * To mitigate the problem on SMP systems, we can set CPU affinities
> +	 * of these interrupts to different cores... */

    The preferred style for the mutli-line comments is this:

/*
  * bla
  * bla
  */

    You were close. :-)

> +	BUG_ON(v2m_usb_resources[1].flags != IORESOURCE_IRQ);
> +	irq_set_affinity(v2m_usb_resources[1].start, cpumask_of(0));
> +	irq_set_affinity(mmci_device.irq[0], cpumask_of(1));
> +	irq_set_affinity(mmci_device.irq[1], cpumask_of(1));
> +
>  	pm_power_off = v2m_power_off;
>  	arm_pm_restart = v2m_restart;

WBR, Sergei

  reply	other threads:[~2011-01-21 15:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 13:59 [PATCH] arm: Improve MMC performance on Versatile Express Pawel Moll
2011-01-21 15:09 ` Sergei Shtylyov [this message]
2011-01-21 19:59 ` Nicolas Pitre
2011-01-21 21:51   ` Russell King - ARM Linux
2011-01-21 22:20     ` Nicolas Pitre
2011-01-21 22:29       ` Russell King - ARM Linux
2011-02-01 14:29         ` Linus Walleij
2011-02-01 17:25           ` Pawel Moll
2011-01-24 12:27   ` Pawel Moll
2011-01-24 13:35     ` Russell King - ARM Linux
2011-01-24 16:13       ` Pawel Moll
2011-01-24 16:24         ` Russell King - ARM Linux
2011-01-24 16:30           ` Russell King - ARM Linux
2011-01-24 16:39           ` Pawel Moll
2011-01-24 16:53             ` Russell King - ARM Linux
2011-01-24 17:03               ` Russell King - ARM Linux
2011-01-24 17:54                 ` Pawel Moll
2011-01-24 18:09                   ` Russell King - ARM Linux
2011-01-24 19:59                     ` Pawel Moll
2011-01-24 23:10                       ` Russell King - ARM Linux
2011-02-01 11:18                         ` Russell King - ARM Linux
2011-02-01 13:34                           ` Pawel Moll
2011-02-01 14:28                             ` Russell King - ARM Linux
2011-02-01 17:25                               ` Pawel Moll
2011-02-03 14:15       ` Linus Walleij

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=4D39A1B8.4020607@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.