Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-23 Thread Peter Zijlstra
On Fri, Apr 20, 2018 at 11:29:33PM +0200, Lukas Bulwahn wrote: > > On Fri, 20 Apr 2018, Peter Zijlstra wrote: > > > On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > > > The gain is stopping a warning that clutters the output log of clang. > > > > Well, you should not be using

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-23 Thread Peter Zijlstra
On Fri, Apr 20, 2018 at 11:29:33PM +0200, Lukas Bulwahn wrote: > > On Fri, 20 Apr 2018, Peter Zijlstra wrote: > > > On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > > > The gain is stopping a warning that clutters the output log of clang. > > > > Well, you should not be using

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Lukas Bulwahn
On Fri, 20 Apr 2018, Peter Zijlstra wrote: > On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > > The gain is stopping a warning that clutters the output log of clang. > > Well, you should not be using clang anyway. It is known to miscompile > the kernel. > There are some

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Lukas Bulwahn
On Fri, 20 Apr 2018, Peter Zijlstra wrote: > On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > > The gain is stopping a warning that clutters the output log of clang. > > Well, you should not be using clang anyway. It is known to miscompile > the kernel. > There are some

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > The gain is stopping a warning that clutters the output log of clang. Well, you should not be using clang anyway. It is known to miscompile the kernel. > To improve readability, one can drop the ifdef-structure and just keep > the

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
On Fri, Apr 20, 2018 at 06:29:07PM +0200, Philipp Klocke wrote: > The gain is stopping a warning that clutters the output log of clang. Well, you should not be using clang anyway. It is known to miscompile the kernel. > To improve readability, one can drop the ifdef-structure and just keep > the

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Philipp Klocke
On 20.04.2018 09:57, Peter Zijlstra wrote: > On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > >> This patch is motivated by the clang warning Wconstant-logical-operand, >> issued when logically comparing a variable to a constant integer that is >> neither 1 nor 0. It happens for

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Philipp Klocke
On 20.04.2018 09:57, Peter Zijlstra wrote: > On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > >> This patch is motivated by the clang warning Wconstant-logical-operand, >> issued when logically comparing a variable to a constant integer that is >> neither 1 nor 0. It happens for

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
Also, please don't cross-post with moderated lists, that's just annoying.

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
Also, please don't cross-post with moderated lists, that's just annoying.

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > This patch is motivated by the clang warning Wconstant-logical-operand, > issued when logically comparing a variable to a constant integer that is > neither 1 nor 0. It happens for sched_feat(x) when sysctl_sched_features > is

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-20 Thread Peter Zijlstra
On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > This patch is motivated by the clang warning Wconstant-logical-operand, > issued when logically comparing a variable to a constant integer that is > neither 1 nor 0. It happens for sched_feat(x) when sysctl_sched_features > is

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-18 Thread Nicholas Mc Guire
On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > Make sched_feat(x) return 1 or 0 instead of 2**x or 0 when > sysctl_sched_features is constant, by changing the left shift of the > mask-bit to a right shift of the bitmap. The behaviour of the code > remains unchanged. > We prove

Re: [PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-18 Thread Nicholas Mc Guire
On Mon, Apr 16, 2018 at 10:54:26AM +0200, Philipp Klocke wrote: > Make sched_feat(x) return 1 or 0 instead of 2**x or 0 when > sysctl_sched_features is constant, by changing the left shift of the > mask-bit to a right shift of the bitmap. The behaviour of the code > remains unchanged. > We prove

[PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-16 Thread Philipp Klocke
Make sched_feat(x) return 1 or 0 instead of 2**x or 0 when sysctl_sched_features is constant, by changing the left shift of the mask-bit to a right shift of the bitmap. The behaviour of the code remains unchanged. We prove this by showing that the compiler can evaluate this shift during compile

[PATCH] sched/fair: Change sched_feat(x) in !CONFIG_SCHED_DEBUG case

2018-04-16 Thread Philipp Klocke
Make sched_feat(x) return 1 or 0 instead of 2**x or 0 when sysctl_sched_features is constant, by changing the left shift of the mask-bit to a right shift of the bitmap. The behaviour of the code remains unchanged. We prove this by showing that the compiler can evaluate this shift during compile