[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f22d86810910230234qed58b28g920a98bb3720b146@mail.gmail.com>
Date: Fri, 23 Oct 2009 02:34:15 -0700
From: "Leonidas ." <leonidas137@...il.com>
To: Clemens Ladisch <clemens@...isch.de>
Cc: Valdis.Kletnieks@...edu,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Can current macro be accessed from interrupt context?
> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists