From: Saravana Kumar <maheshmcc39@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Regarding mbuf allocation/free in secondary process
Date: Wed, 10 Feb 2016 02:14:16 -0800 [thread overview]
Message-ID: <CAA=abZ9=3U6v9RnY0yFbRmcKz8ZOJd2sviPu=qO9fQUXAcjt1Q@mail.gmail.com> (raw)
In-Reply-To: <20160210100154.GB4084@bricha3-MOBL3>
Thanks for your response..
Sara
On Wed, Feb 10, 2016 at 2:01 AM, Bruce Richardson <
bruce.richardson@intel.com> wrote:
> On Tue, Feb 09, 2016 at 11:43:19PM -0800, Saravana Kumar wrote:
> > Hi DPDK community,
> >
> >
> >
> > I'd like to have DPDK NIC IO operations in (primary) process and
> > execution logic in (secondary) processes.
> > Primary process pushes NIC Rx mbufs to Secondary process through S/W ring
> >
> > Seconary process allocates mbuf for Tx path and pushes down to Primary
> > process for NIC Tx
> >
> >
> > I have few doubts here:
> >
> > 1. If Secondary process dies because of SIGKILL then how can the mbufs
> > allocated in Secondary process can be freed.
> > If it is normal signals like SIGINT/SIGTERM then we can be catch
> > those and free in those respective signal handlers
>
> If a process terminates abnormally then the buffers being used by that
> process
> may well be leaked. The solution you propose of catching signals will
> certainly
> help as you want to try and ensure that a process always frees all its
> buffers
> properly on termination.
>
> >
> > 2. Secondary process needs to poll on the S/W ring. This can consume
> 100% cpu.
> > Is there a way to avoid polling in secondary process for Rx path
>
> Not using DPDK software rings, no. You'd have to use some kernel
> constructs such as
> fifo's/named pipes to do blocking reads on those. However, the overhead of
> using
> such structures can be severe making them unusable for many packet
> processing
> applications. An alternative might be to use some small sleep calls i.e.
> nanosleep
> between polls of the SW ring in cases where traffic rates are low. That
> will
> reduce your cpu usage.
>
> /Bruce
>
>
next prev parent reply other threads:[~2016-02-10 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 7:43 Saravana Kumar
2016-02-10 10:01 ` Bruce Richardson
2016-02-10 10:14 ` Saravana Kumar [this message]
2016-02-10 17:50 ` Lawrence MacIntyre
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='CAA=abZ9=3U6v9RnY0yFbRmcKz8ZOJd2sviPu=qO9fQUXAcjt1Q@mail.gmail.com' \
--to=maheshmcc39@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=dev@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).