linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhltc@us.ibm.com>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>,
	dvhltc@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
	Will Schmidt <will_schmidt@vnet.ibm.com>,
	niv@linux.vnet.ibm.com, Thomas Gleixner <tglx@linutronix.de>,
	Doug Maxey <doug.maxey@us.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Michael Ellerman <ellerman@au1.ibm.com>
Subject: Re: [PATCH RT] ehea: make receive irq handler non-threaded (IRQF_NODELAY)
Date: Tue, 18 May 2010 15:22:26 -0700	[thread overview]
Message-ID: <4BF31322.5090206@us.ibm.com> (raw)
In-Reply-To: <4BF30C32.1020403@linux.vnet.ibm.com>

On 05/18/2010 02:52 PM, Brian King wrote:
> Is IRQF_NODELAY something specific to the RT kernel? I don't see it in mainline...

Yes, it basically says "don't make this handler threaded".

--
Darren

>
> -Brian
>
>
> On 05/18/2010 04:33 PM, dvhltc@linux.vnet.ibm.com wrote:
>> > From ad81664794e33d785f533c5edee37aaba20dd92d Mon Sep 17 00:00:00 2001
>> From: Darren Hart<dvhltc@us.ibm.com>
>> Date: Tue, 18 May 2010 11:07:13 -0700
>> Subject: [PATCH RT] ehea: make receive irq handler non-threaded (IRQF_NODELAY)
>>
>> The underlying hardware is edge triggered but presented by XICS as level
>> triggered. The edge triggered interrupts are not reissued after masking. This
>> is not a problem in mainline which does not mask the interrupt (relying on the
>> EOI mechanism instead). The threaded interrupts in PREEMPT_RT do mask the
>> interrupt, and can lose interrupts that occurred while masked, resulting in a
>> hung ethernet interface.
>>
>> The receive handler simply calls napi_schedule(), as such, there is no
>> significant additional overhead in making this non-threaded, since we either
>> wakeup the threaded irq handler to call napi_schedule(), or just call
>> napi_schedule() directly to wakeup the softirqs.  As the receive handler is
>> lockless, there is no need to convert any of the ehea spinlock_t's to
>> atomic_spinlock_t's.
>>
>> Without this patch, a simple scp file copy loop would fail quickly (usually
>> seconds). We have over two hours of sustained scp activity with the patch
>> applied.
>>
>> Credit goes to Will Schmidt for lots of instrumentation and tracing which
>> clarified the scenario and to Thomas Gleixner for the incredibly simple
>> solution.
>>
>> Signed-off-by: Darren Hart<dvhltc@us.ibm.com>
>> Acked-by: Will Schmidt<will_schmidt@vnet.ibm.com>
>> Cc: Thomas Gleixner<tglx@linuxtronix.de>
>> Cc: Jan-Bernd Themann<themann@de.ibm.com>
>> Cc: Nivedita Singhvi<niv@us.ibm.com>
>> Cc: Brian King<bjking1@us.ibm.com>
>> Cc: Michael Ellerman<ellerman@au1.ibm.com>
>> Cc: Doug Maxey<doug.maxey@us.ibm.com>
>> ---
>>   drivers/net/ehea/ehea_main.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
>> index 977c3d3..2c53df2 100644
>> --- a/drivers/net/ehea/ehea_main.c
>> +++ b/drivers/net/ehea/ehea_main.c
>> @@ -1263,7 +1263,7 @@ static int ehea_reg_interrupts(struct net_device *dev)
>>   			 "%s-queue%d", dev->name, i);
>>   		ret = ibmebus_request_irq(pr->eq->attr.ist1,
>>   					  ehea_recv_irq_handler,
>> -					  IRQF_DISABLED, pr->int_send_name,
>> +					  IRQF_DISABLED | IRQF_NODELAY, pr->int_send_name,
>>   					  pr);
>>   		if (ret) {
>>   			ehea_error("failed registering irq for ehea_queue "
>
>


-- 
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team

  parent reply	other threads:[~2010-05-18 22:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4BF30793.5070300@us.ibm.com>
2010-05-18 21:52 ` [PATCH RT] ehea: make receive irq handler non-threaded (IRQF_NODELAY) Brian King
2010-05-18 22:19   ` Nivedita Singhvi
2010-05-18 22:22   ` Darren Hart [this message]
2010-05-19  1:25     ` Michael Ellerman
2010-05-19 14:16       ` Darren Hart
2010-05-19 14:38         ` Thomas Gleixner
2010-05-19 21:08           ` Thomas Gleixner
2010-05-20  1:34             ` Michael Ellerman
2010-05-20  7:37               ` Jan-Bernd Themann
2010-05-20  8:14                 ` Thomas Gleixner
2010-05-20  9:05                   ` Jan-Bernd Themann
2010-05-20  9:19                     ` Thomas Gleixner
2010-05-20 14:26                       ` Nivedita Singhvi
2010-05-20 14:53                     ` Will Schmidt
2010-05-20 14:39                   ` Darren Hart
2010-05-20 14:45                     ` Thomas Gleixner
2010-05-20 21:44                       ` Will Schmidt
2010-05-20  1:32           ` Michael Ellerman
2010-05-20  8:21             ` Thomas Gleixner
2010-05-21  9:18               ` [PATCH RT] ehea: make receive irq handler non-threaded (IRQF_NODELAY), " Milton Miller
2010-09-20 14:26                 ` Jan-Bernd Themann
2010-05-20  1:28         ` Michael Ellerman
2010-05-21  9:02           ` Milton Miller

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=4BF31322.5090206@us.ibm.com \
    --to=dvhltc@us.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=doug.maxey@us.ibm.com \
    --cc=dvhltc@linux.vnet.ibm.com \
    --cc=ellerman@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=niv@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=themann@de.ibm.com \
    --cc=will_schmidt@vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).