lkml.org 
[lkml]   [2000]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectBottom Handles/soft irqs/timer interrupts/SMP .....
    From
    Date

    Hi Ingo & folks,
    I am heard that you are the one that have set the timer
    interrupt APIC by the 2.2+ linux kernel.

    The Problem:
    -----------

    I am getting freezes with test9-pre7. The freezes happen while all
    the processes that should be running are waiting in the semaphore:

    cache_drain_sem

    The process that holds that semaphore is waiting for all the CPUS to
    run the function slab_drain_local_cache(), this function is called
    from the timer interrupt.

    1st Question: It is guaranteed that the timer interrupt will go to
    all CPUs _soon_???

    What the code tries to do:
    -------------------------

    The code tries to call the slab_drain_local_cache in all the CPUs and
    wait for all the CPUs to call that function, and the last one to
    wakeup the first one.

    Problem: The variable slab_cache_drain_mask is used "quite happily"
    without too much looking on it (i.e. it is read without any atomic
    operation, I have changed it to be a volatile varible, but the problem
    persists).


    What we need to do:
    ------------------

    We are trying that each CPU shrink its local caches, and that should
    be done by the local CPU.

    2nd Question: Is there a sane way to queue an operation to be done in
    each specific CPU?

    Something like tq_timer[cpu]?
    It is that problem better solved with
    soft_irqs/<whatever other mechanism>.

    Notice that we are sleeping with the cache_drain_sem, but it should be
    not necessary, if there is a way to queue an operation to do in each
    CPU, with that, if I call drain_cpu_caches, I can always use a bitmap
    to see if I have that interrupt pending, and in that case, does
    nothing, if the bit was 0, I queue the operation.

    If you need any more explanation, or a pointer to a place where I can
    find how to setup a function to be called by each CPU, you are
    welcome. I have only found smp_call_function, but I don't know if it
    is run with local_irqs deactivated, or if it is the correct answer to
    this problem.

    Later, Juan.





    --
    In theory, practice and theory are the same, but in practice they
    are different -- Larry McVoy
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:38    [W:0.026 / U:0.616 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site