On Mon, Jul 11, 2016 at 9:31 AM, Mark Rutland <mark.rutland@xxxxxxx> wrote: >> >> So until you do the wire that actually disables preemption you can >> schedule away as much as you want, and after that write you no longer >> will. > > I was assuming a percpu pointer to current (or preempt count). So for the same reason that is ok *iff* you have - some kind of dedicated percpu register (or other base pointer - x86 has the segment thing) that gets updated when you schedule. - an instruction that can load 'current' directly off that register atomically. But yes, percpu data in general is obviously not safe to access without preemption. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html