From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Legacy, Allain" <Allain.Legacy@windriver.com>
Cc: "mtetsuyah@gmail.com" <mtetsuyah@gmail.com>,
"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Peters, Matt" <Matt.Peters@windriver.com>,
Thomas Monjalon <thomas.monjalon@6wind.com>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: change mbuf allocation logs to debug
Date: Thu, 30 Mar 2017 09:49:34 +0800 [thread overview]
Message-ID: <20170330014934.GL18844@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <70A7408C6E1BFB41B192A929744D8523968FA875@ALA-MBC.corp.ad.wrs.com>
On Wed, Mar 29, 2017 at 10:45:55PM +0000, Legacy, Allain wrote:
> > -----Original Message-----
> > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> > Sent: Wednesday, March 29, 2017 3:02 AM
>
> <...>
> >
> > OTOH, it's still good to have RTE_LOG_ONCE. It explicitly tells you something
> > is wrong, then you could dump those stats for more info.
>
> Has the implementation of something like RTE_LOG_ONCE been discussed before?
No. It's just something comes to my mind after saw your patch.
> Do you have a proposal on what you would find acceptable as an implementation that considers multiples threads, multiple devices, multiple logs per file, etc.?
No, that would be way to complex. Something I thought of is quite
simple (like what Linux kernel does):
#define RTE_LOG_ONCE(...) do { \
static int warned; \
if (!warned) { \
RTE_LOG(...); \
warned = 1; \
} \
} while (0)
And yes, I know it's far away from being perfect (and accurate, regarding
to multiple devices and so on as you mentioned). Even though, I think
it's much better than showing nothing when something goes wrong.
--yliu
prev parent reply other threads:[~2017-03-30 1:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 16:29 Allain Legacy
2017-03-28 6:48 ` Yuanhan Liu
2017-03-28 11:39 ` Legacy, Allain
2017-03-29 7:01 ` Yuanhan Liu
2017-03-29 22:45 ` Legacy, Allain
2017-03-30 1:49 ` Yuanhan Liu [this message]
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=20170330014934.GL18844@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=Allain.Legacy@windriver.com \
--cc=Matt.Peters@windriver.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=mtetsuyah@gmail.com \
--cc=thomas.monjalon@6wind.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).