Re: [PATCH v2 2/3] X86: add a generic API to let vdso code detect context switch

2014-12-18 Thread Thomas Gleixner
On Wed, 17 Dec 2014, Shaohua Li wrote: > vdso code can't disable preempt, so it can be preempted at any time. > This makes a challenge to implement specific features. This patch adds a > generic API to let vdso code detect context switch. Please change this to: This adds a complete trainwreck in

[PATCH v2 2/3] X86: add a generic API to let vdso code detect context switch

2014-12-17 Thread Shaohua Li
vdso code can't disable preempt, so it can be preempted at any time. This makes a challenge to implement specific features. This patch adds a generic API to let vdso code detect context switch. We can use a context switch count to do the detection. The change of the count in giving time can be use