lkml.org 
[lkml]   [2017]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] block/ioprio: use a helper to check for RT prio
Date
A side-effect to the old code is that now SCHED_DEADLINE is also
recognized.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/ioprio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 8c1239020d79..c8f3f0302220 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -2,6 +2,7 @@
#define IOPRIO_H

#include <linux/sched.h>
+#include <linux/sched/rt.h>
#include <linux/iocontext.h>

/*
@@ -62,7 +63,7 @@ static inline int task_nice_ioclass(struct task_struct *task)
{
if (task->policy == SCHED_IDLE)
return IOPRIO_CLASS_IDLE;
- else if (task->policy == SCHED_FIFO || task->policy == SCHED_RR)
+ else if (task_is_elevated(task))
return IOPRIO_CLASS_RT;
else
return IOPRIO_CLASS_BE;
--
2.14.2
\
 
 \ /
  Last update: 2017-10-04 17:50    [W:0.044 / U:29.912 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site