public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: luca abeni <luca.abeni@santannapisa.it>, linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Juri Lelli <juri.lelli@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH 4/4] sched/deadline: use C bitfields for the state flags
Date: Fri, 8 Sep 2017 10:24:23 +0200	[thread overview]
Message-ID: <2abbd6e5-1c2e-0577-1894-e1282decfca0@redhat.com> (raw)
In-Reply-To: <1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it>

On 09/07/2017 12:09 PM, luca abeni wrote:
> 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@santannapisa.it>

Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>

-- Daniel
> ---
>  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 68b3833..e03cc69 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -472,10 +472,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
> 

  reply	other threads:[~2017-09-08  8:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 10:09 [PATCH 0/4] SCHED_DEADLINE fixes and cleanups luca abeni
2017-09-07 10:09 ` [PATCH 1/4] sched/sched.h: remove duplicate prototype of __dl_clear_params() luca abeni
2017-09-08  8:33   ` Daniel Bristot de Oliveira
2017-10-10 10:55   ` [tip:sched/core] sched/headers: Remove " tip-bot for luca abeni
2017-09-07 10:09 ` [PATCH 2/4] sched/deadline: fix switching to -deadline luca abeni
2017-10-10 10:56   ` [tip:sched/core] sched/deadline: Fix " tip-bot for Luca Abeni
2017-09-07 10:09 ` [PATCH 3/4] sched/deadline: rename __dl_clear() to __dl_sub() luca abeni
2017-09-08  8:26   ` Daniel Bristot de Oliveira
2017-10-10 10:56   ` [tip:sched/core] sched/deadline: Rename " tip-bot for Peter Zijlstra
2017-09-07 10:09 ` [PATCH 4/4] sched/deadline: use C bitfields for the state flags luca abeni
2017-09-08  8:24   ` Daniel Bristot de Oliveira [this message]
2017-10-10 10:57   ` [tip:sched/core] sched/deadline: Use " tip-bot for luca abeni
2017-10-02  8:18 ` [PATCH 0/4] SCHED_DEADLINE fixes and cleanups Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2abbd6e5-1c2e-0577-1894-e1282decfca0@redhat.com \
    --to=bristot@redhat.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox