All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2
Date: Thu, 6 Nov 2008 07:57:51 +0100	[thread overview]
Message-ID: <20081106065751.GD15731@elte.hu> (raw)
In-Reply-To: <49129310.5000903@cn.fujitsu.com>


* Lai Jiangshan <laijs@cn.fujitsu.com> wrote:

> this fix remove ugly macro, and increase readability for rcupdate codes

looks good to me, if Paul acks the concept too.

Two small details:

> +++ b/include/linux/rcuclassic.h
> @@ -32,6 +32,7 @@
>  
>  #ifndef __LINUX_RCUCLASSIC_H
>  #define __LINUX_RCUCLASSIC_H
> +#define HAVE_SPECIAL_RCU_BH

please use def_bool to define CONFIG_RCU_HAVE_SPECIAL_RCU_BH

and:

> +#else
> +#define rcu_bh_qsctr_inc(cpu)
> +#define rcu_read_lock_bh()	{ rcu_read_lock(); local_bh_disable(); }
> +#define rcu_read_unlock_bh()	{ local_bh_enable(); rcu_read_unlock(); }
> +#endif /* HAVE_SPECIAL_RCU_BH */

use inline functions please. CPP defines should never be used in new 
code. (use inlines instead of macros and enums/const instead of 
constant #define's)

	Ingo

  reply	other threads:[~2008-11-06  6:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06  6:47 [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2 Lai Jiangshan
2008-11-06  6:57 ` Ingo Molnar [this message]
2008-11-09  0:51 ` Paul E. McKenney
2008-11-10  3:22   ` Lai Jiangshan
2008-11-10 18:45     ` Paul E. McKenney
2008-11-11  0:55       ` Lai Jiangshan
2008-11-11  1:03         ` Paul E. McKenney
2008-11-13  2:48           ` Lai Jiangshan
2008-11-13 17:31             ` Paul E. McKenney
2008-11-14  1:03               ` Lai Jiangshan
2008-11-14  2:11                 ` Paul E. McKenney
2008-11-14  7:39                   ` Lai Jiangshan
2008-11-14 19:25                     ` Jonathan Corbet
2008-11-15 20:39                       ` Paul E. McKenney
2008-11-17 12:57                         ` Lai Jiangshan
2008-11-17 21:28                           ` Jonathan Corbet

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=20081106065751.GD15731@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.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.