All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Andi Kleen <andi@firstfloor.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] Scheduler Profiling - Use Immediate Values
Date: Wed, 12 Sep 2007 10:19:47 -0400	[thread overview]
Message-ID: <20070912141947.GA7313@Krystal> (raw)
In-Reply-To: <p73bqcd9lw4.fsf@bingen.suse.de>

* Andi Kleen (andi@firstfloor.org) wrote:
> Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> writes:
> >  
> > -	profile_hit(SCHED_PROFILING, __builtin_return_address(0));
> > +	immediate_if (&sched_profiling)
> 
> I must say I really dislike immediate_if(). You complained earlier
> that something breaks coloring, but adding such macros will definitely
> break a lot of editors (especially if you use it without {} like here)
> 
> It would be much nicer and readable to just use if 
> (unlikely(immediate_read(&x)) or if you prefer to hide the unlikely
> if (immediate_bool_test(&x)) with an implicit unlikely().
> 
> -Andi

Please refer to :

http://lkml.org/lkml/2007/7/3/301

The idea is not to hide the unlikely, but to leave the opportunity to
make this primitive evolve in something that won't depend on a load
immediate and only require patching of a jump, given the appropriate gcc
support (yet to come).

Mathieu


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2007-09-12 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-06 20:05 [PATCH] Scheduler Profiling - Use Immediate Values Mathieu Desnoyers
2007-09-06 20:55 ` Randy Dunlap
2007-09-07 12:14   ` Mathieu Desnoyers
2007-09-08 16:12 ` Andi Kleen
2007-09-12 14:19   ` Mathieu Desnoyers [this message]
2007-09-12 14:32     ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2007-12-06  2:14 Mathieu Desnoyers

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=20070912141947.GA7313@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.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 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.