public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: hermann <brummer-@web.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [ANNOUNCE] 3.0-rc7-rt0
Date: Thu, 21 Jul 2011 19:35:54 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1107211932440.2702@ionos> (raw)
In-Reply-To: <1311265361.2323.6.camel@box>

On Thu, 21 Jul 2011, hermann wrote:
> I try to build the 3.0-rc7-rt0 but fail with the following message:
>  CC [M]  fs/ext3/balloc.o
> In file included from include/linux/jbd.h:247:0,
>                  from fs/ext3/balloc.c:18:

Find below a patch on top of rt0 which fixes this build failure and
some other stuff.

Thanks,

	tglx

-----------

Index: linux-2.6/kernel/timer.c
===================================================================
--- linux-2.6.orig/kernel/timer.c
+++ linux-2.6/kernel/timer.c
@@ -654,6 +654,36 @@ static struct tvec_base *lock_timer_base
 	}
 }
 
+#ifndef CONFIG_PREEMPT_RT_FULL
+static inline struct tvec_base *switch_timer_base(struct timer_list *timer,
+						  struct tvec_base *old,
+						  struct tvec_base *new)
+{
+	/* See the comment in lock_timer_base() */
+	timer_set_base(timer, NULL);
+	spin_unlock(&old->lock);
+	spin_lock(&new->lock);
+	timer_set_base(timer, new);
+	return new;
+}
+#else
+static inline struct tvec_base *switch_timer_base(struct timer_list *timer,
+						  struct tvec_base *old,
+						  struct tvec_base *new)
+{
+	/*
+	 * We cannot do the above because we might be preempted and
+	 * then the preempter would see NULL and loop forever.
+	 */
+	if (spin_trylock(&new->lock)) {
+		timer_set_base(timer, new);
+		spin_unlock(&old->lock);
+		return new;
+	}
+	return old;
+}
+#endif
+
 static inline int
 __mod_timer(struct timer_list *timer, unsigned long expires,
 						bool pending_only, int pinned)
@@ -699,14 +729,8 @@ __mod_timer(struct timer_list *timer, un
 		 * handler yet has not finished. This also guarantees that
 		 * the timer is serialized wrt itself.
 		 */
-		if (likely(base->running_timer != timer)) {
-			/* See the comment in lock_timer_base() */
-			timer_set_base(timer, NULL);
-			spin_unlock(&base->lock);
-			base = new_base;
-			spin_lock(&base->lock);
-			timer_set_base(timer, base);
-		}
+		if (likely(base->running_timer != timer))
+			base = switch_timer_base(timer, base, new_base);
 	}
 
 	timer->expires = expires;
Index: linux-2.6/mm/page_alloc.c
===================================================================
--- linux-2.6.orig/mm/page_alloc.c
+++ linux-2.6/mm/page_alloc.c
@@ -1943,8 +1943,8 @@ __alloc_pages_direct_compact(gfp_t gfp_m
 	if (*did_some_progress != COMPACT_SKIPPED) {
 
 		/* Page migration frees to the PCP lists but we want merging */
-		drain_pages(get_cpu());
-		put_cpu();
+		drain_pages(get_cpu_light());
+		put_cpu_light();
 
 		page = get_page_from_freelist(gfp_mask, nodemask,
 				order, zonelist, high_zoneidx,
Index: linux-2.6/include/linux/buffer_head.h
===================================================================
--- linux-2.6.orig/include/linux/buffer_head.h
+++ linux-2.6/include/linux/buffer_head.h
@@ -74,7 +74,9 @@ struct buffer_head {
 	atomic_t b_count;		/* users using this buffer_head */
 #ifdef CONFIG_PREEMPT_RT_BASE
 	spinlock_t b_uptodate_lock;
-#if defined(CONFIG_JBD) || defined(CONFIG_JBD2)
+#if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || \
+    defined(CONFIG_JBD2) || defined(CONFIG_JBD2_MODULE)
+	spinlock_t b_state_lock;
 	spinlock_t b_state_lock;
 	spinlock_t b_journal_head_lock;
 #endif

  reply	other threads:[~2011-07-21 17:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 16:22 [ANNOUNCE] 3.0-rc7-rt0 hermann
2011-07-21 17:35 ` Thomas Gleixner [this message]
2011-07-21 17:43   ` Thomas Gleixner
2011-07-21 18:33     ` hermann
2011-07-23  4:08     ` [ANNOUNCE] 3.0-rt1 hermann
2011-07-23  7:37       ` Thomas Gleixner
2011-07-21 18:28   ` [ANNOUNCE] 3.0-rc7-rt0 andi
2011-07-21 18:40     ` hermann
2011-07-21 19:57   ` [PATCH] Various fixups from first bug reports Uwe Kleine-König
2011-07-22  5:43     ` hermann
2011-07-22  6:57       ` Uwe Kleine-König
2011-07-22  7:40         ` hermann
2011-07-22 10:06           ` Trulan Martin
2011-07-22 11:04         ` Rusty Russell
2011-07-22 19:20           ` Uwe Kleine-König
2011-07-23  3:17             ` hermann
2011-07-23  9:57               ` Robin Gareus
     [not found]                 ` <4E2A9B18.6030000-+VlDMftONaMdnm+yROfE0A@public.gmane.org>
2011-07-23 14:19                   ` hermann
2011-07-23 14:33                     ` Robin Gareus
2011-07-23 15:21                       ` hermann
2011-07-23 18:53                     ` Uwe Kleine-König
  -- strict thread matches above, loose matches on Subject: below --
2011-07-20  0:37 [ANNOUNCE] 3.0-rc7-rt0 Thomas Gleixner
2011-07-20  2:48 ` Frank Rowand
2011-07-20  3:22   ` Fernando Lopez-Lezcano
2011-07-20  5:03 ` Paul E. McKenney
2011-07-20  9:02 ` David Kastrup
2011-07-20  9:48 ` Geunsik Lim
2011-07-20 11:08 ` Armin Steinhoff
2011-07-20 15:33   ` Madovsky
2011-07-20 15:56     ` Thomas Gleixner
2011-07-20 15:59       ` Madovsky
2011-07-20 17:02 ` Darren Hart
2011-07-20 19:15 ` Noah Watkins

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=alpine.LFD.2.02.1107211932440.2702@ionos \
    --to=tglx@linutronix.de \
    --cc=brummer-@web.de \
    --cc=linux-rt-users@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