From 49a456fa8101005d4d22c8ce4e57e65cee438586 Mon Sep 17 00:00:00 2001 From: Divyesh Shah Date: Wed, 6 Jan 2010 18:58:20 -0800 Subject: [PATCH] --- yaml --- r: 179685 b: refs/heads/master c: 875feb63b9567442be73efbcc9a8470e376d6423 h: refs/heads/master i: 179683: b48386abcf5fdee4603ee2b26321fa232f16f81d v: v3 --- [refs] | 2 +- trunk/block/cfq-iosched.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c2013e5203b4..592185f41cab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7af92f8754b87bc78cbfd447d5f4096b25c46682 +refs/heads/master: 875feb63b9567442be73efbcc9a8470e376d6423 diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index 918c7fd9aeb1..ee130f14d1fc 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -3076,6 +3076,12 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, if (cfq_class_idle(cfqq)) return true; + /* + * Don't allow a non-RT request to preempt an ongoing RT cfqq timeslice. + */ + if (cfq_class_rt(cfqq) && !cfq_class_rt(new_cfqq)) + return false; + /* * if the new request is sync, but the currently running queue is * not, let the sync request have priority.