On Mon, Jun 29, 2015 at 7:12 AM, Amit Pundir amit.pundir@linaro.org wrote:
On 29 June 2015 at 12:41, Alex Shi alex.shi@linaro.org wrote:
For current 3.10 LSK, I ma going to submit a commit as following:
Any concern for this patch?
commit 25af66fbddd13fdcf85a7a9d0d4e790e7ca23ff8 Author: Alex Shi alex.shi@linaro.org Date: Mon Jun 29 15:05:53 2015 +0800
prctl: resolve PR_SET_TIMERSLACK_PID/PR_SET_THP_DISABLE conflict In android kernel the PR_SET_TIMERSLACK_PID defined as number 41 which conflict with PR_SET_THP_DISABLE in upstream kernel from 3.15. So redefine it's number to 47 to avoid the possible confliction. Signed-off-by: Alex Shi <alex.shi@linaro.org>
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index 28bb0b3..8c6edff 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -153,7 +153,7 @@
- arg2 slack value, 0 means "use default"
- arg3 pid of the thread whose timer slack needs to be set
*/ -#define PR_SET_TIMERSLACK_PID 41 +#define PR_SET_TIMERSLACK_PID 47
Problem is that the Android userspace is redefining PR_SET_TIMERSLACK_PID back to 41 [1]. So this kernel patch alone would not help.
Yea. I think we need to ping Ruchi at google and try to sync up with their plans. If their userspace is going to switch the PR number based on kernel versions we will also be in trouble. (My usage of 47 was only in the context of submitting it upstream. Once its upstream, that would be the number to migrate to, but not before then).
It might be better to have a patch which sets it to 127 or something which obviously won't collide in the near term, and then userspace can probe 127 first to see if its on a newer kernel, then fall back to 41 if its on an older kernel.
thanks -john