From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>, NetDev <netdev@vger.kernel.org>,
Keir Fraser <keir@xensource.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xen-netfront: Avoid deref'ing skbafter it is potentially freed.
Date: Tue, 14 Aug 2007 11:16:08 -0700 [thread overview]
Message-ID: <46C1F168.5050102@goop.org> (raw)
In-Reply-To: <200708140203.30711.jesper.juhl@gmail.com>
Jesper Juhl wrote:
> This moves the updating of both tx_bytes and tx_packets inside the
> spinlock, but as far as I can see we only _really_ need to move the
> tx_bytes update. Considering that we generally want to do as little
> work as possible while holding a lock, wouldn't the following be
> slightly better?
>
Hm, I think it would be better to keep them together. The second add is
going to be pretty much free, particularly since the tx_bytes add will
probably pull tx_packets into cache.
I have a followup patch to convert it to using the netdevice stats
structure, which will definitely put them in the same cacheline (though
perhaps the stats structure should group tx and rx members together?).
J
J
next prev parent reply other threads:[~2007-08-14 18:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 19:54 [PATCH] xen-netfront: Avoid deref'ing skbafter it is potentially freed Jeremy Fitzhardinge
2007-08-14 0:03 ` Jesper Juhl
2007-08-14 18:16 ` Jeremy Fitzhardinge [this message]
2007-08-14 5:51 ` Jeff Garzik
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=46C1F168.5050102@goop.org \
--to=jeremy@goop.org \
--cc=jeff@garzik.org \
--cc=jesper.juhl@gmail.com \
--cc=keir@xensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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).