From: Andi Kleen <ak@suse.de>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [x86_64, NET] smp_rmb() in dst_destroy() seems very expensive, ditto in kfree_skb()
Date: Fri, 5 May 2006 19:05:30 +0200 [thread overview]
Message-ID: <200605051905.31130.ak@suse.de> (raw)
In-Reply-To: <445B11A3.1020407@cosmosbay.com>
On Friday 05 May 2006 10:49, Eric Dumazet wrote:
> On a dual opteron box, I noticed high oprofile numbers in net/core/dst.c
> , function dst_destroy(struct dst_entry * dst)
>
> It appears the smb_rmb() done at the begining of dst_destroy() is the
> killer (this is a lfence machine instruction, that apparently is doing
> a *lot* of things... may be IO related...) that is responsible for 80%
> of the cpu time used by the whole function.
>
> I dont understand very much all variety of available barriers, and why
> this smb_rmb() is used in dst_destroy().
> I missed the corresponding wmb that should be done somewhere in the dst
> code.
>
> Do we have an alternative to smp_rmb() in the dst_destroy()/ kfree_skb()
> context ?
Eliminating it probably wouldn't help very much - it just flushes the
loads already in flight. If it didn't do that the next smp_rmb() would.
I'm surprised there are that many though. Normally kernel code is spagetti
enough that the CPU cannot speculate too many loads ahead.
But are you 100% sure the cost is not in the lock decl ? That would make
more sense. Perhaps profile for cache misses too and double check?
-Andi
prev parent reply other threads:[~2006-05-05 17:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 21:19 latest -stable breaks Squid Dave Jones
2006-05-04 0:43 ` Dave Jones
2006-05-04 1:10 ` Herbert Xu
2006-05-04 1:22 ` Ben Greear
2006-05-04 1:59 ` Ian McDonald
2006-05-04 23:25 ` David S. Miller
2006-05-04 23:30 ` Herbert Xu
2006-05-04 23:47 ` Dave Jones
2006-05-05 8:49 ` [x86_64, NET] smp_rmb() in dst_destroy() seems very expensive, ditto in kfree_skb() Eric Dumazet
2006-05-05 10:06 ` Herbert Xu
2006-05-05 16:13 ` Very long list of struct dst_entry in dst_garbage_list Eric Dumazet
2006-05-05 17:05 ` Andi Kleen [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=200605051905.31130.ak@suse.de \
--to=ak@suse.de \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.