* [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes
@ 2016-12-08 0:14 Alexander Duyck
2016-12-09 23:22 ` Samudrala, Sridhar
2017-01-05 22:05 ` Alexander Duyck
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Duyck @ 2016-12-08 0:14 UTC (permalink / raw)
To: intel-wired-lan
From: Alexander Duyck <alexander.h.duyck@intel.com>
Recently napi_complete_done was updated so that it will return zero if we
are using the queue vector for busy polling. When this is the case we
don't need to re-enable interrupts as the busy polling will reschedule the
NAPI instance when it is finally done polling.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
v2: Updated code to place the IRQ enabling inside the if statment
This made it so that we are consistent with the recent return value changes
v3: Added i40evf changes as well
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 32 +++++++++++++------------
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 28 ++++++++++++----------
2 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index e88e335c34ef..f9ef8c2676e2 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2033,22 +2033,24 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
}
}
- if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
- q_vector->arm_wb_state = false;
-
- /* Work is done so exit the polling mode and re-enable the interrupt */
- napi_complete_done(napi, work_done);
-
- /* If we're prematurely stopping polling to fix the interrupt
- * affinity we want to make sure polling starts back up so we
- * issue a call to i40e_force_wb which triggers a SW interrupt.
+ /* Work is done so exit the polling mode,
+ * if not busy polling re-enable interrupts.
*/
- if (!clean_complete)
- i40e_force_wb(vsi, q_vector);
- else if (!(vsi->back->flags & I40E_FLAG_MSIX_ENABLED))
- i40e_irq_dynamic_enable_icr0(vsi->back, false);
- else
- i40e_update_enable_itr(vsi, q_vector);
+ if (napi_complete_done(napi, work_done)) {
+ if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
+ q_vector->arm_wb_state = false;
+
+ /* If we're prematurely stopping polling to fix the interrupt
+ * affinity we want to make sure polling starts back up so we
+ * issue a call to i40e_force_wb which triggers a SW interrupt.
+ */
+ if (!clean_complete)
+ i40e_force_wb(vsi, q_vector);
+ else if (!(vsi->back->flags & I40E_FLAG_MSIX_ENABLED))
+ i40e_irq_dynamic_enable_icr0(vsi->back, false);
+ else
+ i40e_update_enable_itr(vsi, q_vector);
+ }
return min(work_done, budget - 1);
}
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4870cb50dc33..3097a91bd4aa 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1494,20 +1494,22 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
}
}
- if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
- q_vector->arm_wb_state = false;
-
- /* Work is done so exit the polling mode and re-enable the interrupt */
- napi_complete_done(napi, work_done);
-
- /* If we're prematurely stopping polling to fix the interrupt
- * affinity we want to make sure polling starts back up so we
- * issue a call to i40evf_force_wb which triggers a SW interrupt.
+ /* Work is done so exit the polling mode,
+ * if not busy polling re-enable interrupts.
*/
- if (!clean_complete)
- i40evf_force_wb(vsi, q_vector);
- else
- i40e_update_enable_itr(vsi, q_vector);
+ if (napi_complete_done(napi, work_done)) {
+ if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
+ q_vector->arm_wb_state = false;
+
+ /* If we're prematurely stopping polling to fix the interrupt
+ * affinity we want to make sure polling starts back up so we
+ * issue a call to i40evf_force_wb which triggers a SW interrupt.
+ */
+ if (!clean_complete)
+ i40evf_force_wb(vsi, q_vector);
+ else
+ i40e_update_enable_itr(vsi, q_vector);
+ }
return min(work_done, budget - 1);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes
2016-12-08 0:14 [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes Alexander Duyck
@ 2016-12-09 23:22 ` Samudrala, Sridhar
2017-01-05 22:05 ` Alexander Duyck
1 sibling, 0 replies; 5+ messages in thread
From: Samudrala, Sridhar @ 2016-12-09 23:22 UTC (permalink / raw)
To: intel-wired-lan
On 12/7/2016 4:14 PM, Alexander Duyck wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> Recently napi_complete_done was updated so that it will return zero if we
> are using the queue vector for busy polling. When this is the case we
> don't need to re-enable interrupts as the busy polling will reschedule the
> NAPI instance when it is finally done polling.
This patch is causing a regression with memcached when using epoll with
busy polling.
I think we need to do more investigation before pushing or re-working
this patch.
Thanks
Sridhar
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>
> v2: Updated code to place the IRQ enabling inside the if statment
> This made it so that we are consistent with the recent return value changes
>
> v3: Added i40evf changes as well
>
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 32 +++++++++++++------------
> drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 28 ++++++++++++----------
> 2 files changed, 32 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index e88e335c34ef..f9ef8c2676e2 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -2033,22 +2033,24 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
> }
> }
>
> - if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
> - q_vector->arm_wb_state = false;
> -
> - /* Work is done so exit the polling mode and re-enable the interrupt */
> - napi_complete_done(napi, work_done);
> -
> - /* If we're prematurely stopping polling to fix the interrupt
> - * affinity we want to make sure polling starts back up so we
> - * issue a call to i40e_force_wb which triggers a SW interrupt.
> + /* Work is done so exit the polling mode,
> + * if not busy polling re-enable interrupts.
> */
> - if (!clean_complete)
> - i40e_force_wb(vsi, q_vector);
> - else if (!(vsi->back->flags & I40E_FLAG_MSIX_ENABLED))
> - i40e_irq_dynamic_enable_icr0(vsi->back, false);
> - else
> - i40e_update_enable_itr(vsi, q_vector);
> + if (napi_complete_done(napi, work_done)) {
> + if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
> + q_vector->arm_wb_state = false;
> +
> + /* If we're prematurely stopping polling to fix the interrupt
> + * affinity we want to make sure polling starts back up so we
> + * issue a call to i40e_force_wb which triggers a SW interrupt.
> + */
> + if (!clean_complete)
> + i40e_force_wb(vsi, q_vector);
> + else if (!(vsi->back->flags & I40E_FLAG_MSIX_ENABLED))
> + i40e_irq_dynamic_enable_icr0(vsi->back, false);
> + else
> + i40e_update_enable_itr(vsi, q_vector);
> + }
>
> return min(work_done, budget - 1);
> }
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> index 4870cb50dc33..3097a91bd4aa 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> @@ -1494,20 +1494,22 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
> }
> }
>
> - if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
> - q_vector->arm_wb_state = false;
> -
> - /* Work is done so exit the polling mode and re-enable the interrupt */
> - napi_complete_done(napi, work_done);
> -
> - /* If we're prematurely stopping polling to fix the interrupt
> - * affinity we want to make sure polling starts back up so we
> - * issue a call to i40evf_force_wb which triggers a SW interrupt.
> + /* Work is done so exit the polling mode,
> + * if not busy polling re-enable interrupts.
> */
> - if (!clean_complete)
> - i40evf_force_wb(vsi, q_vector);
> - else
> - i40e_update_enable_itr(vsi, q_vector);
> + if (napi_complete_done(napi, work_done)) {
> + if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
> + q_vector->arm_wb_state = false;
> +
> + /* If we're prematurely stopping polling to fix the interrupt
> + * affinity we want to make sure polling starts back up so we
> + * issue a call to i40evf_force_wb which triggers a SW interrupt.
> + */
> + if (!clean_complete)
> + i40evf_force_wb(vsi, q_vector);
> + else
> + i40e_update_enable_itr(vsi, q_vector);
> + }
>
> return min(work_done, budget - 1);
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes
2016-12-08 0:14 [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes Alexander Duyck
2016-12-09 23:22 ` Samudrala, Sridhar
@ 2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:26 ` Jeff Kirsher
1 sibling, 2 replies; 5+ messages in thread
From: Alexander Duyck @ 2017-01-05 22:05 UTC (permalink / raw)
To: intel-wired-lan
On Wed, Dec 7, 2016 at 4:14 PM, Alexander Duyck
<alexander.duyck@gmail.com> wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> Recently napi_complete_done was updated so that it will return zero if we
> are using the queue vector for busy polling. When this is the case we
> don't need to re-enable interrupts as the busy polling will reschedule the
> NAPI instance when it is finally done polling.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
>
> v2: Updated code to place the IRQ enabling inside the if statment
> This made it so that we are consistent with the recent return value changes
>
> v3: Added i40evf changes as well
>
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 32 +++++++++++++------------
> drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 28 ++++++++++++----------
> 2 files changed, 32 insertions(+), 28 deletions(-)
>
Jeff,
This patch causes a performance regression due to the way it interacts
with the i40e WB on ITR behavior. Can you please drop it from the
dev-queue.
Thanks.
- Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes
2017-01-05 22:05 ` Alexander Duyck
@ 2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:26 ` Jeff Kirsher
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Duyck @ 2017-01-05 22:05 UTC (permalink / raw)
To: intel-wired-lan
On Thu, Jan 5, 2017 at 2:05 PM, Alexander Duyck
<alexander.duyck@gmail.com> wrote:
> On Wed, Dec 7, 2016 at 4:14 PM, Alexander Duyck
> <alexander.duyck@gmail.com> wrote:
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>>
>> Recently napi_complete_done was updated so that it will return zero if we
>> are using the queue vector for busy polling. When this is the case we
>> don't need to re-enable interrupts as the busy polling will reschedule the
>> NAPI instance when it is finally done polling.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> ---
>>
>> v2: Updated code to place the IRQ enabling inside the if statment
>> This made it so that we are consistent with the recent return value changes
>>
>> v3: Added i40evf changes as well
>>
>> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 32 +++++++++++++------------
>> drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 28 ++++++++++++----------
>> 2 files changed, 32 insertions(+), 28 deletions(-)
>>
>
> Jeff,
>
> This patch causes a performance regression due to the way it interacts
> with the i40e WB on ITR behavior. Can you please drop it from the
> dev-queue.
>
> Thanks.
>
> - Alex
Re-sending this time and making sure it is sent to Jeff.
Thanks.
- Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes
2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:05 ` Alexander Duyck
@ 2017-01-05 22:26 ` Jeff Kirsher
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Kirsher @ 2017-01-05 22:26 UTC (permalink / raw)
To: intel-wired-lan
On Thu, 2017-01-05 at 14:05 -0800, Alexander Duyck wrote:
> On Wed, Dec 7, 2016 at 4:14 PM, Alexander Duyck
> <alexander.duyck@gmail.com> wrote:
> > From: Alexander Duyck <alexander.h.duyck@intel.com>
> >
> > Recently napi_complete_done was updated so that it will return zero if
> > we
> > are using the queue vector for busy polling.? When this is the case we
> > don't need to re-enable interrupts as the busy polling will reschedule
> > the
> > NAPI instance when it is finally done polling.
> >
> > Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> > ---
> >
> > v2: Updated code to place the IRQ enabling inside the if statment
> > ???? This made it so that we are consistent with the recent return
> > value changes
> >
> > v3: Added i40evf changes as well
> >
> > ? drivers/net/ethernet/intel/i40e/i40e_txrx.c?? |?? 32 +++++++++++++---
> > ---------
> > ? drivers/net/ethernet/intel/i40evf/i40e_txrx.c |?? 28 ++++++++++++--
> > --------
> > ? 2 files changed, 32 insertions(+), 28 deletions(-)
> >
>
> Jeff,
>
> This patch causes a performance regression due to the way it interacts
> with the i40e WB on ITR behavior.? Can you please drop it from the
> dev-queue.
I have dropped the patch from my queue/tree.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170105/d9e4cb64/attachment.asc>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-05 22:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 0:14 [Intel-wired-lan] [next-queue PATCH v3] i40e/i40evf: Update driver to support napi_complete_done changes Alexander Duyck
2016-12-09 23:22 ` Samudrala, Sridhar
2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:05 ` Alexander Duyck
2017-01-05 22:26 ` Jeff Kirsher
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.