From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932113AbdJJLBL (ORCPT ); Tue, 10 Oct 2017 07:01:11 -0400 Received: from terminus.zytor.com ([65.50.211.136]:39687 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755434AbdJJLA4 (ORCPT ); Tue, 10 Oct 2017 07:00:56 -0400 Date: Tue, 10 Oct 2017 03:57:04 -0700 From: tip-bot for luca abeni Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, rostedt@goodmis.org, juri.lelli@arm.com, mathieu.poirier@linaro.org, bristot@redhat.com, tglx@linutronix.de, torvalds@linux-foundation.org, efault@gmx.de, luca.abeni@santannapisa.it, hpa@zytor.com Reply-To: hpa@zytor.com, efault@gmx.de, luca.abeni@santannapisa.it, torvalds@linux-foundation.org, bristot@redhat.com, mathieu.poirier@linaro.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, juri.lelli@arm.com, mingo@kernel.org In-Reply-To: <1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it> References: <1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/deadline: Use C bitfields for the state flags Git-Commit-ID: 799ba82de01e7543f6b2042e1a739f3a20255f23 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: 799ba82de01e7543f6b2042e1a739f3a20255f23 Gitweb: https://git.kernel.org/tip/799ba82de01e7543f6b2042e1a739f3a20255f23 Author: luca abeni AuthorDate: Thu, 7 Sep 2017 12:09:31 +0200 Committer: Ingo Molnar 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar --- 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