lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: rseq + membarrier programming model
    Date
    * Mathieu Desnoyers:

    >> Could it fall back to
    >> MEMBARRIER_CMD_GLOBAL instead?
    >
    > No. CMD_GLOBAL does not issue the required rseq fence used by the
    > algorithm discussed. Also, CMD_GLOBAL has quite a few other shortcomings:
    > it takes a while to execute, and is incompatible with nohz_full kernels.

    What about using sched_setcpu to move the current thread to the same CPU
    (and move it back afterwards)? Surely that implies the required sort of
    rseq barrier that MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ with
    MEMBARRIER_CMD_FLAG_CPU performs?

    That is possible even without membarrier, so I wonder why registration
    of intent is needed for MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.

    > In order to make sure the programming model is the same for expedited
    > private/global plain/sync-core/rseq membarrier commands, we require that
    > each process perform a registration beforehand.

    Hmm. At least it's not possible to unregister again.

    But I think it would be really useful to have some of these barriers
    available without registration, possibly in a more expensive form.

    Thanks,
    Florian

    \
     
     \ /
      Last update: 2021-12-13 20:30    [W:2.609 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site