Damien Zammit, le dim. 11 févr. 2024 10:55:26 +0000, a ecrit: > >> diff --git a/kern/task.h b/kern/task.h > >> index dec3a530..27970620 100644 > >> --- a/kern/task.h > >> +++ b/kern/task.h > >> @@ -61,11 +61,11 @@ struct task { > >> decl_simple_lock_data(,lock) /* Task's lock */ > >> int ref_count; /* Number of references to me */ > >> > >> - /* 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 */ > >> - essential:1; /* Is this task essential for the > >> system? */ > >> + /* Addressable flags */ > >> + unsigned char active; /* Task has not been terminated */ > >> + unsigned char may_assign; /* can assigned pset be changed? */ > >> + unsigned char assign_active; /* waiting for may_assign */ > >> + unsigned char essential; /* Is this task essential for the > >> system? */ > > AIUI only assign_active need to be adressable? Better make only that one > > addressable. > > Looking at the existing flag types, it needs to fit into part of a cacheline.
Why would it need to fit in a cacheline? > The way I have done it, I rearranged the existing 4 byte integer to be 4 > separate single byte flags. > If you want me to put only one of the values into an addressable field, > how will I retain the same size for the rest of the fields? What do you mean by "the same size"? Samuel