Messages in this thread | | | Date | Mon, 14 Nov 2022 14:09:37 +0100 | From | Frederic Weisbecker <> | Subject | Re: [PATCH v4 14/16] timer: Implement the hierarchical pull model |
| |
On Fri, Nov 04, 2022 at 03:57:35PM +0100, Anna-Maria Behnsen wrote: > +/* > + * Returns true, if there is nothing to be propagated to the next level > + * > + * @data->nextexp is reset to KTIME_MAX; it is reused for first global > + * event which needs to be handled by migrator (in toplevel group) > + * > + * This is the only place where group event expiry value is set. > + */ > +static bool tmigr_update_events(struct tmigr_group *group, > + struct tmigr_group *child, > + struct tmigr_walk *data) > +{ > + struct tmigr_event *evt, *first_childevt; > + bool walk_done; > + u64 nextexp; > + > + if (child) { > + if (data->childstate.active) > + return true; > + > + raw_spin_lock(&child->lock); > + raw_spin_lock_nested(&group->lock, SINGLE_DEPTH_NESTING); > + > + first_childevt = tmigr_next_groupevt(child); > + nextexp = child->next_expiry; > + evt = &child->groupevt; > + } else { > + nextexp = data->nextexp; > + > + /* > + * Set @data->nextexp to KTIME_MAX; it is reused for first > + * global event which needs to be handled by migrator (in > + * toplevel group) > + */ > + data->nextexp = KTIME_MAX; > + > + first_childevt = evt = data->evt; > + if (test_bit(0, &evt->ignore))
The bit 0 set/clear/test on that ignore field looks a bit confusing. Is there any reason why it can't be some plain int/boolean?
Thanks.
| |