From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: Daniel Walker <dwalker@mvista.com>,
Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 -mm] likeliness accounting change and cleanup
Date: Fri, 28 Mar 2008 16:09:32 +1100 [thread overview]
Message-ID: <200803281609.32961.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <47EC02A7.5020909@tiscali.nl>
On Friday 28 March 2008 07:25, Roel Kluin wrote:
> Daniel Walker wrote:
> > It's looks good to me .. You'll have to send it to Andrew to get it
> > included tho ..
> >
> > Daniel
>
> Store __builtin_return_address (caller) rather than __func__ in likeliness
> struct. 'line' and 'type' are combined in 'label'
>
> +/- now denotes whether expectation fails in less than 5% of the tests -
> rather than whether more unexpected than expected were encountered. The
> function at the displayed filename & line and the caller are not
> necessarily the same. A few more Likely Profiling Results changes were
> made.
>
> struct seq_operations becomes static, unsigned ints true and false
> (shadowed) are replaced by pos and neg.
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Patch looks fine to me.
Acked-by: Nick Piggin <npiggin@suse.de>
> if (!test_and_set_bit(0, &likely_lock)) {
> - if (likeliness->type & LP_UNSEEN) {
> - likeliness->type &= (~LP_UNSEEN);
> + if (likeliness->label & LP_UNSEEN) {
> + likeliness->label &= (~LP_UNSEEN);
> likeliness->next = likeliness_head;
> likeliness_head = likeliness;
> + likeliness->caller = (unsigned long)
> + __builtin_return_address(0);
> }
> smp_mb__before_clear_bit();
> clear_bit(0, &likely_lock);
While you're cleaning up this code, any chance you'd like to
change this to test_and_set_bit_lock() / clear_bit_unlock() ?
(in a 2nd patch).
The current usage is not wrong as such, but the _lock routines are
faster and provide a better example to follow...
prev parent reply other threads:[~2008-03-28 7:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-26 20:46 [PATCH v2] likeliness accounting cleanup Roel Kluin
2008-03-27 12:37 ` Roel Kluin
2008-03-27 16:45 ` Daniel Walker
2008-03-27 20:25 ` [PATCH v2 -mm] likeliness accounting change and cleanup Roel Kluin
2008-03-28 5:09 ` Nick Piggin [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=200803281609.32961.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=12o3l@tiscali.nl \
--cc=akpm@linux-foundation.org \
--cc=dwalker@mvista.com \
--cc=linux-kernel@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
Powered by JetHome