Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Oct 2014 01:48:26 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r271207 - head/sys/dev/ahci
Message-ID:  <54306B2A.2040702@FreeBSD.org>
In-Reply-To: <201409061943.s86JhmK4084402@svn.freebsd.org>
References:  <201409061943.s86JhmK4084402@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06.09.2014 23:43, Alexander Motin wrote:
> Author: mav
> Date: Sat Sep  6 19:43:48 2014
> New Revision: 271207
> URL: http://svnweb.freebsd.org/changeset/base/271207
> 
> Log:
>   Save one register read (AHCI_IS) for AHCI controllers with only one port.
>   
>   For controllers with only one port (like PCIe or M.2 SSDs) interrupt can
>   come from only one source, and skipping read saves few percents of CPU time.
>   
>   MFC after:	1 month
>   H/W donated by:	I/O Switch
This one causes tons of "Interrupt storm" messages (and inability to
boot) for SATA AHCI VirtualBox disk controller.
> 
> Modified:
>   head/sys/dev/ahci/ahci.c
> 
> Modified: head/sys/dev/ahci/ahci.c
> ==============================================================================
> --- head/sys/dev/ahci/ahci.c	Sat Sep  6 19:39:12 2014	(r271206)
> +++ head/sys/dev/ahci/ahci.c	Sat Sep  6 19:43:48 2014	(r271207)
> @@ -359,7 +359,9 @@ ahci_setup_interrupt(device_t dev)
>  	for (i = 0; i < ctlr->numirqs; i++) {
>  		ctlr->irqs[i].ctlr = ctlr;
>  		ctlr->irqs[i].r_irq_rid = i + (ctlr->msi ? 1 : 0);
> -		if (ctlr->numirqs == 1 || i >= ctlr->channels ||
> +		if (ctlr->channels == 1 && !ctlr->ccc)
> +			ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE;
> +		else if (ctlr->numirqs == 1 || i >= ctlr->channels ||
>  		    (ctlr->ccc && i == ctlr->cccv))
>  			ctlr->irqs[i].mode = AHCI_IRQ_MODE_ALL;
>  		else if (i == ctlr->numirqs - 1)
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54306B2A.2040702>