lkml.org 
[lkml]   [2010]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH] introduce sys_membarrier(): process-wide memory barrier
    From
    Date
    On Wed, 2010-01-06 at 22:35 -0800, Josh Triplett wrote:
    >
    > The number of threads doesn't matter nearly as much as the number of
    > threads typically running at a time compared to the number of
    > processors. Of course, we can't measure that as easily, but I don't
    > know that your proposed heuristic would approximate it well.

    Quite agreed, and not disturbing RT tasks is even more important.

    A simple:

    for_each_cpu(cpu, current->mm->cpu_vm_mask) {
    if (cpu_curr(cpu)->mm == current->mm)
    smp_call_function_single(cpu, func, NULL, 1);
    }

    seems far preferable over anything else, if you really want you can use
    a cpumask to copy cpu_vm_mask in and unset bits and use the mask with
    smp_call_function_any(), but that includes having to allocate the
    cpumask, which might or might not be too expensive for Mathieu.





    \
     
     \ /
      Last update: 2010-01-07 09:47    [W:3.753 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site