lkml.org 
[lkml]   [2023]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5 16/18] timer: Implement the hierarchical pull model
    On Wed, Mar 01, 2023 at 03:17:42PM +0100, Anna-Maria Behnsen wrote:
    > +static bool tmigr_requires_handle_remote_up(struct tmigr_group *group,
    > + struct tmigr_group *child,
    > + void *ptr)
    > +{
    > + struct tmigr_remote_data *data = ptr;
    > + u32 childmask;
    > +
    > + childmask = data->childmask;
    > +
    > + /*
    > + * Handle the group only if child is the migrator or if the group
    > + * has no migrator. Otherwise the group is active and is handled by
    > + * its own migrator.
    > + */
    > + if (!tmigr_check_migrator(group, childmask))
    > + return true;
    > +
    > + /*
    > + * Racy lockless check for next_expiry
    > + */
    > + if (data->now >= group->next_expiry) {

    I'm not far enough along to tell; but on 32bit this can/will suffer from
    split loads and basically turn into a random number generator. I'm
    presuming the 'check = 1' thing here covers that case?

    > + data->check = 1;
    > + return true;
    > + }
    > +
    > + /* Update of childmask for next level */
    > + data->childmask = group->childmask;
    > + return false;
    > +}

    \
     
     \ /
      Last update: 2023-03-27 01:11    [W:4.158 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site