linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	RT-users <linux-rt-users@vger.kernel.org>,
	Carsten Emde <cbe@osadl.org>, Mike Galbraith <mgalbraith@suse.de>,
	Theodore Tso <tytso@mit.edu>
Subject: [patch RT 6/7] fs, jbd: pull your plug when waiting for space
Date: Wed, 11 Jul 2012 22:05:20 -0000	[thread overview]
Message-ID: <20120711215612.161878327@linutronix.de> (raw)
In-Reply-To: 20120711214552.036760674@linutronix.de

[-- Attachment #1: fs-jbd-pull-plug-when-waiting.patch --]
[-- Type: text/plain, Size: 948 bytes --]

With an -rt kernel, and a heavy sync IO load, tasks can jam
up on journal locks without unplugging, which can lead to
terminal IO starvation.  Unplug and schedule when waiting for space.

Signed-off-by: Mike Galbraith <mgalbraith@suse.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Theodore Tso <tytso@mit.edu>
Link: http://lkml.kernel.org/r/1341812414.7370.73.camel@marge.simpson.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 fs/jbd/checkpoint.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-stable-rt/fs/jbd/checkpoint.c
===================================================================
--- linux-stable-rt.orig/fs/jbd/checkpoint.c
+++ linux-stable-rt/fs/jbd/checkpoint.c
@@ -129,6 +129,8 @@ void __log_wait_for_space(journal_t *jou
 		if (journal->j_flags & JFS_ABORT)
 			return;
 		spin_unlock(&journal->j_state_lock);
+		if (current->plug)
+			io_schedule();
 		mutex_lock(&journal->j_checkpoint_mutex);
 
 		/*

  parent reply	other threads:[~2012-07-11 22:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 22:05 [patch RT 0/7] Various fixes for the stable RT series - part I Thomas Gleixner
2012-07-11 22:05 ` [patch RT 1/7] Latency histogramms: Cope with backwards running local trace clock Thomas Gleixner
2012-07-11 22:05 ` [patch RT 3/7] Disable RT_GROUP_SCHED in PREEMPT_RT_FULL Thomas Gleixner
2012-07-12  2:36   ` Mike Galbraith
2012-07-11 22:05 ` [patch RT 2/7] Latency histograms: Adjust timer, if already elapsed when programmed Thomas Gleixner
2012-07-11 22:05 ` [patch RT 4/7] Latency histograms: Detect another yet overlooked sharedprio condition Thomas Gleixner
2012-07-11 22:05 ` [patch RT 5/7] slab: Prevent local lock deadlock Thomas Gleixner
2012-07-11 22:05 ` Thomas Gleixner [this message]
2012-07-11 22:05 ` [patch RT 7/7] perf: Make swevent hrtimer run in irq instead of softirq Thomas Gleixner
2012-07-11 23:31 ` [patch RT 0/7] Various fixes for the stable RT series - part I Steven Rostedt
2012-07-12  8:49   ` Thomas Gleixner

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=20120711215612.161878327@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=cbe@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mgalbraith@suse.de \
    --cc=rostedt@goodmis.org \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).