lkml.org 
[lkml]   [2015]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 03/13] irq_poll: fold irq_poll_sched_prep into irq_poll_sched
From
Date
On 12/07/2015 09:51 PM, Christoph Hellwig wrote:
> diff --git a/lib/irq_poll.c b/lib/irq_poll.c
> index 88af879..13cb149 100644
> --- a/lib/irq_poll.c
> +++ b/lib/irq_poll.c
> @@ -21,13 +21,17 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_iopoll);
> *
> * Description:
> * Add this irq_poll structure to the pending poll list and trigger the
> - * raise of the blk iopoll softirq. The driver must already have gotten a
> - * successful return from irq_poll_sched_prep() before calling this.
> + * raise of the blk iopoll softirq.
> **/
> void irq_poll_sched(struct irq_poll *iop)
> {
> unsigned long flags;
>
> + if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
> + return;
> + if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
> + return;
> +
> local_irq_save(flags);
> list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll));
> __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);

After having applied these changes the SRP initiator didn't receive any
RDMA completions anymore. I could remedy that by changing
"!test_and_set_bit()" into "test_and_set_bit()":

diff --git a/lib/irq_poll.c b/lib/irq_poll.c
index 43a3370..3a67019 100644
--- a/lib/irq_poll.c
+++ b/lib/irq_poll.c
@@ -29,7 +29,7 @@ void irq_poll_sched(struct irq_poll *iop)

if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
return;
- if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
+ if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
return;

local_irq_save(flags);

\
 
 \ /
  Last update: 2015-12-29 11:21    [W:0.581 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site