From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: linux-kernel@vger.kernel.org, "Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: [PATCH 3/4] fib_trie: print statistics for multiple tables
Date: Tue, 12 Feb 2008 18:35:21 -0800 [thread overview]
Message-ID: <20080212183521.2c19e2a0.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080213005122.805195833@vyatta.com>
On Tue, 12 Feb 2008 16:50:45 -0800 Stephen Hemminger <shemminger@vyatta.com> wrote:
> +/**
> + * hlist_for_each_entry_continue_rcu - iterate over rcu hlist after current point
> + * @tpos: the type * to use as a loop cursor.
> + * @pos: the &struct hlist_node to use as a loop cursor.
> + * @member: the name of the hlist_node within the struct.
> + */
> +#define hlist_for_each_entry_continue_rcu(tpos, pos, member) \
> + for (pos = (pos)->next; \
> + rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \
> + ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
> + pos = pos->next)
Is the compiler allowed to look at a term such as
({ prefetch(pos->next); 1;})
and, when it is used as a truth value, say "hey, that's always true" and
then elide the call to prefetch()? We've no way of telling because this
remains gcc-specific territory, afaik.
(cc Paul for rcu stuff)
next prev parent reply other threads:[~2008-02-13 2:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 0:50 [PATCH 0/4] fib_trie related patches for 2.6.25 Stephen Hemminger
2008-02-13 0:50 ` [PATCH 1/4] rcu_assign_pointer: null check fix Stephen Hemminger
2008-02-13 0:50 ` Stephen Hemminger
2008-02-13 1:27 ` David Miller
2008-02-13 8:07 ` Jarek Poplawski
2008-02-13 0:50 ` [PATCH 2/4] fib_trie: improve output format for /proc/net/fib_trie Stephen Hemminger
2008-02-13 0:50 ` Stephen Hemminger
2008-02-13 2:28 ` Andrew Morton
2008-02-13 3:23 ` Stephen Hemminger
2008-02-13 0:50 ` [PATCH 3/4] fib_trie: print statistics for multiple tables Stephen Hemminger
2008-02-13 2:35 ` Andrew Morton [this message]
2008-02-13 22:26 ` Paul E. McKenney
2008-02-13 0:50 ` [PATCH 4/4] hlist_for_each_entry_continue simplification Stephen Hemminger
2008-02-13 1:26 ` 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=20080212183521.2c19e2a0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@us.ibm.com \
--cc=shemminger@vyatta.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 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.