Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1269659 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-11-15 11:20 +0100 |
| Last post | 2015-11-23 17:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] sched/core: use list_is_singular in sched_can_stop_tick() Geliang Tang <geliangtang@163.com> - 2015-11-15 11:20 +0100
[tip:sched/core] sched/core: Use list_is_singular() in sched_can_stop_tick() tip-bot for Geliang Tang <tipbot@zytor.com> - 2015-11-23 17:30 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-15 11:20 +0100 |
| Subject | [PATCH] sched/core: use list_is_singular in sched_can_stop_tick() |
| Message-ID | <qv2zF-8uV-17@gated-at.bofh.it> |
Use list_is_singular() to check if run_list has only one entry.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4d568ac..abb7c32 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -731,7 +731,7 @@ bool sched_can_stop_tick(void)
if (current->policy == SCHED_RR) {
struct sched_rt_entity *rt_se = ¤t->rt;
- return rt_se->run_list.prev == rt_se->run_list.next;
+ return list_is_singular(&rt_se->run_list);
}
/*
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | tip-bot for Geliang Tang <tipbot@zytor.com> |
|---|---|
| Date | 2015-11-23 17:30 +0100 |
| Subject | [tip:sched/core] sched/core: Use list_is_singular() in sched_can_stop_tick() |
| Message-ID | <qy2a6-4i0-15@gated-at.bofh.it> |
| In reply to | #1269659 |
Commit-ID: 01783e0d452736d7deff1b920c5eccad67adc428
Gitweb: http://git.kernel.org/tip/01783e0d452736d7deff1b920c5eccad67adc428
Author: Geliang Tang <geliangtang@163.com>
AuthorDate: Sun, 15 Nov 2015 18:18:40 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 23 Nov 2015 09:48:17 +0100
sched/core: Use list_is_singular() in sched_can_stop_tick()
Use list_is_singular() to check if run_list has only one entry.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/a5453fafd735affcf28e53a1d0a3d6965cb5dbb5.1447582547.git.geliangtang@163.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1b7cb5e..5b420d2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -731,7 +731,7 @@ bool sched_can_stop_tick(void)
if (current->policy == SCHED_RR) {
struct sched_rt_entity *rt_se = ¤t->rt;
- return rt_se->run_list.prev == rt_se->run_list.next;
+ return list_is_singular(&rt_se->run_list);
}
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web