[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] kern: reduce the size of struct task
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 4/5] kern: reduce the size of struct task |
Date: |
Thu, 2 Jan 2014 23:48:31 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Thu 02 Jan 2014 20:02:45 +0100, a écrit :
> * kern/task.h (struct task): Reduce the size of struct task by
> 2 * sizeof boolean_t by using a bit field for the boolean flags.
Ack.
> ---
> kern/task.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/kern/task.h b/kern/task.h
> index 9bfea57..e852033 100644
> --- a/kern/task.h
> +++ b/kern/task.h
> @@ -52,7 +52,11 @@ struct task {
> /* Synchronization/destruction information */
> decl_simple_lock_data(,lock) /* Task's lock */
> int ref_count; /* Number of references to me */
> - boolean_t active; /* Task has not been terminated */
> +
> + /* Flags */
> + unsigned int active:1, /* Task has not been terminated */
> + /* boolean_t */ may_assign:1, /* can assigned pset be changed? */
> + assign_active:1; /* waiting for may_assign */
>
> /* Miscellaneous */
> vm_map_t map; /* Address space description */
> @@ -63,8 +67,6 @@ struct task {
> queue_head_t thread_list; /* list of threads */
> int thread_count; /* number of threads */
> processor_set_t processor_set; /* processor set for new threads */
> - boolean_t may_assign; /* can assigned pset be changed? */
> - boolean_t assign_active; /* waiting for may_assign */
>
> /* User-visible scheduling information */
> int user_stop_count; /* outstanding stops */
> --
> 1.8.5.2
>
--
Samuel
R: Parce que ça renverse bêtement l'ordre naturel de lecture!
Q: Mais pourquoi citer en fin d'article est-il si effroyable?
R: Citer en fin d'article
Q: Quelle est la chose la plus désagréable sur les groupes de news?
- [PATCH 1/5] vm: remove NS32000-specific padding from struct vm_page, Justus Winter, 2014/01/02
- [PATCH 3/5] vm: reduce the size of struct vm_page, Justus Winter, 2014/01/02
- [PATCH 4/5] kern: reduce the size of struct task, Justus Winter, 2014/01/02
- Re: [PATCH 4/5] kern: reduce the size of struct task,
Samuel Thibault <=
- [PATCH 2/5] vm: merge the two bit fields in struct vm_page, Justus Winter, 2014/01/02
- [PATCH 5/5] kern: make struct kmem_cache fit into two cache lines, Justus Winter, 2014/01/02
- Re: [PATCH 1/5] vm: remove NS32000-specific padding from struct vm_page, Samuel Thibault, 2014/01/02