Messages in this thread |  | | From | Thomas Gleixner <> | Subject | Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends | Date | Mon, 21 Sep 2020 09:39:39 +0200 |
| |
On Sun, Sep 20 2020 at 10:42, Linus Torvalds wrote: > On Sun, Sep 20, 2020 at 10:40 AM Thomas Gleixner <tglx@linutronix.de> wrote: >> >> I think the more obvious solution is to split the whole exercise: >> >> schedule() >> prepare_switch() >> unmap() >> >> switch_to() >> >> finish_switch() >> map() > > Yeah, that looks much easier to explain. Ack.
So far so good, but Peter Z. just pointed out to me that I completely missed the fact that this cannot work.
If a task is migrated to a different CPU then the mapping address will change which will explode in colourful ways.
On RT kernels this works because we ping the task to the CPU via migrate_disable(). On a !RT kernel migrate_disable() maps to preempt_disable() which brings us back to square one.
/me goes back to the drawing board.
Thanks,
tglx
|  |