From: "Dorsett, Michal" <Michal.Dorsett@verint.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] movzbl in rte_eth_rx_burst
Date: Sat, 19 Aug 2017 08:45:15 +0000 [thread overview]
Message-ID: <DAC43FCF19B05149A1D1F5E9005F94F801358EEF89@TLVMBX1.verint.corp.verintsystems.com> (raw)
Hi,
We are running dpdk 16.07. Below is a snippet from a perf annotate report of a CPU running a thread that constantly reads packets.
As you can see, the hottest instructruction is
movzbl 0x10(%rcx),%r15d
which, I believe, is referring to
struct rte_eth_dev *dev = &rte_eth_devices[port_id];
Can someone explain why this instruction is so costly, and how I can remedy this?
0.66 x lea 0xc8(%rsp),%rax
x _ZN8LBThread7executeEv():
x {
x u32RetPkt = vecRXQ->at(u32Index)->receiveRawPackets(xPktArr, BURST_SIZE);
x movq $0x0,0x50(%rsp)
x _ZNSt6vectorIP18ReceivePacketQueueSaIS1_EE2atEm():
x movq $0x0,0x48(%rsp)
x __mempool_generic_put():
0.09 x mov %rax,0x88(%rsp)
0.42 x mov 0x60(%rsp),%rax
x add $0x18,%rax
0.05 x mov %rax,0x40(%rsp)
0.14 x mov 0x50(%rsp),%rax
x _ZN8LBThread7executeEv():
0.71 x 370: mov (%rdx,%rax,8),%rax
0.57 x mov %rax,%rcx
1.23 x mov %rax,0x80(%rsp)
x rte_rdtsc():
x }
x #endif
x
x asm volatile("rdtsc" :
x "=a" (tsc.lo_32),
x "=d" (tsc.hi_32));
0.47 x rdtsc
x rte_eth_rx_burst():
x */
x static inline uint16_t
x rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
x struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
x {
x struct rte_eth_dev *dev = &rte_eth_devices[port_id];
24.74 x movzbl 0x10(%rcx),%r15d
x rte_rdtsc():
0.09 x mov %eax,%r13d
x _ZN18ReceivePacketQueue17receiveRawPacketsEP6Packetj():
x uint64_t u64StartTick = CPUCycles::getTSCCycles();
x uint32_t u32PtksReceived;
x int32_t refcnt;
x int retCode;
x
x u32PtksReceived = rte_eth_rx_burst(m_u8PortId, m_u16QueueIndexForNICPort, m_pArrPktsBurst, u32NumOfPkts);
2.60 x movzwl 0xe(%rcx),%r14d
x rte_rdtsc():
x shl $0x20,%rdx
x _ZN18ReceivePacketQueue17receiveRawPacketsEP6Packetj():
x lea 0x18(%rcx),%r12
x rte_rdtsc():
0.05 x or %rdx,%r13
x rte_eth_rx_burst():
x RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", queue_id);
x return 0;
x }
x #endif
x int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
Thanks,
Michal Dorsett
Developer, Strategic IP Group
Desk: +972 962 4350
Mobile: +972 50 771 6689
Verint Cyber Intelligence
www.verint.com<http://www.verint.com/>
This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries. The information is intended to be for the use of the individual(s) or entity(ies) named above. If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message. If you have received this electronic message in error, please notify us by replying to this e-mail.
next reply other threads:[~2017-08-19 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-19 8:45 Dorsett, Michal [this message]
2017-08-20 17:56 ` Stephen Hemminger
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=DAC43FCF19B05149A1D1F5E9005F94F801358EEF89@TLVMBX1.verint.corp.verintsystems.com \
--to=michal.dorsett@verint.com \
--cc=users@dpdk.org \
/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).