All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [git pull] core fixes
Date: Tue, 21 Oct 2008 16:47:53 +0200	[thread overview]
Message-ID: <20081021144753.GA553@elte.hu> (raw)


Linus,

Please pull the latest core-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-fixes-for-linus

Note that the shortlog below seems to show a merge artifact - the 
following two commits are already upstream:

 3baf63a: m32r: fix build due to notify_cpu_starting() change
 463baa8: powerpc: fix linux-next build failure

this is because the merge-base of this tree is 2e532d68a2, while your 
tree that merges this is fresher.

I did not want to merge to your latest, to not create an unnecessary 
merge commit. But i could not find a way either how to generate a proper 
shortlog either. Did i do some mistake somewhere in the workflow that 
created this situation? The tree is fine, you should see this when you 
pull:

 $ git merge core-fixes-for-linus
 Merge made by recursive.
  include/linux/profile.h |    7 +++++++
  kernel/rcupdate.c       |   19 ++++++++++---------
  2 files changed, 17 insertions(+), 9 deletions(-)

 $ gll linus..
 1420dfb: Merge branch 'core-fixes-for-linus' into tmp.tmp
 5f86515: rcupdate: fix bug of rcu_barrier*()
 8cf7d36: profiling: fix !procfs build
 52f4f32: Merge branch 'linus' into core/urgent

i think it's that 52f4f32 merge commit that created this?

 Thanks,

	Ingo

------------------>
Ingo Molnar (2):
      m32r: fix build due to notify_cpu_starting() change
      profiling: fix !procfs build

Lai Jiangshan (1):
      rcupdate: fix bug of rcu_barrier*()

Stephen Rothwell (1):
      powerpc: fix linux-next build failure


 arch/m32r/kernel/smpboot.c      |    1 +
 arch/powerpc/include/asm/page.h |    6 +++++-
 include/linux/profile.h         |    7 +++++++
 kernel/rcupdate.c               |   19 ++++++++++---------
 4 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index fc29948..39cb6da 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -40,6 +40,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/cpu.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 64e1445..5ac51e6 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -10,9 +10,13 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#else
+#include <asm/types.h>
+#endif
 #include <asm/asm-compat.h>
 #include <asm/kdump.h>
-#include <asm/types.h>
 
 /*
  * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
diff --git a/include/linux/profile.h b/include/linux/profile.h
index 5700450..e3eca85 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -37,7 +37,14 @@ extern int prof_on __read_mostly;
 /* init basic kernel profiler */
 int profile_init(void);
 int profile_setup(char *str);
+#ifdef CONFIG_PROC_FS
 int create_proc_profile(void);
+#else
+static inline int create_proc_profile(void)
+{
+	return 0;
+}
+#endif
 void profile_tick(int type);
 
 /*
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 467d594..ad63af8 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -119,18 +119,19 @@ static void _rcu_barrier(enum rcu_barrier type)
 	/* Take cpucontrol mutex to protect against CPU hotplug */
 	mutex_lock(&rcu_barrier_mutex);
 	init_completion(&rcu_barrier_completion);
-	atomic_set(&rcu_barrier_cpu_count, 0);
 	/*
-	 * The queueing of callbacks in all CPUs must be atomic with
-	 * respect to RCU, otherwise one CPU may queue a callback,
-	 * wait for a grace period, decrement barrier count and call
-	 * complete(), while other CPUs have not yet queued anything.
-	 * So, we need to make sure that grace periods cannot complete
-	 * until all the callbacks are queued.
+	 * Initialize rcu_barrier_cpu_count to 1, then invoke
+	 * rcu_barrier_func() on each CPU, so that each CPU also has
+	 * incremented rcu_barrier_cpu_count.  Only then is it safe to
+	 * decrement rcu_barrier_cpu_count -- otherwise the first CPU
+	 * might complete its grace period before all of the other CPUs
+	 * did their increment, causing this function to return too
+	 * early.
 	 */
-	rcu_read_lock();
+	atomic_set(&rcu_barrier_cpu_count, 1);
 	on_each_cpu(rcu_barrier_func, (void *)type, 1);
-	rcu_read_unlock();
+	if (atomic_dec_and_test(&rcu_barrier_cpu_count))
+		complete(&rcu_barrier_completion);
 	wait_for_completion(&rcu_barrier_completion);
 	mutex_unlock(&rcu_barrier_mutex);
 }

             reply	other threads:[~2008-10-21 14:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21 14:47 Ingo Molnar [this message]
2008-10-23 16:43 ` [git pull] core fixes Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2010-08-24 19:01 [GIT PULL] " Ingo Molnar
2010-05-04 17:49 Ingo Molnar
2009-04-26 17:10 Ingo Molnar
2009-04-17  0:50 Ingo Molnar
2009-04-13 17:28 Ingo Molnar
2009-04-09 15:36 Ingo Molnar
2009-02-17 16:34 [git pull] " Ingo Molnar
2009-01-13  1:16 Ingo Molnar
2008-08-22 12:26 Ingo Molnar
2008-08-11 22:20 Ingo Molnar
2008-08-12  6:13 ` Nick Piggin
2008-08-12  7:17   ` Peter Zijlstra
2008-08-12  7:31     ` Nick Piggin
2008-08-12  8:05   ` Nick Piggin
2008-08-12  9:25     ` Ingo Molnar
2008-08-12 10:42       ` Nick Piggin
2008-08-14  4:45     ` Nick Piggin
2008-08-15 12:58       ` Ingo Molnar
2008-08-18  5:22         ` Nick Piggin
2008-08-18  6:17           ` Nick Piggin
2008-08-18  6:22           ` Ingo Molnar
2008-08-12 15:20 ` Ingo Molnar

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=20081021144753.GA553@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.