From: Ingo Molnar <mingo@elte.hu>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@oss.sgi.com
Subject: Re: [NET] Move local_bh_disable back in dev_queue_xmit
Date: Wed, 3 Nov 2004 02:10:43 +0100 [thread overview]
Message-ID: <20041103011043.GA16771@elte.hu> (raw)
In-Reply-To: <20041102225406.GA13760@gondor.apana.org.au>
sure - perfectly fine to me.
Ingo
* Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Hi Ingo:
>
> Your recent fix to dev_queue_xmit moved the local_bh_disable to
> include stuff like skb_linearize and skb_checksum_help. These
> are potentially expensive operations. Since they don't need to
> run with preempt off, we could simply move the local_bh_enable
> up instead.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> Cheers,
> --
> Visit Openswan at http://www.openswan.org/
> Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> ===== net/core/dev.c 1.171 vs edited =====
> --- 1.171/net/core/dev.c 2004-11-02 12:40:59 +11:00
> +++ edited/net/core/dev.c 2004-11-03 09:31:09 +11:00
> @@ -1261,11 +1261,6 @@
> struct Qdisc *q;
> int rc = -ENOMEM;
>
> - /* Disable soft irqs for various locks below. Also
> - * stops preemption for RCU.
> - */
> - local_bh_disable();
> -
> if (skb_shinfo(skb)->frag_list &&
> !(dev->features & NETIF_F_FRAGLIST) &&
> __skb_linearize(skb, GFP_ATOMIC))
> @@ -1290,6 +1285,11 @@
> if (skb_checksum_help(skb, 0))
> goto out_kfree_skb;
>
> + /* Disable soft irqs for various locks below. Also
> + * stops preemption for RCU.
> + */
> + local_bh_disable();
> +
> /* Updates of qdisc are serialized by queue_lock.
> * The struct Qdisc which is pointed to by qdisc is now a
> * rcu structure - it may be accessed without acquiring
> @@ -1363,10 +1363,10 @@
> }
> out_enetdown:
> rc = -ENETDOWN;
> -out_kfree_skb:
> - kfree_skb(skb);
> out:
> local_bh_enable();
> +out_kfree_skb:
> + kfree_skb(skb);
> return rc;
> }
>
next prev parent reply other threads:[~2004-11-03 1:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 22:54 [NET] Move local_bh_disable back in dev_queue_xmit Herbert Xu
2004-11-03 1:10 ` Ingo Molnar [this message]
2004-11-03 14:48 ` Tommy Christensen
2004-11-03 20:50 ` David S. Miller
2004-11-03 21:09 ` Herbert Xu
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=20041103011043.GA16771@elte.hu \
--to=mingo@elte.hu \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.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).