Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
On Sun, Oct 27 2013, Greg Thelen wrote: > this_cpu_sub() is implemented as negation and addition. > > This patch casts the adjustment to the counter type before negation to > sign extend the adjustment. This helps in cases where the counter > type is wider than an unsigned adjustment. An

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
On Sun, Oct 27 2013, Tejun Heo wrote: > On Sun, Oct 27, 2013 at 05:04:29AM -0700, Andrew Morton wrote: >> On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo wrote: >> >> > We probably want to cc stable for this and the next one. How should >> > these be routed? I can take these through percpu tree

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Tejun Heo
On Sun, Oct 27, 2013 at 05:04:29AM -0700, Andrew Morton wrote: > On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo wrote: > > > We probably want to cc stable for this and the next one. How should > > these be routed? I can take these through percpu tree or mm works > > too. Either way, it'd be

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Andrew Morton
On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo wrote: > We probably want to cc stable for this and the next one. How should > these be routed? I can take these through percpu tree or mm works > too. Either way, it'd be best to route them together. Yes, all three look like -stable material to

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Tejun Heo
On Sun, Oct 27, 2013 at 12:44:35AM -0700, Greg Thelen wrote: > this_cpu_sub() is implemented as negation and addition. > > This patch casts the adjustment to the counter type before negation to > sign extend the adjustment. This helps in cases where the counter > type is wider than an unsigned

[PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
this_cpu_sub() is implemented as negation and addition. This patch casts the adjustment to the counter type before negation to sign extend the adjustment. This helps in cases where the counter type is wider than an unsigned adjustment. An alternative to this patch is to declare such operations

[PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
this_cpu_sub() is implemented as negation and addition. This patch casts the adjustment to the counter type before negation to sign extend the adjustment. This helps in cases where the counter type is wider than an unsigned adjustment. An alternative to this patch is to declare such operations

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Tejun Heo
On Sun, Oct 27, 2013 at 12:44:35AM -0700, Greg Thelen wrote: this_cpu_sub() is implemented as negation and addition. This patch casts the adjustment to the counter type before negation to sign extend the adjustment. This helps in cases where the counter type is wider than an unsigned

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Andrew Morton
On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo t...@kernel.org wrote: We probably want to cc stable for this and the next one. How should these be routed? I can take these through percpu tree or mm works too. Either way, it'd be best to route them together. Yes, all three look like -stable

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Tejun Heo
On Sun, Oct 27, 2013 at 05:04:29AM -0700, Andrew Morton wrote: On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo t...@kernel.org wrote: We probably want to cc stable for this and the next one. How should these be routed? I can take these through percpu tree or mm works too. Either way, it'd

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
On Sun, Oct 27 2013, Tejun Heo wrote: On Sun, Oct 27, 2013 at 05:04:29AM -0700, Andrew Morton wrote: On Sun, 27 Oct 2013 07:22:55 -0400 Tejun Heo t...@kernel.org wrote: We probably want to cc stable for this and the next one. How should these be routed? I can take these through percpu

Re: [PATCH 2/3] percpu counter: cast this_cpu_sub() adjustment

2013-10-27 Thread Greg Thelen
On Sun, Oct 27 2013, Greg Thelen wrote: this_cpu_sub() is implemented as negation and addition. This patch casts the adjustment to the counter type before negation to sign extend the adjustment. This helps in cases where the counter type is wider than an unsigned adjustment. An alternative