All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Hanoch Haim (hhaim)" <hhaim@cisco.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: net/i40e: latency issue due fix interrupt throttling setting in PF
Date: Thu, 30 Nov 2017 01:24:30 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810ECAA5A@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <3c826237918f4bffbd90121afaeecd0d@XCH-RTP-017.cisco.com>

Hi, Hanoh

Yes, that's true.

Thanks
Jingjing

From: Hanoch Haim (hhaim) [mailto:hhaim@cisco.com]
Sent: Tuesday, November 28, 2017 11:07 PM
To: Wu, Jingjing <jingjing.wu@intel.com>
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Hi Jinjing,
So to verify,
Before the VF commit ("net/i40e: fix interrupt throttling setting in PF") there was a bug that  I40E_QUEUE_ITR_INTERVAL_DEFAULT
did *not* work and PF was configured with RX_INT_INTERVAL=0 usec and now it is 32usec (taken from the define)?

Thanks,
Hanoh

From: Wu, Jingjing [mailto:jingjing.wu@intel.com]
Sent: Tuesday, November 28, 2017 5:01 PM
To: Hanoch Haim (hhaim)
Cc: dev@dpdk.org<mailto:dev@dpdk.org>
Subject: RE: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Hi, Hanoch

If DPDK PF, the commit affects that because it introduces an argument (itr_idx) for i40e_vsi_enable_queues_intr. And use the default itr_idx with default value 32us.

If you'd like to get the descriptor write back immediately, you can set "CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=0" in config/common_base file.

Or you can just change the definition of I40E_QUEUE_ITR_INTERVAL_DEFAULT like:
#define I40E_QUEUE_ITR_INTERVAL_DEFAULT 0 /* 0 us */

Thanks
Jingjing

From: Hanoch Haim (hhaim) [mailto:hhaim@cisco.com]
Sent: Tuesday, November 28, 2017 9:14 PM
To: Wu, Jingjing <jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Hanoch Haim (hhaim) <hhaim@cisco.com<mailto:hhaim@cisco.com>>
Subject: RE: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Hi Jingjing,

1.      The issue is with DPDK PF.

2.      The rate is high ~10gb, one DP core, one latency core.

3.      The fix is here

/* Bind all RX queues to allocated MSIX interrupt */
                for (i = 0; i < nb_queue; i++) {
                                val = (msix_vect << I40E_QINT_RQCTL_MSIX_INDX_SHIFT) |
            #ifdef TREX_PATCH
                                                I40E_QINT_RQCTL_ITR_INDX_MASK |                                                    << low latency 11b = NoITR
            #else
                                itr_idx << I40E_QINT_RQCTL_ITR_INDX_SHIFT |                                 << high spkies
            #endif

             I40E_WRITE_REG(hw, I40E_QINT_RQCTL(base_queue + i), val);

The Interrupt Throttling ITR is configure using a different setting using a different register here :


4.      The ITR_INTERVAL is 32 usec and it affect a different PF register

#define I40E_ITR_INDEX_DEFAULT          0
#define I40E_ITR_INDEX_NONE             3
#define I40E_QUEUE_ITR_INTERVAL_DEFAULT 32 /* 32 us */


5.      My question is why the VF configuration affects PF INT_INTERVAL ? Can I remove my patch and fix this latency issue in the different way?

Thanks,
Hanoh

From: Wu, Jingjing [mailto:jingjing.wu@intel.com]
Sent: Tuesday, November 28, 2017 2:50 PM
To: Hanoch Haim (hhaim); dev@dpdk.org<mailto:dev@dpdk.org>
Subject: RE: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Hi, Hanoch

Are you talking about i40 VF's latency? And you are using DPDK PF as host driver?

In this case, we are setting the Interrupt Throttling (ITR) to be maximum. That is to say, if the packet rate is very slow , the receive descriptor is written back  when ITR timeout, otherwise it is written back when cache line is full (4 descriptors/packets). I think that's why you saw the latency is varying.

If we change the ITR to minor, then huge number of interrupts will coming to core which impact performance.


Thanks
Jingjing

From: Hanoch Haim (hhaim) [mailto:hhaim@cisco.com]
Sent: Friday, November 24, 2017 7:25 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>
Cc: Wu, Jingjing <jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>>
Subject: RE: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Re-sending

Hanoh

From: Hanoch Haim (hhaim)
Sent: Monday, November 20, 2017 5:19 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>
Cc: Wu, Jingjing (jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>); Hanoch Haim (hhaim)
Subject: [dpdk-dev] net/i40e: latency issue due fix interrupt throttling setting in PF

Hi All,
While integrating dpdk17.11 into TRex latest code a new latency issue is observed  (i40e is very sensitive because it has very good resolution due to Qos configuration).
git bitsec found the following commit.
With this commit we observe high spikes of Rx latency (~40usec) vs (~8usec).
Any idea why?
I can send how to reproduce this, it is very simple.

cfd662d22e7bddb4ba41dbd1384f8497f38c2b4e is the first bad commit
commit cfd662d22e7bddb4ba41dbd1384f8497f38c2b4e
Author: Jingjing Wu <jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>>
Date:   Thu Aug 24 09:57:51 2017 +0800

    net/i40e: fix interrupt throttling setting in PF

    As no matter the PF host driver is DPDK or other kernel drivers,
    they are sharing the same virtchnnl interfaces to communicate to VFs.
    To follow the generic interface, DPDK PF need to set Interrupt
    Throttling (ITR) index according to the rxitr_idx from virtchnnl
    instead of ITR_NONE.

    Fixes: 6d59e4ea74a6 ("net/i40e: change version number to support Linux VF")
    Cc: stable@dpdk.org<mailto:stable@dpdk.org>

    Signed-off-by: Jingjing Wu <jingjing.wu@intel.com<mailto:jingjing.wu@intel.com>>



Thanks,
Hanoh

  reply	other threads:[~2017-11-30  1:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 15:18 net/i40e: latency issue due fix interrupt throttling setting in PF Hanoch Haim (hhaim)
2017-11-24 11:24 ` Hanoch Haim (hhaim)
2017-11-28 12:50   ` Wu, Jingjing
2017-11-28 13:14     ` Hanoch Haim (hhaim)
2017-11-28 15:01       ` Wu, Jingjing
2017-11-28 15:07         ` Hanoch Haim (hhaim)
2017-11-30  1:24           ` Wu, Jingjing [this message]
2017-11-30 16:47         ` Hanoch Haim (hhaim)
2017-11-30 17:46           ` Wu, Jingjing
2017-11-30 18:02             ` Hanoch Haim (hhaim)
2017-12-06 11:00             ` Xing, Beilei
2017-12-06 11:21               ` Hanoch Haim (hhaim)

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=9BB6961774997848B5B42BEC655768F810ECAA5A@SHSMSX103.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=hhaim@cisco.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 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.