lkml.org 
[lkml]   [2019]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 1/2] Fix: sched/membarrier: p->mm->membarrier_state racy load
    ----- On Sep 4, 2019, at 12:11 PM, Oleg Nesterov oleg@redhat.com wrote:

    > with or without these changes...
    >
    > Why do membarrier_register_*_expedited() check get_nr_threads() == 1?
    > This makes no sense to me, atomic_read(mm_users) == 1 should be enough.
    >
    >
    > And I am not sure I understand membarrier_mm_sync_core_before_usermode().
    > OK, membarrier_private_expedited() can race with user -> kernel -> user
    > transition, but we do not care unless both user's above have the same mm?
    > Shouldn't membarrier_mm_sync_core_before_usermode() do
    >
    > if (current->mm != mm)
    > return;
    >
    > at the start to make it more clear and avoid sync_core_before_usermode()
    > if possible?

    I think I missed replying to your email. Indeed, you are right, I've added
    2 cleanup patches taking care of this in my latest round.

    Thanks,

    Mathieu


    --
    Mathieu Desnoyers
    EfficiOS Inc.
    http://www.efficios.com

    \
     
     \ /
      Last update: 2019-09-08 15:46    [W:4.031 / U:0.968 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site