lkml.org 
[lkml]   [2009]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Can current macro be accessed from interrupt context?
    From
    > There is no fixed association between your tasks and the CPUs they are
    > running on.  It is possible for two of your threads to be executed on
    > the same CPU (one after the other), or for one thread to migrate between
    > CPUs.

    Yes, you are right. I had not thought about thread migration etc and was
    painting a rather simple picture of things.

    >
    > The task that was interrupted is probably some entirely different task
    > (the X server, the shell, your mail reader, some kernel thread, or
    > any of the other tasks running on your system).
    >
    > It is possible for your interrupt handler to be called for some device
    > request that belongs to one of your tasks that is currently running on
    > another CPU, so you won't be able to manage that data without locking.
    >

    Yes, this is pretty much points towards using per-cpu data.
    Seems like my thought experiment will lead to an early demise.

    Thanks for the explanation.


    -Leo.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-10-23 11:37    [W:3.445 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site