From: Neil Horman <nhorman@tuxdriver.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
David Miller <davem@davemloft.net>,
Wei Yongjun <yjwei@cn.fujitsu.com>,
Netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH resend] drop_monitor: fix trace_napi_poll_hit()
Date: Mon, 31 Aug 2009 07:12:46 -0400 [thread overview]
Message-ID: <20090831111245.GA2105@hmsreliant.think-freely.org> (raw)
In-Reply-To: <4A9B6E57.7090703@gmail.com>
On Mon, Aug 31, 2009 at 08:31:51AM +0200, Eric Dumazet wrote:
> Xiao Guangrong a écrit :
> > The net_dev of backlog napi is NULL, like below:
> >
> > __get_cpu_var(softnet_data).backlog.dev == NULL
> >
> > So, we should check it in napi tracepoint's probe function
> >
> > Acked-by: Neil Horman <nhorman@tuxdriver.com>
> > Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> > ---
> > net/core/drop_monitor.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> > index 9d66fa9..d311202 100644
> > --- a/net/core/drop_monitor.c
> > +++ b/net/core/drop_monitor.c
> > @@ -182,7 +182,8 @@ static void trace_napi_poll_hit(struct napi_struct *napi)
> > /*
> > * Ratelimit our check time to dm_hw_check_delta jiffies
> > */
> > - if (!time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
> > + if (!napi->dev ||
> > + !time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
> > return;
> >
> > rcu_read_lock();
>
>
> This reminds me dev->last_rx is not anymore updated, unless special conditions
> are met.
>
I still see a large number of drivers that update dev->last_rx, although its
not all as I look through the list, so something definately seems amiss.
If its not going to be consistently updated, why are still carrying that field
in dev? Are we just waiting on someone to do the janitorial work to remove it?
If so, I can, and I'll fix up the drop monitor in the process, to use a private
timestamp.
Neil
> Test done in trace_napi_poll_hit() is probably not good, even with a non null napi->dev
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2009-08-31 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 6:10 Xiao Guangrong
2009-08-31 6:31 ` Eric Dumazet
2009-08-31 11:12 ` Neil Horman [this message]
2009-08-31 11:47 ` David Miller
2009-08-31 13:33 ` Eric Dumazet
2009-08-31 15:42 ` Neil Horman
2009-09-02 1:20 ` David Miller
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=20090831111245.GA2105@hmsreliant.think-freely.org \
--to=nhorman@tuxdriver.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiaoguangrong@cn.fujitsu.com \
--cc=yjwei@cn.fujitsu.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
all inboxes | Powered by JetHome®