From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: Gage Eads <gage.eads@intel.com>,
harry.van.haaren@intel.com, jerin.jacob@caviumnetworks.com,
santosh.shukla@caviumnetworks.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] event/sw: use dynamically-sized IQs
Date: Mon, 8 Jan 2018 21:02:20 +0530 [thread overview]
Message-ID: <20180108153219.jszoepdgfiggn3bm@Pavan-LT> (raw)
In-Reply-To: <1512011314-19682-2-git-send-email-gage.eads@intel.com>
On Wed, Nov 29, 2017 at 09:08:34PM -0600, Gage Eads wrote:
> This commit introduces dynamically-sized IQs, by switching the underlying
> data structure from a fixed-size ring to a linked list of queue 'chunks.'
> This has a number of benefits:
> - Certain corner cases were observed in which all of a pipeline's flows
> could be pinned to one port for extended periods, effectively turning a
> multi-core pipeline into single-core one. This was caused by an event
> producer having a larger new_event_threshold than the IQ depth, and
> injecting large numbers of packets that are ultimately backpressured in a
> worker's rx_ring, causing those packets' flows to be scheduled to that
> port.
> The dynamically sized IQ does not have this problem because each IQ can
> grow large enough to store all the system's events, such that
> backpressure will not reach the worker_ring.
> - Slight performance improvement (~1-2%) in high throughput scenarios,
> tested with eventdev_pipeline_sw_pmd.
>
> This implementation has a small increase in the queue storage memory
> footprint (~70KB). This commit also removes the iq_size xstat, which no
> longer applies to this implementation.
>
> Signed-off-by: Gage Eads <gage.eads@intel.com>
> ---
Sw eventdev crashes when used alongside Rx adapter. The crash happens when
pumping traffic at > 1.4mpps. This commit seems responsible for this.
Apply the following Rx adapter patch http://dpdk.org/dev/patchwork/patch/31977/
Command used:
./build/eventdev_pipeline_sw_pmd -c 0xfffff8 --vdev="event_sw" -- -r0x800
-t0x100 -w F000 -e 0x10
Backtrace:
Thread 4 "lcore-slave-4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffffb6c8f040 (LWP 25291)]
0x0000aaaaaadcc0d4 in iq_dequeue_burst (count=48, ev=0xffffb6c8dd38,
iq=0xffff9f764720, sw=0xffff9f332600) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/iq_chunk.h:142
142 ev[total++] = current->events[index++];
(gdb) bt
#0 0x0000aaaaaadcc0d4 in iq_dequeue_burst (count=48, ev=0xffffb6c8dd38,
iq=0xffff9f764720, sw=0xffff9f332600) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/iq_chunk.h:142
#1 sw_schedule_atomic_to_cq (sw=0xffff9f332600, qid=0xffff9f764700, iq_num=0,
count=48) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/sw_evdev_scheduler.c:74
#2 0x0000aaaaaadcdc44 in sw_schedule_qid_to_cq (sw=0xffff9f332600) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/sw_evdev_scheduler.c:262
#3 0x0000aaaaaadd069c in sw_event_schedule (dev=0xaaaaaafbd200
<rte_event_devices>) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/sw_evdev_scheduler.c:564
#4 0x0000aaaaaadca008 in sw_sched_service_func (args=0xaaaaaafbd200
<rte_event_devices>) at
/root/clean/rebase/dpdk-next-eventdev/drivers/event/sw/sw_evdev.c:767
#5 0x0000aaaaaab54740 in rte_service_runner_do_callback (s=0xffff9fffdf80,
cs=0xffff9ffef900, service_idx=0) at
/root/clean/rebase/dpdk-next-eventdev/lib/librte_eal/common/rte_service.c:349
#6 0x0000aaaaaab54868 in service_run (i=0, cs=0xffff9ffef900,
service_mask=18446744073709551615) at
/root/clean/rebase/dpdk-next-eventdev/lib/librte_eal/common/rte_service.c:376
#7 0x0000aaaaaab54954 in rte_service_run_iter_on_app_lcore (id=0,
serialize_mt_unsafe=1) at
/root/clean/rebase/dpdk-next-eventdev/lib/librte_eal/common/rte_service.c:405
#8 0x0000aaaaaaaef04c in schedule_devices (lcore_id=4) at
/root/clean/rebase/dpdk-next-eventdev/examples/eventdev_pipeline_sw_pmd/main.c:223
#9 0x0000aaaaaaaef234 in worker (arg=0xffff9f331d80) at
/root/clean/rebase/dpdk-next-eventdev/examples/eventdev_pipeline_sw_pmd/main.c:274
#10 0x0000aaaaaab4382c in eal_thread_loop (arg=0x0) at
/root/clean/rebase/dpdk-next-eventdev/lib/librte_eal/linuxapp/eal/eal_thread.c:182
#11 0x0000ffffb7e46d64 in start_thread () from /usr/lib/libpthread.so.0
#12 0x0000ffffb7da8bbc in thread_start () from /usr/lib/libc.so.6
Segfault seems to happen in sw_event_schedule and only happens under high
traffic load.
Thanks,
Pavan
> drivers/event/sw/iq_chunk.h | 212 ++++++++++++++++++++++++++++++++++
> drivers/event/sw/iq_ring.h | 172 ---------------------------
> drivers/event/sw/sw_evdev.c | 59 ++++++----
> drivers/event/sw/sw_evdev.h | 16 ++-
> drivers/event/sw/sw_evdev_scheduler.c | 40 +++----
> drivers/event/sw/sw_evdev_xstats.c | 12 +-
> test/test/test_eventdev_sw.c | 15 +--
> 7 files changed, 288 insertions(+), 238 deletions(-)
> create mode 100644 drivers/event/sw/iq_chunk.h
> delete mode 100644 drivers/event/sw/iq_ring.h
>
<snip>
> @@ -1743,7 +1739,6 @@ xstats_id_reset_tests(struct test *t)
> 0, /* tx */
> 0, /* drop */
> 7, /* inflight */
> - 512, /* iq size */
> 0, /* iq 0 used */
> 0, /* iq 1 used */
> 0, /* iq 2 used */
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-01-08 15:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 3:08 [dpdk-dev] [PATCH 1/2] event/sw: fix queue memory leak and multi-link bug Gage Eads
2017-11-30 3:08 ` [dpdk-dev] [PATCH 2/2] event/sw: use dynamically-sized IQs Gage Eads
2017-12-07 17:15 ` Van Haaren, Harry
2017-12-09 9:26 ` Jerin Jacob
2018-01-08 15:32 ` Pavan Nikhilesh [this message]
2018-01-08 15:50 ` Van Haaren, Harry
2018-01-08 16:05 ` Pavan Nikhilesh
2018-01-08 18:36 ` Eads, Gage
2018-01-09 7:12 ` Pavan Nikhilesh
2017-12-07 17:15 ` [dpdk-dev] [PATCH 1/2] event/sw: fix queue memory leak and multi-link bug Van Haaren, Harry
2017-12-09 9:26 ` Jerin Jacob
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=20180108153219.jszoepdgfiggn3bm@Pavan-LT \
--to=pbhagavatula@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=gage.eads@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=santosh.shukla@caviumnetworks.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).