From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756269AbdJJLFg (ORCPT ); Tue, 10 Oct 2017 07:05:36 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41377 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755737AbdJJLF0 (ORCPT ); Tue, 10 Oct 2017 07:05:26 -0400 Date: Tue, 10 Oct 2017 04:01:52 -0700 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, efault@gmx.de, axboe@fb.com, tglx@linutronix.de, bigeasy@linutronix.de, peterz@infradead.org, hpa@zytor.com Reply-To: axboe@fb.com, tglx@linutronix.de, bigeasy@linutronix.de, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, efault@gmx.de In-Reply-To: <20171004154901.26904-2-bigeasy@linutronix.de> References: <20171004154901.26904-2-bigeasy@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] block/ioprio: Use a helper to check for RT prio Git-Commit-ID: 36436440cd19f59f5be12a1b181d299af2725140 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 36436440cd19f59f5be12a1b181d299af2725140 Gitweb: https://git.kernel.org/tip/36436440cd19f59f5be12a1b181d299af2725140 Author: Sebastian Andrzej Siewior AuthorDate: Wed, 4 Oct 2017 17:49:01 +0200 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:39 +0200 block/ioprio: Use a helper to check for RT prio A side-effect to the old code is that now SCHED_DEADLINE is also recognized. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171004154901.26904-2-bigeasy@linutronix.de Signed-off-by: Ingo Molnar --- 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 8c12390..2f19aab 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -2,6 +2,7 @@ #define IOPRIO_H #include +#include #include /* @@ -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_realtime(task)) return IOPRIO_CLASS_RT; else return IOPRIO_CLASS_BE;