[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 03:57:04 -0700
From: tip-bot for luca abeni <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, rostedt@...dmis.org, juri.lelli@....com,
mathieu.poirier@...aro.org, bristot@...hat.com, tglx@...utronix.de,
torvalds@...ux-foundation.org, efault@....de,
luca.abeni@...tannapisa.it, hpa@...or.com
Subject: [tip:sched/core] sched/deadline: Use C bitfields for the state
flags
Commit-ID: 799ba82de01e7543f6b2042e1a739f3a20255f23
Gitweb: https://git.kernel.org/tip/799ba82de01e7543f6b2042e1a739f3a20255f23
Author: luca abeni <luca.abeni@...tannapisa.it>
AuthorDate: Thu, 7 Sep 2017 12:09:31 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 10 Oct 2017 11:45:26 +0200
sched/deadline: Use C bitfields for the state flags
Ask the compiler to use a single bit for storing true / false values,
instead of wasting the size of a whole int value.
Tested with gcc 5.4.0 on x86_64, and the compiler produces the expected
Assembly (similar to the Assembly code generated when explicitly accessing
the bits with bitmasks, "&" and "|").
Signed-off-by: luca abeni <luca.abeni@...tannapisa.it>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Daniel Bristot de Oliveira <bristot@...hat.com>
Cc: Juri Lelli <juri.lelli@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
include/linux/sched.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 33a01f4..0f897df 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -474,10 +474,10 @@ struct sched_dl_entity {
* conditions between the inactive timer handler and the wakeup
* code.
*/
- int dl_throttled;
- int dl_boosted;
- int dl_yielded;
- int dl_non_contending;
+ int dl_throttled : 1;
+ int dl_boosted : 1;
+ int dl_yielded : 1;
+ int dl_non_contending : 1;
/*
* Bandwidth enforcement timer. Each -deadline task has its
Powered by blists - more mailing lists