2 ms·
You'd have to have a static analysis of which syscalls can transitively reach which functions, which is probably not possible because linux uses tables of funct
by jeffbee 6y ago
You'd have to have a static analysis of which syscalls can transitively reach which functions, which is probably not possible because linux uses tables of function pointers for many purposes. Also if thread 1 enters the kernel, suspends waiting for some i/o, and the kernel switches to thread 2, how would it know it needed to restore thread 2's registers because of AVX activity of thread 1? And if it did how would it have known to save them?
- jstimpfle 6y agoNot a kernel person, but how about a flag for the thread data structure?
- jeffbee 6y agoYeah actually now that I'm part way through that first cup of coffee, the 2nd part of my comment doesn't make sense, the kernel already has to do a heavier save of a task's register state when it switches tasks.