Re: Query: Multiple Mappings to Mem and ARMV6+

2012-02-17 Thread viresh kumar
On Thu, Feb 16, 2012 at 9:48 AM, Catalin Marinas
 wrote:
> The DMA API implementation on ARM takes care of the cache cleaning and
> invalidating.
>

I believe that this is the reason why we have cache re-invalidation
(we invalidated
it in dma_map_*() earlier) in dma_unmap_*() calls for ARMv6+ for
DMA_FROM_DEVICE.
Am i Correct?

> BTW, I would say cache evictions rather than speculative writes as the
> latter is something else and ARM processors don't do it (only
> speculative reads).

Oops!! Sorry for the wrong words :(

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Query: Multiple Mappings to Mem and ARMV6+

2012-02-17 Thread viresh kumar
Hi Guys,

Sorry for starting the long old thread again, but i have to start it as i
was a bit confused. :(

We know that we can't have multiple mappings with different attributes
to the same physical memory on ARMv6+ machines due to speculative
prefetch.

So, we have following kind of mappings in kernel now (please correct me
if i am wrong):
- Low Mem: Mapped at boot time to - Normal Cacheable - Bufferable
- ioremap() - blocked on Low Mem, so that we don't create Device type mapping
to same mem
- dma_alloc_coherent() and others:
 - Without DMA_MEM_BUFFERABLE selected - gives strongly ordered mem
  (i.e. Non cacheable - Non Bufferable)
 - With DMA_MEM_BUFFERABLE selected - gives Normal - Non cacheable -
   Bufferable mapping
 - Maybe some other too...

I have a doubt with the last mapping mentioned above. We have two mappings
possibly to the same physical memory, with different attributes: One
is Cacheable
and other one is not.

Is this allowed by ARM? Because the patch in which Russell blocked ioremap on
Low Mem, he clearly mentioned that these attributes are also important and they
should be same.

Sorry if i am missing something :)

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Multiple Mappings to Mem and ARMV6+

2012-02-17 Thread viresh kumar
On Thu, Feb 16, 2012 at 9:15 AM, Catalin Marinas
 wrote:
> To summarise, if you mix Normal with Device or SO memory, you only get
> the guarantees of the Normal memory (e.g. early write acknowledgement,
> write buffer gathering, speculative accesses), so it's not recommended.
> If you mix Normal Cacheable with Normal Non-cacheable, you need to make
> sure that the cacheable mapping does not have any dirty cache lines that
> could be evicted. Additionally, if you read the buffer through the
> cacheable mapping later, you need to invalidate it first in case cache
> lines have been speculatively fetched. The ARM ARM definition however
> guarantees that accesses through the Non-cacheable mapping does not hit
> any cache lines (brought in via the Cacheable mapping).

I don't know if i understood correctly the earlier mails over the list, but with
speculative writes to Normal Cacheable Memory (Low Mem), we can still
enter an undefined state if we have separate kind of mapping as we have in
dma_alloc_*() and low mem.

Or

Who is responsible here to take care of cleaning and invalidate cached low
mem mappings in case of speculative writes?

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Multiple Mappings to Mem and ARMV6+

2012-02-20 Thread viresh kumar
On Feb 20, 2012 11:27 PM, "Russell King - ARM Linux" 
wrote:
>
> I hope it's now clear why we need to run over the buffer twice.

Thanks Russell.
Got it now.

--
Viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Multiple Mappings to Mem and ARMV6+

2012-02-20 Thread viresh kumar
On Feb 20, 2012 4:31 PM, "Catalin Marinas"  wrote:
>
> On 16 February 2012 18:14, viresh kumar  wrote:
> > On Thu, Feb 16, 2012 at 9:48 AM, Catalin Marinas
> >  wrote:
> >> The DMA API implementation on ARM takes care of the cache cleaning and
> >> invalidating.
> >
> > I believe that this is the reason why we have cache re-invalidation
> > (we invalidated
> > it in dma_map_*() earlier) in dma_unmap_*() calls for ARMv6+ for
> > DMA_FROM_DEVICE.
> > Am i Correct?
>
> Yes.
>

But why isn't keeping only the second one sufficient? Why don't we remove
it from dma_map_* routines?

--
Viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 02/13] clk: core: remove dead code paths

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 3ed36d3..4daacf5 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -194,7 +194,7 @@ static int __init clk_debug_init(void)
>  late_initcall(clk_debug_init);
>  #else
>  static inline int clk_debug_register(struct clk *clk) { return 0; }
> -#endif /* CONFIG_COMMON_CLK_DEBUG */
> +#endif

Why is this updated? Isn't this considered good practice anymore?

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 07/13] clk: add "const" for clk_ops of basic clks

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo 
> 
> The clk_ops of basic clks should have "const" to match the definition
> in "struct clk" and clk_register prototype.
> 
> Signed-off-by: Shawn Guo 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Rajendra Nayak 
> Cc: Viresh Kumar 
> ---
>  drivers/clk/clk-divider.c|2 +-
>  drivers/clk/clk-fixed-rate.c |2 +-
>  drivers/clk/clk-gate.c   |2 +-
>  drivers/clk/clk-mux.c|2 +-
>  include/linux/clk-private.h  |8 
>  5 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index 231cd6e..b1c4b02 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -146,7 +146,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, 
> unsigned long rate)
>   return 0;
>  }
>  
> -struct clk_ops clk_divider_ops = {
> +const struct clk_ops clk_divider_ops = {
>   .recalc_rate = clk_divider_recalc_rate,
>   .round_rate = clk_divider_round_rate,
>   .set_rate = clk_divider_set_rate,
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index 651b06f..027e477 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -33,7 +33,7 @@ static unsigned long clk_fixed_rate_recalc_rate(struct 
> clk_hw *hw,
>   return to_clk_fixed_rate(hw)->fixed_rate;
>  }
>  
> -struct clk_ops clk_fixed_rate_ops = {
> +const struct clk_ops clk_fixed_rate_ops = {
>   .recalc_rate = clk_fixed_rate_recalc_rate,
>  };
>  EXPORT_SYMBOL_GPL(clk_fixed_rate_ops);
> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
> index b688f47..fe2ff9e 100644
> --- a/drivers/clk/clk-gate.c
> +++ b/drivers/clk/clk-gate.c
> @@ -98,7 +98,7 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
>   return reg ? 1 : 0;
>  }
>  
> -struct clk_ops clk_gate_ops = {
> +const struct clk_ops clk_gate_ops = {
>   .enable = clk_gate_enable,
>   .disable = clk_gate_disable,
>   .is_enabled = clk_gate_is_enabled,
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index 45cad61..5424488 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -82,7 +82,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
>   return 0;
>  }
>  
> -struct clk_ops clk_mux_ops = {
> +const struct clk_ops clk_mux_ops = {
>   .get_parent = clk_mux_get_parent,
>   .set_parent = clk_mux_set_parent,
>  };
> diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
> index 5e4312b..5f4ccd7 100644
> --- a/include/linux/clk-private.h
> +++ b/include/linux/clk-private.h
> @@ -55,7 +55,7 @@ struct clk {
>   * alternative macro for static initialization
>   */
>  
> -extern struct clk_ops clk_fixed_rate_ops;
> +extern const struct clk_ops clk_fixed_rate_ops;
>  
>  #define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate,  \
>   _fixed_rate_flags)  \
> @@ -78,7 +78,7 @@ extern struct clk_ops clk_fixed_rate_ops;
>   .flags = _flags,\
>   };
>  
> -extern struct clk_ops clk_gate_ops;
> +extern const struct clk_ops clk_gate_ops;
>  
>  #define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,\
>   _flags, _reg, _bit_idx, \
> @@ -110,7 +110,7 @@ extern struct clk_ops clk_gate_ops;
>   .flags = _flags,\
>   };
>  
> -extern struct clk_ops clk_divider_ops;
> +extern const struct clk_ops clk_divider_ops;
>  
>  #define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr, \
>   _flags, _reg, _shift, _width,   \
> @@ -143,7 +143,7 @@ extern struct clk_ops clk_divider_ops;
>   .flags = _flags,\
>   };
>  
> -extern struct clk_ops clk_mux_ops;
> +extern const struct clk_ops clk_mux_ops;
>  
>  #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags,   \
>   _reg, _shift, _width,   \

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 01/13] clk: core: correct clk_set_rate kerneldoc

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> - * If clk has the CLK_SET_RATE_GATE flag set and it is enabled this call
> - * will fail; only when the clk is disabled will it be able to change
> - * its rate.

Why is CLK_SET_RATE_GATE removed? I already sent a patch to fix clk_set_rate()
for this. And i think it should be required.

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 08/13] clk: declare clk_ops of basic clks in clk-provider.h

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo 
> 
> Besides the static initialization, the clk_ops of basic clks could
> also be used by particular clk type being subclass of the basic clks.
> 
> For example, clk_busy_divider has the same clk_ops as clk_divider,
> except it has to wait for a busy bit before return success with
> .set_rate.  clk_busy_divider will somehow reuse clk_ops of clk_divider.
> 
> Since clk-provider.h is included by clk-private.h, it's safe to move
> those clk_ops declaration of basic clks form  clk-private.h into
> clk-provider.h, so that implementation of clks like clk_busy_divider
> above do not need to include clk-private.h to access those clk_ops.
> 
> Signed-off-by: Shawn Guo 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Rajendra Nayak 
> Cc: Viresh Kumar 
> ---
>  include/linux/clk-private.h  |8 
>  include/linux/clk-provider.h |4 
>  2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
> index 5f4ccd7..f19fee0 100644
> --- a/include/linux/clk-private.h
> +++ b/include/linux/clk-private.h
> @@ -55,8 +55,6 @@ struct clk {
>   * alternative macro for static initialization
>   */
>  
> -extern const struct clk_ops clk_fixed_rate_ops;
> -
>  #define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate,  \
>   _fixed_rate_flags)  \
>   static struct clk _name;\
> @@ -78,8 +76,6 @@ extern const struct clk_ops clk_fixed_rate_ops;
>   .flags = _flags,\
>   };
>  
> -extern const struct clk_ops clk_gate_ops;
> -
>  #define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,\
>   _flags, _reg, _bit_idx, \
>   _gate_flags, _lock) \
> @@ -110,8 +106,6 @@ extern const struct clk_ops clk_gate_ops;
>   .flags = _flags,\
>   };
>  
> -extern const struct clk_ops clk_divider_ops;
> -
>  #define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr, \
>   _flags, _reg, _shift, _width,   \
>   _divider_flags, _lock)  \
> @@ -143,8 +137,6 @@ extern const struct clk_ops clk_divider_ops;
>   .flags = _flags,\
>   };
>  
> -extern const struct clk_ops clk_mux_ops;
> -
>  #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags,   \
>   _reg, _shift, _width,   \
>   _mux_flags, _lock)  \
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 5508897..6eb8e5d 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -149,6 +149,7 @@ struct clk_fixed_rate {
>   u8  flags;
>  };
>  
> +extern const struct clk_ops clk_fixed_rate_ops;
>  struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
>   const char *parent_name, unsigned long flags,
>   unsigned long fixed_rate);
> @@ -180,6 +181,7 @@ struct clk_gate {
>  
>  #define CLK_GATE_SET_TO_DISABLE  BIT(0)
>  
> +extern const struct clk_ops clk_gate_ops;
>  struct clk *clk_register_gate(struct device *dev, const char *name,
>   const char *parent_name, unsigned long flags,
>   void __iomem *reg, u8 bit_idx,
> @@ -218,6 +220,7 @@ struct clk_divider {
>  #define CLK_DIVIDER_ONE_BASEDBIT(0)
>  #define CLK_DIVIDER_POWER_OF_TWO BIT(1)
>  
> +extern const struct clk_ops clk_divider_ops;
>  struct clk *clk_register_divider(struct device *dev, const char *name,
>   const char *parent_name, unsigned long flags,
>   void __iomem *reg, u8 shift, u8 width,
> @@ -252,6 +255,7 @@ struct clk_mux {
>  #define CLK_MUX_INDEX_ONEBIT(0)
>  #define CLK_MUX_INDEX_BITBIT(1)
>  
> +extern const struct clk_ops clk_mux_ops;
>  struct clk *clk_register_mux(struct device *dev, const char *name,
>   char **parent_names, u8 num_parents, unsigned long flags,
>   void __iomem *reg, u8 shift, u8 width,

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 04/13] clk: core: enforce clk_ops consistency

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> Documentation/clk.txt has some handsome ASCII art outlining which
> clk_ops are mandatory for a given clock, given the capability of the
> hardware.  Enforce those mandates with sanity checks in __clk_init.
> 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Shawn Guo 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Rajendra Nayak 
> Cc: Viresh Kumar 
> ---
>  drivers/clk/clk.c |   14 ++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index d83a9e0..9924aec 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1202,6 +1202,20 @@ void __clk_init(struct device *dev, struct clk *clk)
>   if (__clk_lookup(clk->name))
>   goto out;
>  
> + /* check that clk_ops are sane.  See Documentation/clk.txt */
> + if (clk->ops->set_rate &&
> + !(clk->ops->round_rate && clk->ops->recalc_rate)) {
> + pr_warning("%s: %s must implement .round_rate & .recalc_rate\n",
> + __func__, clk->name);
> + goto out;
> + }
> +
> + if (clk->ops->set_parent && !clk->ops->get_parent) {
> + pr_warning("%s: %s must implement .get_parent & .set_parent\n",
> + __func__, clk->name);
> +     goto out;
> + }
> +
>   /* throw a WARN if any entries in parent_names are NULL */
>   for (i = 0; i < clk->num_parents; i++)
>   WARN(!clk->parent_names[i],

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 05/13] clk: use kzalloc in clk_register_mux

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo 
> 
> Change clk_register_mux to use kzalloc, just like what all other basic
> clk registration functions do.
> 
> Signed-off-by: Shawn Guo 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Rajendra Nayak 
> Cc: Viresh Kumar 
> ---
>  drivers/clk/clk-mux.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index c71ad1f..50e0595 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -97,7 +97,7 @@ struct clk *clk_register_mux(struct device *dev, const char 
> *name,
>  {
>   struct clk_mux *mux;
>  
> - mux = kmalloc(sizeof(struct clk_mux), GFP_KERNEL);
> + mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
>  
>   if (!mux) {
>   pr_err("%s: could not allocate mux clk\n", __func__);

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 06/13] clk: remove unnecessary EXPORT_SYMBOL_GPL

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo 
> 
> It makes no sense to have EXPORT_SYMBOL_GPL on static functions.
> 
> Signed-off-by: Shawn Guo 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Rajendra Nayak 
> Cc: Viresh Kumar 
> ---
>  drivers/clk/clk-divider.c|3 ---
>  drivers/clk/clk-fixed-rate.c |1 -
>  drivers/clk/clk-gate.c   |3 ---
>  drivers/clk/clk-mux.c|2 --
>  4 files changed, 0 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index d5ac6a7..231cd6e 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -45,7 +45,6 @@ static unsigned long clk_divider_recalc_rate(struct clk_hw 
> *hw,
>  
>   return parent_rate / div;
>  }
> -EXPORT_SYMBOL_GPL(clk_divider_recalc_rate);
>  
>  /*
>   * The reverse of DIV_ROUND_UP: The maximum number which
> @@ -117,7 +116,6 @@ static long clk_divider_round_rate(struct clk_hw *hw, 
> unsigned long rate,
>   return r / div;
>   }
>  }
> -EXPORT_SYMBOL_GPL(clk_divider_round_rate);
>  
>  static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate)
>  {
> @@ -147,7 +145,6 @@ static int clk_divider_set_rate(struct clk_hw *hw, 
> unsigned long rate)
>  
>   return 0;
>  }
> -EXPORT_SYMBOL_GPL(clk_divider_set_rate);
>  
>  struct clk_ops clk_divider_ops = {
>   .recalc_rate = clk_divider_recalc_rate,
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index 90c79fb..651b06f 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -32,7 +32,6 @@ static unsigned long clk_fixed_rate_recalc_rate(struct 
> clk_hw *hw,
>  {
>   return to_clk_fixed_rate(hw)->fixed_rate;
>  }
> -EXPORT_SYMBOL_GPL(clk_fixed_rate_recalc_rate);
>  
>  struct clk_ops clk_fixed_rate_ops = {
>   .recalc_rate = clk_fixed_rate_recalc_rate,
> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
> index b5902e2..b688f47 100644
> --- a/drivers/clk/clk-gate.c
> +++ b/drivers/clk/clk-gate.c
> @@ -71,7 +71,6 @@ static int clk_gate_enable(struct clk_hw *hw)
>  
>   return 0;
>  }
> -EXPORT_SYMBOL_GPL(clk_gate_enable);
>  
>  static void clk_gate_disable(struct clk_hw *hw)
>  {
> @@ -82,7 +81,6 @@ static void clk_gate_disable(struct clk_hw *hw)
>   else
>   clk_gate_clear_bit(gate);
>  }
> -EXPORT_SYMBOL_GPL(clk_gate_disable);
>  
>  static int clk_gate_is_enabled(struct clk_hw *hw)
>  {
> @@ -99,7 +97,6 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
>  
>   return reg ? 1 : 0;
>  }
> -EXPORT_SYMBOL_GPL(clk_gate_is_enabled);
>  
>  struct clk_ops clk_gate_ops = {
>   .enable = clk_gate_enable,
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index 50e0595..45cad61 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -55,7 +55,6 @@ static u8 clk_mux_get_parent(struct clk_hw *hw)
>  
>   return val;
>  }
> -EXPORT_SYMBOL_GPL(clk_mux_get_parent);
>  
>  static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
>  {
> @@ -82,7 +81,6 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
>  
>   return 0;
>  }
> -EXPORT_SYMBOL_GPL(clk_mux_set_parent);
>  
>  struct clk_ops clk_mux_ops = {
>   .get_parent = clk_mux_get_parent,

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 09/13] clk: Make clk_get_rate() return 0 on error

2012-04-12 Thread Viresh Kumar
On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Rajendra Nayak 
> 
> Most users of clk_get_rate() actually assume a non zero
> return value as a valid rate returned. Returing -EINVAL
> might confuse such users, so make it instead return zero
> on error.
> 
> Besides the return value of clk_get_rate seems to be
> 'unsigned long'.
> 
> Signed-off-by: Rajendra nayak 
> Signed-off-by: Mike Turquette 
> Cc: Arnd Bergman 
> Cc: Olof Johansson 
> Cc: Russell King 
> Cc: Sascha Hauer 
> Cc: Shawn Guo 
> Cc: Richard Zhao 
> Cc: Saravana Kannan 
> Cc: Mark Brown 
> Cc: Andrew Lunn 
> Cc: Viresh Kumar 
> ---
>  drivers/clk/clk.c |6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 9924aec..a24b121 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -285,7 +285,7 @@ unsigned long __clk_get_rate(struct clk *clk)
>   unsigned long ret;
>  
>   if (!clk) {
> - ret = -EINVAL;
> + ret = 0;
>   goto out;
>   }
>  
> @@ -295,7 +295,7 @@ unsigned long __clk_get_rate(struct clk *clk)
>   goto out;
>  
>   if (!clk->parent)
> - ret = -ENODEV;
> + ret = 0;
>  
>  out:
>   return ret;
> @@ -560,7 +560,7 @@ EXPORT_SYMBOL_GPL(clk_enable);
>   * @clk: the clk whose rate is being returned
>   *
>   * Simply returns the cached rate of the clk.  Does not query the hardware.  
> If
> - * clk is NULL then returns -EINVAL.
> + * clk is NULL then returns 0.
>   */
>  unsigned long clk_get_rate(struct clk *clk)
>  {

Reviewed-by: Viresh Kumar 

-- 
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Experimental big.LITTLE MP tree

2012-07-11 Thread Viresh Kumar
On 4 July 2012 16:09, Amit Kucheria  wrote:

> Hi all,
>
> Git Location:
> http://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=summary
> Branch: big-LITTLE-MP-v1
>
> We're announcing a kernel tree to track the various topics of the
> big.LITTLE MP project. The aim of this tree is to help consolidate the
> various topic patchsets that improve the behaviour of Linux on
> asymmetric cores (e.g. big.LITTLE) and make smarter scheduling
> decisions possible in order to save power. I'd like to think of it as
> a linux-next tree focused on asymmetric support enablement.
>
> Viresh will recreate this tree when new versions of the topic
> patchsets are available. IOW, as the patches are reviewed on the lists
> and go through iterations, we'll pull each topic patchset into a topic
> branch (e.g. per-task-load-average-v2, arm-asymmetric-support-v3).
> Then a merge tree will be created (e.g. big-LITTLE-MP-v1) as needed
> based on the latest versions of these topics. This should allow users
> to track individual topics or leave out some topics if they so desire.
>  More topics will be added to this tree as the work becomes available.
>
> Linaro platform team will take the merge branch (big-LITTLE-MP-v1,
> -v2, etc.) and use it for platform enablement work and testing on real
> hardware and models.
>
> Problems should be reported on LKML/LAKML as usual if they are related
> to the individual topic trees. If they're related to a bad merge or
> config enablement please report on linaro-dev@lists.linaro.org.


Hi Andrey,

big-LITTLE-MP-v2 is ready to be pulled in. Following is a pull request for
it:

--8<->8---

The following changes since commit bd0a521e88aa7a06ae7aabaed7ae196ed4ad867a:

  Linux 3.5-rc6 (2012-07-07 17:23:56 -0700)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v2

for you to fetch changes up to ca789c61deb0219cd3fefdb26090bbc9701deada:

  Merge branches 'arm-asymmetric-support-v3', 'cpuidle-next-v4',
'per-cpu-thread-hotplug-v2', 'task-placement-v1' and 'config-fragments'
into big-LITTLE-MP-v3 (2012-07-11 10:51:29 +0100)



Ben Segall (1):
  sched: maintain per-rq runnable averages

Colin Cross (4):
  cpuidle: refactor out cpuidle_enter_state
  cpuidle: fix error handling in __cpuidle_register_device
  cpuidle: add support for states that affect multiple cpus
  cpuidle: coupled: add parallel barrier function

Morten Rasmussen (5):
  sched: Add ftrace events for entity load-tracking
  sched: entity load-tracking load_avg_ratio
  sched: load-tracking driven wakeup migration for HMP platforms
  sched: Forced migration of high load task on HMP platforms
  sched: Add HMP forced task migration ftrace event

Paul E. McKenney (1):
  rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread

Paul Turner (15):
  sched: track the runnable average on a per-task entitiy basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking

Peter Zijlstra (1):
  sched, x86: Remove broken power estimation

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (4):
  ARM: topology: Add arch_scale_freq_power function
  ARM: topology: factorize the update of sibling masks
  ARM: topology: Update cpu_power according to DT information
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (3):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  Merge branches 'arm-asymmetric-support-v3', 'cpuidle-next-v4',
'per-cpu-thread-hotplug-v2', 'task-placement-v1' and 

Re: Experimental big.LITTLE MP tree

2012-07-11 Thread Viresh Kumar
On 11 July 2012 14:32, Jon Medhurst (Tixy)  wrote:

> On Wed, 2012-07-11 at 10:57 +0100, Viresh Kumar wrote:
> There's going to be an 'interesting' merge with our TC2 enablement
> branch.
>
> In arch/arm/kernel/topology.c both branches factor out
> update_siblings_masks(), one of them modifies it.
>
> And in the same file, both branches also add functions called
> parse_dt_topology() with different functionality. In the resolution I'm
> currently testing, I fixed this by renaming the version from
> big-LITTLE-MP-v2 to parse_dt_for_cpu_capacity() as that seemed an
> accurate description of what it did. Is it tool late to also do this in
> the MP branch?


There are two patches doing the same thing (Vincent probably picked
this patch from Lorenzo and updated it a bit),

So, you can probably drop below patch from linux-arm tree and try a merge.

 c5833d5 ARM: kernel: build CPU topology from DT

I have tested this branch of mine, (big-LITTLE-MP-V2) with TC2 patches from
linux-arm and MP task placement patches are working fine. (Obviously I
dropped
above mentioned patch)

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Build failure for Omap

2012-07-12 Thread Viresh Kumar
Hi,

Sorry if I am missing something very obvious, I am building OMAP for the
first time.

I fetched latest kernel from:

http://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro

tried to do following:

make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4 none
is selected in .config)
make ARCH=arm O=../panda uImage

  LD  drivers/usb/built-in.o
  LD  drivers/video/console/built-in.o
  LD  drivers/video/built-in.o
  LD  drivers/built-in.o
  LINKvmlinux
  LD  vmlinux.o
  MODPOST vmlinux.o
  GEN .version
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  LD  init/built-in.o
arch/arm/mach-vexpress/built-in.o: In function `v2m_dt_timer_init':
/root/viresh/work/linux/kernel/arch/arm/mach-vexpress/v2m.c:663: undefined
reference to `arch_timer_broken_for_sched_clock'
make[1]: *** [vmlinux] Error 1
make: *** [sub-make] Error 2


Something is wrong: why vexpress??

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Build failure for Omap

2012-07-12 Thread Viresh Kumar
On 12 July 2012 16:19, Andrey Konovalov  wrote:

> make ARCH=arm O=../panda omap2plus_defconfig (After this, OMAP 2/3/4
>> none is selected in .config)
>> make ARCH=arm O=../panda uImage
>>
>>LD  init/built-in.o
>> arch/arm/mach-vexpress/built-**in.o: In function `v2m_dt_timer_init':
>> /root/viresh/work/linux/**kernel/arch/arm/mach-vexpress/**v2m.c:663:
>> undefined reference to `arch_timer_broken_for_sched_**clock'
>> make[1]: *** [vmlinux] Error 1
>> make: *** [sub-make] Error 2
>>
>>
>> Something is wrong: why vexpress??
>>
>
> Yes, you are right.
> I am looking at this now.


Broken probably by:

 commit 9c118124d1c75f06b64a756be579d3b4cf2c99ec
Author: Arnd Bergmann 
Date:   Tue May 8 15:17:25 2012 +

ARM: initial multiplatform support

This lets us build a multiplatform kernel for experimental purposes.
However, it will not be useful for any real work, because it relies
on a number of useful things to be disabled for now:

-config ARCH_OMAP
+config ARCH_CHOICE_OMAP
bool "TI OMAP"
-   select HAVE_CLK
-   select ARCH_REQUIRE_GPIOLIB
-   select ARCH_HAS_CPUFREQ
-   select CLKSRC_MMIO
-   select GENERIC_CLOCKEVENTS
-   select ARCH_HAS_HOLES_MEMORYMODEL
+   select ARCH_OMAP
select MAY_HAVE_SPARSE_IRQ
help
  Support for TI's OMAP platform (OMAP1/2/3/4).
@@ -982,6 +963,51 @@ config ARCH_ZYNQ
  Support for Xilinx Zynq ARM Cortex A9 Platform
 endchoice

+config ARCH_OMAP
+   bool
+   select HAVE_CLK
+   select ARCH_REQUIRE_GPIOLIB
+   select ARCH_HAS_CPUFREQ
+   select CLKSRC_MMIO
+   select GENERIC_CLOCKEVENTS
+   select ARCH_HAS_HOLES_MEMORYMODEL
+   select MAY_HAVE_SPARSE_IRQ
+


This patch must have updated all defconfigs too, which probably now require
to have
CONFIG_ARCH_CHOICE_OMAP?

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Build failure for Omap

2012-07-13 Thread Viresh Kumar
On 12 July 2012 16:59, Scott Bambrough  wrote:

> Try the omap4plus_defconfig.
>

There is no such defconfig, only following are present:

omap1_defconfig
omap2plus_defconfig

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL] big-LITTLE-MP-V3

2012-07-16 Thread Viresh Kumar
Hi Andrey,

V3 contains following updates:

- per-cpu-thread-hotplug-v3 instead of v2
- All branches rebased on v3.5-rc7

They are compile tested.

The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c:

  Linux 3.5-rc7 (2012-07-14 15:40:28 -0700)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v3

for you to fetch changes up to dc56b26b3ea05693552b85253db6bfdd62c8f763:

  Merge branches 'arm-asymmetric-support-v3', 'cpuidle-next-v4',
'per-cpu-thread-hotplug-v3', 'task-placement-v1' and 'config-fragments'
into big-LITTLE-MP-v3 (2012-07-16 16:10:14 +0100)



Ben Segall (1):
  sched: maintain per-rq runnable averages

Colin Cross (4):
  cpuidle: refactor out cpuidle_enter_state
  cpuidle: fix error handling in __cpuidle_register_device
  cpuidle: add support for states that affect multiple cpus
  cpuidle: coupled: add parallel barrier function

Morten Rasmussen (5):
  sched: Add ftrace events for entity load-tracking
  sched: entity load-tracking load_avg_ratio
  sched: load-tracking driven wakeup migration for HMP platforms
  sched: Forced migration of high load task on HMP platforms
  sched: Add HMP forced task migration ftrace event

Paul E. McKenney (1):
  rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread

Paul Turner (15):
  sched: track the runnable average on a per-task entitiy basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking

Peter Zijlstra (1):
  sched, x86: Remove broken power estimation

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (4):
  ARM: topology: Add arch_scale_freq_power function
  ARM: topology: factorize the update of sibling masks
  ARM: topology: Update cpu_power according to DT information
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (1):
  Merge branches 'arm-asymmetric-support-v3', 'cpuidle-next-v4',
'per-cpu-thread-hotplug-v3', 'task-placement-v1' and 'config-fragments'
into big-LITTLE-MP-v3

 arch/arm/Kconfig  |   29 +
 arch/arm/kernel/topology.c|  209 +++-
 arch/x86/kernel/cpu/Makefile  |2 +-
 arch/x86/kernel/cpu/sched.c   |   55 -
 drivers/cpuidle/Kconfig   |3 +
 drivers/cpuidle/Makefile  |1 +
 drivers/cpuidle/coupled.c |  715 +++
 drivers/cpuidle/cpuidle.c |   68 +-
 drivers/cpuidle/cpuidle.h |   32 +
 drivers/infiniband/hw/ehca/ehca_irq.c |  253 ++--
 drivers/infiniband/hw/ehca/ehca_irq.h |6 +-
 include/linux/cpuidle.h   |   11 +
 include/linux/kthread.h   |   11 +-
 include/linux/sched.h |   19 +
 include/linux/smpboot.h   |   43 +
 include/trace/events/sched.h  |  151 +++
 kernel/cpu.c  |   10 +-
 kernel/kthread.c  |  185 ++-
 kernel/rcutree.c  |   12 +-
 kernel/rcutree.h  |   15 +-
 kernel/rcutree_plugin.h   |  403 ++-
 kernel/rcutree_trace.c|3 +-
 kernel/sched/core.c   |5 +
 kernel/sched/debug.c  |   39 +-
 kernel/sched/fair.c   | 1105 ++---
 kernel/sched/features.h   |2 +-
 kernel/sched/sched.h  |   60 +-
 kernel/smpboot.c  |  229 
 kernel/smpboot.h  |4 +
 kernel/softirq.c  |  107 +-
 kernel/watchdog.c |  263 ++--
 linaro/configs/android.conf   |   30 +
 linaro/configs/big-LITTLE-MP.conf |9 +
 linaro/configs/linaro-base.conf   

[GIT PULL] bit-LITTLE-MP-v4

2012-07-25 Thread Viresh Kumar
  ARM: topology: Add arch_scale_freq_power function
  ARM: topology: factorize the update of sibling masks
  ARM: topology: Update cpu_power according to DT information
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (3):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  Merge branches 'arm-asymmetric-support-v3', 'cpuidle-next-v4',
'per-cpu-thread-hotplug-v3', 'fast-slow-cpu-dt-v1', 'wq-hotplug-v1' and
'config-fragments' into big-LITTLE-MP-v4

 Documentation/workqueue.txt   |  103 +-
 arch/arm/Kconfig  |   29 +
 arch/arm/kernel/topology.c|  278 -
 arch/x86/kernel/cpu/Makefile  |2 +-
 arch/x86/kernel/cpu/sched.c   |   55 -
 drivers/cpuidle/Kconfig   |3 +
 drivers/cpuidle/Makefile  |1 +
 drivers/cpuidle/coupled.c |  715 +++
 drivers/cpuidle/cpuidle.c |   68 +-
 drivers/cpuidle/cpuidle.h |   32 +
 drivers/infiniband/hw/ehca/ehca_irq.c |  253 ++--
 drivers/infiniband/hw/ehca/ehca_irq.h |6 +-
 include/linux/cpu.h   |5 +-
 include/linux/cpuidle.h   |   11 +
 include/linux/kthread.h   |   19 +-
 include/linux/sched.h |   19 +
 include/linux/smpboot.h   |   43 +
 include/trace/events/sched.h  |  151 +++
 include/trace/events/workqueue.h  |2 +-
 kernel/cpu.c  |   10 +-
 kernel/kthread.c  |  273 -
 kernel/rcutree.c  |   12 +-
 kernel/rcutree.h  |   15 +-
 kernel/rcutree_plugin.h   |  403 ++-
 kernel/rcutree_trace.c|3 +-
 kernel/sched/core.c   |5 +
 kernel/sched/debug.c  |   39 +-
 kernel/sched/fair.c   | 1099 ++---
 kernel/sched/features.h   |2 +-
 kernel/sched/sched.h  |   60 +-
 kernel/smpboot.c  |  229 
 kernel/smpboot.h  |4 +
 kernel/softirq.c  |  107 +-
 kernel/watchdog.c |  263 ++--
 kernel/workqueue.c| 1144 --
 linaro/configs/android.conf   |   30 +
 linaro/configs/big-LITTLE-MP.conf |9 +
 linaro/configs/linaro-base.conf   |   84 ++
 linaro/configs/ubuntu-minimal.conf|   24 +
 linaro/configs/ubuntu.conf| 2133
+
 40 files changed, 5935 insertions(+), 1808 deletions(-)
 delete mode 100644 arch/x86/kernel/cpu/sched.c
 create mode 100644 drivers/cpuidle/coupled.c
 create mode 100644 include/linux/smpboot.h
 create mode 100644 linaro/configs/android.conf
 create mode 100644 linaro/configs/big-LITTLE-MP.conf
 create mode 100644 linaro/configs/linaro-base.conf
 create mode 100644 linaro/configs/ubuntu-minimal.conf
 create mode 100644 linaro/configs/ubuntu.conf
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v4

2012-07-26 Thread Viresh Kumar
On 25 July 2012 18:14, Paul E. McKenney  wrote:

> You are missing some fixes, please see below.  I can also email you the
> updated patches, if that would be easier than pulling them from -rcu.


Hi Andrey,

So sorry, but you need to pull v4 again as there were few updated patches
from paul. :(
Can you please pull this again?

I have created another branch for new fixes from
Paul, per-cpu-thread-hotplug-v3-fixed,
as it wasn't a v4 actually.

I have updated the same merge branch big-LITTLE-MP-v4 that you can pull in.

@Paul: I have applied all three changes you suggested, please see if
everything is fine now.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL] bit-LITTLE-MP-v5

2012-08-14 Thread Viresh Kumar
Hi Andrey,

Below is pull request for v5 of MP work, following are the main changes:
1. Removed from this merge:
- cpuidle-next-v4 - Already in rc1
- wq-hotplug-v1 - Already in rc1
- arm-asymmetric-support-v3 - Only one patch not mailined others are
dropped
2. Rebased over v3.6-rc1
3. Extra patch from Morten/Tixy

NOTE: Compile tested only

--->8-

The following changes since commit 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee:

  Linux 3.6-rc1 (2012-08-02 16:38:10 -0700)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v5

for you to fetch changes up to 6a1b927448144fe2fa7e28949cc54ea71bbe69d1:

  Merge branches 'arm-asymmetric-support-v3-v3.6-rc1',
'per-cpu-thread-hotplug-v3-fixed', 'fast-slow-cpu-dt-v1' and
'config-fragments' into big-LITTLE-MP-v5 (2012-08-14 16:57:13 +0530)



Ben Segall (1):
  sched: maintain per-rq runnable averages

Jon Medhurst (Tixy) (1):
  sched: Use device-tree to provide fast/slow CPU list for HMP

Morten Rasmussen (6):
  sched: Add ftrace events for entity load-tracking
  sched: entity load-tracking load_avg_ratio
  sched: load-tracking driven wakeup migration for HMP platforms
  sched: Forced migration of high load task on HMP platforms
  sched: Add HMP forced task migration ftrace event
  sched: Add missing cpus_allowed checks to HMP scheduler

Paul E. McKenney (2):
  rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread
  hotplug: Fix UP bug in smpboot hotplug code

Paul Turner (15):
  sched: track the runnable average on a per-task entitiy basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking

Rafael J. Wysocki (1):
  Revert "NMI watchdog: fix for lockup detector breakage on resume"

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (1):
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (3):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  Merge branches 'arm-asymmetric-support-v3-v3.6-rc1',
'per-cpu-thread-hotplug-v3-fixed', 'fast-slow-cpu-dt-v1' and
'config-fragments' into big-LITTLE-MP-v5

 arch/arm/Kconfig  |   29 +
 arch/arm/kernel/topology.c|   69 ++
 drivers/infiniband/hw/ehca/ehca_irq.c |  253 ++--
 drivers/infiniband/hw/ehca/ehca_irq.h |6 +-
 include/linux/kthread.h   |   11 +-
 include/linux/sched.h |   27 +-
 include/linux/smpboot.h   |   43 +
 include/trace/events/sched.h  |  151 +++
 kernel/Makefile   |3 +-
 kernel/cpu.c  |   10 +-
 kernel/kthread.c  |  185 ++-
 kernel/power/suspend.c|3 -
 kernel/rcutree.c  |   12 +-
 kernel/rcutree.h  |   15 +-
 kernel/rcutree_plugin.h   |  403 ++-
 kernel/rcutree_trace.c|3 +-
 kernel/sched/core.c   |5 +
 kernel/sched/debug.c  |   39 +-
 kernel/sched/fair.c   | 1097 ++---
 kernel/sched/features.h   |2 +-
 kernel/sched/sched.h  |   60 +-
 kernel/smpboot.c  |  233 
 kernel/smpboot.h  |4 +
 kernel/softirq.c  |  108 +-
 kernel/watchdog.c |  280 ++---
 linaro/configs/android.conf   |   33 +
 linaro/configs/big-LITTLE-MP.conf |9 +
 linaro/configs/linaro-base.conf   |   84 ++
 linaro/configs/ubuntu-minimal.conf|   24 +
 linaro/configs/ubuntu.conf| 2133
+
 30 files changed

Re: Silas Boyd-Wickizer's patches

2012-08-15 Thread Viresh Kumar
On 15 August 2012 16:04, Paul E. McKenney wrote:

> Hello!
>
> Silas posted a series of four patches that fix bugs where the online
> CPUs are iterated over without proper protection against CPUs coming
> online and going offline:
>
> 0/4: https://lkml.org/lkml/2012/8/3/416
> 1/4: https://lkml.org/lkml/2012/8/3/422
> 2/4: https://lkml.org/lkml/2012/8/3/423
> 3/4: https://lkml.org/lkml/2012/8/3/418
> 4/4: https://lkml.org/lkml/2012/8/3/417
>
> Could you please pull these into the integration tree?


Ya sure. Thanks for letting me know. I have created and pushed a branch for
it.
But haven't merged it into MP branch, as i am waiting for reply on Tejun's
work.
As soon as that is done, will merge both and publish.

viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v5

2012-08-16 Thread Viresh Kumar
On 15 August 2012 00:16, Andrey Konovalov wrote:

> Great!
> big-LITTLE-MP-v5 (together with the updated multiplatform topic) has been
> merged into linux-linaro-core-tracking tree. The tag is llct-20120814.0.


Hi Andrey,

There are few patches that are required to be part of this pull and
one is required to be dropped. I have created big-LITTLE-MP-v6
branch over v-3.6-rc2, but can't send a pull request as rc2 is still
not there in your tree. Please pull it once you have rc2.

I have created the new branch purposefully, instead of using v5.
Some people may want to use Vincent's patch that is dropped.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v5

2012-08-22 Thread Viresh Kumar
On 17 August 2012 10:20, Viresh Kumar  wrote:

> There are few patches that are required to be part of this pull and
> one is required to be dropped. I have created big-LITTLE-MP-v6
> branch over v-3.6-rc2, but can't send a pull request as rc2 is still
> not there in your tree. Please pull it once you have rc2.
>
> I have created the new branch purposefully, instead of using v5.
> Some people may want to use Vincent's patch that is dropped.
>

Hi Andrey,

After some internal discussion it came out that Vincent's "enable
ARCH_POWER"
patch is very much required and can't be dropped.

I have updated v6 branch only for this change. Can you please re-pull this
branch?
Sorry for wasting your time. :(

viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL] bit-LITTLE-MP-v7

2012-08-23 Thread Viresh Kumar
Hi Andrey,

Below is pull request for v7 of MP work, you can skip v6-resend pull
request that i sent yesterday.
Following are the main changes:
- Based on v3.6-rc3
- per-task-load-average updated with v3
- applied Tixy's patch from fast-slow-cpu-dt-v1 to task-placement-v1 as
they are
  somewhat related only. And so removed fast-slow-cpu-dt-v1 branch

NOTE: Compile tested only

--
viresh

--->8-

The following changes since commit fea7a08acb13524b47711625eebea40a0ede69a0:

  Linux 3.6-rc3 (2012-08-22 13:29:06 -0700)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v7

for you to fetch changes up to 549b2d49de89f9454a933a32efb5825a076efd42:

  Merge branches 'per-cpu-thread-hotplug-v3-fixed', 'task-placement-v1',
'cpu-hotplug-get_online_cpus-v1', 'arm-asymmetric-support-v3-v3.6-rc1' and
'config-fragments' into big-LITTLE-MP-v7 (2012-08-24 09:24:14 +0530)



Ben Segall (1):
  sched: maintain per-rq runnable averages

Jon Medhurst (6):
  configs: Initial core configs
  configs: Make CONFIG_MODULES part of linaro-base
  Merge branch 'config-core-3.4' into config-core-tracking
  configs: Replace CONFIG_PERF_COUNTERS with CONFIG_PERF_EVENTS
  configs: android: Enable FB_EARLYSUSPEND
  configs: android: Enable CONFIG_INPUT_UINPUT to get aidb working

Jon Medhurst (Tixy) (1):
  sched: Use device-tree to provide fast/slow CPU list for HMP

Morten Rasmussen (6):
  sched: Add ftrace events for entity load-tracking
  sched: entity load-tracking load_avg_ratio
  sched: load-tracking driven wakeup migration for HMP platforms
  sched: Forced migration of high load task on HMP platforms
  sched: Add HMP forced task migration ftrace event
  sched: Add missing cpus_allowed checks to HMP scheduler

Paul E. McKenney (2):
  rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread
  hotplug: Fix UP bug in smpboot hotplug code

Paul Turner (15):
  sched: track the runnable average on a per-task entitiy basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking

Ricardo Salveti de Araujo (8):
  configs: moving previous ubuntu.conf as ubuntu-minimal and creating a
full ubuntu one
  configs: ubuntu: be compatible with the enforce script
  configs: ubuntu: disabling CODA_FS, seems to be broken atm
  configs: ubuntu: disabling CGROUPS as default
  Merge branch 'config-core-3.4' into config-core-tracking
  configs: ubuntu: updating configs for 3.5
  configs: ubuntu: disabling CONFIG_MTD_NAND_NANDSIM=m, breaking build
  config: ubuntu: ATH6KL should be platform dependent

Silas Boyd-Wickizer (4):
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (1):
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (3):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v1', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1' and 'config-fragments' into
big-LITTLE-MP-v7

 arch/arm/Kconfig  |   29 +
 arch/arm/kernel/topology.c|   69 ++
 arch/x86/kernel/cpuid.c   |5 +
 arch/x86/kernel/msr.c |5 +
 drivers/hwmon/coretemp.c  |5 +
 drivers/hwmon/via-cputemp.c   |5 +
 drivers/infin

Compilation Break for omap2plus_defconifg

2012-08-24 Thread Viresh Kumar
Hi,

Compilation for omap2plus_defconfig is broken on current: linux-linaro
branch. [1]

Following is the compilation error:

/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/kernel/sleep.S:
Assembler messages:
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/kernel/sleep.S:88:
Error: selected processor does not support ARM mode `bfc r0,#24,#8'

--
Viresh

[1]:
http://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7

2012-08-24 Thread Viresh Kumar
On 24 August 2012 12:32, Jon Medhurst (Tixy)  wrote:

> Is this critical for this month's release? The release candidate builds
> are possibly already in testing so we would have to request that they
> are stopped and redone?
>

Not sure, what is fixed in this version? Maybe Morten can tell if anything
crucial for task placement work is there or not.

https://lkml.org/lkml/2012/8/23/267

I just noticed a new version and applied it. Can be pulled in later if there
is nothing very important in it.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Compilation Break for omap2plus_defconifg

2012-08-24 Thread Viresh Kumar
On 24 August 2012 13:38, Jon Medhurst (Tixy)  wrote:

> That looks like its caused by patch from the ARM LT...
>
>   "ARM: kernel: fix MPIDR cpu_{suspend}/{resume} usage"
>
> I'll work on a fix. (I believe this was in last month's release branch
> as well so I assume it's not critical for this month's release. We don't
> release any ARMv6 boards.)


Not blocking for my work. I just compiled it and got error. So reported it.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


tilt-3.4 compilation broken

2012-08-24 Thread Viresh Kumar
Hi Andy,

I got following error in compilation of TILT-3.4 at

http://git.linaro.org/gitweb?p=landing-teams/working/ti/kernel.git;a=shortlog;h=refs/heads/tilt-3.4

  Using /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git as
source for kernel
  CHK include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
  CC  arch/arm/kernel/asm-offsets.s
In file included from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/barrier.h:41:0,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/domain.h:14,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/thread_info.h:28,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/thread_info.h:53,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/preempt.h:9,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/spinlock.h:50,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/seqlock.h:29,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/time.h:8,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/timex.h:56,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/sched.h:57,
 from
/home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/kernel/asm-offsets.c:13:
arch/arm/include/generated/mach/barriers.h:1:33: fatal error:
mach-omap2/barriers.h: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1


I tried compiling it with omap4plus_defconfig. I want to use a stable
kernel for panda board,
which one should i always refer to?

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7

2012-08-24 Thread Viresh Kumar
On 24 August 2012 14:49, Amit Kucheria  wrote:

> While our goal is to keep track of the bleeding edge, and I think
> you're doing a great job there, let's figure out a plan to minimise
> the number of kernel releases we make.
>
> Can you look at your previous 6 releases and their dates and figure
> out if it would be ok to do only 2 releases a month? Were there urgent
> bug fixes that need to be fed in, or was it just new revs of the
> patchsets? If the former, then making immediate releases is the best
> course, if the latter, perhaps we can batch up all changes and make a
> release on predictable dates - say 1st and 15th of every month. This
> will lighten the load for everyone concerned: you, Andrey, build team
> with one downside: integration problems will not get detected until
> late.
>
> I'd like to hear your views.


Hi Amit,

Following are the dates when I have published releases:

V1 - 4th July
V2 - 11 July
V3 - 16 July
V4 - 25 July
V4 (resend) - 26 July: Patches requested by Paul E. McKenney
V5 - 14 Aug
V6 - 17 Aug - removed Vincent's patch
V6 (resend) - 23 Aug - Vincent's patch again required :)
V7 - 24 Aug

Most of the times, release were due to:
- New branch/topic
- New Version of earlier patchset
- Sometime fixes

Till now, the stats are pretty ugly :(
Mostly because of the cases, where i just publish a version and somebody
asks me
to include/exclude something. That makes the resend versions found above.

I would like to go for 5th and 20th of every month, as 20th is a bit close
to WG freeze
date for the month.

In the mean time, for whatever updates we have, I will create the next
version branch
and publish it. But will not send a pull request for it.

How does that sound to you guys?

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7

2012-08-24 Thread Viresh Kumar
On 24 August 2012 16:39, Jon Medhurst (Tixy)  wrote:

> Sounds OK from my point of view, except that rather than fixed dates
> each month the should probably be tied to the release dates. E.g. the
> Monday of the week before release (the normal WG cut-of date), and two
> weeks before (or after?) that?


Even better.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: tilt-3.4 compilation broken

2012-08-24 Thread Viresh Kumar
On 24 August 2012 14:34, Viresh Kumar  wrote:

> Hi Andy,
>
> I got following error in compilation of TILT-3.4 at
>
>
> http://git.linaro.org/gitweb?p=landing-teams/working/ti/kernel.git;a=shortlog;h=refs/heads/tilt-3.4
>
>   Using /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git as
> source for kernel
>   CHK include/generated/utsrelease.h
> make[2]: `include/generated/mach-types.h' is up to date.
>   CC  arch/arm/kernel/asm-offsets.s
> In file included from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/barrier.h:41:0,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/domain.h:14,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/include/asm/thread_info.h:28,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/thread_info.h:53,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/preempt.h:9,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/spinlock.h:50,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/seqlock.h:29,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/time.h:8,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/timex.h:56,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/include/linux/sched.h:57,
>  from
> /home/arm/work/kernel/linaro/linux-linaro-bitLITTLE-MP.git/arch/arm/kernel/asm-offsets.c:13:
> arch/arm/include/generated/mach/barriers.h:1:33: fatal error:
> mach-omap2/barriers.h: No such file or directory
> compilation terminated.
> make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
>
>
> I tried compiling it with omap4plus_defconfig. I want to use a stable
> kernel for panda board,
> which one should i always refer to?
>

Leave that. My fault :(

I always use O=../some-folder for all compilation related commands and
do all this with script every time (so no manual mistakes). But since some
time
i am observing the current source folder also gets dirty. Some time it
complains for running make mrproper on source folder and sometimes
gives above errors.

make mrproper fixed this issue.

--
viresh
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7

2012-08-27 Thread Viresh Kumar
On 24 August 2012 16:39, Jon Medhurst (Tixy)  wrote:
> Sounds OK from my point of view, except that rather than fixed dates
> each month the should probably be tied to the release dates. E.g. the
> Monday of the week before release (the normal WG cut-of date), and two
> weeks before (or after?) that?

Hi Guys,

I have updated

https://wiki.linaro.org/WorkingGroups/PowerManagement/Process/bigLittleMPTree

as per our last discussion. Please see if i have missed something.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7 - IMPORTANT

2012-09-02 Thread Viresh Kumar
On 28 August 2012 10:37, Viresh Kumar  wrote:
> I have updated
>
> https://wiki.linaro.org/WorkingGroups/PowerManagement/Process/bigLittleMPTree
>
> as per our last discussion. Please see if i have missed something.

Hi Guys,

I will be sending PULL request of big-LITTLE-MP-v7 today as per schedule.
Do let me know if you want anything to be included in it before that.

@Morten: What should i do with patch reported by Santosh:

ARM-Add-HMP-scheduling-support-for-ARM-architecture

Do i need to apply it over your branch?

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL] bit-LITTLE-MP-v7 resend

2012-09-03 Thread Viresh Kumar
Hi Andrey,

Below is pull request for v7 of MP work. Following are the main changes:
- Based on v3.6-rc3
- per-task-load-average-v3
- applied ARM-Add-HMP-scheduling-support-for-ARM-architecture to
  task-placement-v1 branch
- applied Tixy's patch from fast-slow-cpu-dt-v1 to
task-placement-v1 as they are
  somewhat related only.

NOTE: Compile tested only

In future i will be sending you PULL requests according to:

https://wiki.linaro.org/WorkingGroups/PowerManagement/Process/bigLittleMPTree

--
viresh

--->8-


The following changes since commit fea7a08acb13524b47711625eebea40a0ede69a0:

  Linux 3.6-rc3 (2012-08-22 13:29:06 -0700)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v7

for you to fetch changes up to 5ad1da269acf2b07235a526c8d2dad183acc5a9d:

  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v1', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1' and 'config-fragments' into
big-LITTLE-MP-v7 (2012-09-03 15:52:42 +0530)



Ben Segall (1):
  sched: maintain per-rq runnable averages

Jon Medhurst (6):
  configs: Initial core configs
  configs: Make CONFIG_MODULES part of linaro-base
  Merge branch 'config-core-3.4' into config-core-tracking
  configs: Replace CONFIG_PERF_COUNTERS with CONFIG_PERF_EVENTS
  configs: android: Enable FB_EARLYSUSPEND
  configs: android: Enable CONFIG_INPUT_UINPUT to get aidb working

Jon Medhurst (Tixy) (1):
  sched: Use device-tree to provide fast/slow CPU list for HMP

Morten Rasmussen (7):
  sched: Add ftrace events for entity load-tracking
  sched: entity load-tracking load_avg_ratio
  sched: load-tracking driven wakeup migration for HMP platforms
  sched: Forced migration of high load task on HMP platforms
  sched: Add HMP forced task migration ftrace event
  sched: Add missing cpus_allowed checks to HMP scheduler
  ARM: Add HMP scheduling support for ARM architecture

Paul E. McKenney (2):
  rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread
  hotplug: Fix UP bug in smpboot hotplug code

Paul Turner (15):
  sched: track the runnable average on a per-task entitiy basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for load-tracking

Ricardo Salveti de Araujo (8):
  configs: moving previous ubuntu.conf as ubuntu-minimal and
creating a full ubuntu one
  configs: ubuntu: be compatible with the enforce script
  configs: ubuntu: disabling CODA_FS, seems to be broken atm
  configs: ubuntu: disabling CGROUPS as default
  Merge branch 'config-core-3.4' into config-core-tracking
  configs: ubuntu: updating configs for 3.5
  configs: ubuntu: disabling CONFIG_MTD_NAND_NANDSIM=m, breaking build
  config: ubuntu: ATH6KL should be platform dependent

Silas Boyd-Wickizer (4):
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug
  Use get_online_cpus to avoid races involving CPU hotplug

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (1):
  sched: cpu_power: enable ARCH_POWER

Viresh Kumar (3):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v1', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1' and 'config-fragments' into
big-LITTLE-MP-v7

 arch/arm/Kconfig  |   29 +
 arch/arm/include/asm/topology.h   |   32 +
 arch/arm/kernel/topol

BUG: Reboot fails on panda board.

2012-09-03 Thread Viresh Kumar
Hi Andy,

I am using Panda board with linaro Nano filesystem over SDHC card. When i
issue "reboot" command from prompt, it hangs:


root@linaro-nano:/# reboot

Broadcast message from root@linaro-nano
(/dev/ttyO2) at 4:44 ...

The system is going down for reboot NOW!
root@linaro-nano:/# [  668.889892] Restarting system.


Is this a know issue?

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


How to soft-reset Panda Board

2012-09-04 Thread Viresh Kumar
Hi Guys,

I have struggled today for some time to soft-reset panda board because
the switch S1 (PWRON_RESET) resets the board, but doesn't
start booting it again from xloader. Prompt simply hangs !!

My kernel was crashing after uncompressing linux... print. I didn't
had a debugger
to see value of __log_buf variable. So i wanted to soft reset the board and
check content of memory at address pointed by __log_buf.

I wanted to keep the contents of RAM as it is, so can't reboot it by unplugging
the power cable.

At last i found the trick to soft-reset the board with help of S1
button. Following
are the steps:

- Press S1 once, LED D1 will switch off
- remove SD card
- reinsert the card
- Press S1 again, LED D1 will switch on and board is rebooted, keeping RAM's
contents as is.

Hope, this will help somebody in future.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: BUG: Reboot fails on panda board.

2012-09-04 Thread Viresh Kumar
On 4 September 2012 10:25, Viresh Kumar  wrote:
> Hi Andy,
>
> I am using Panda board with linaro Nano filesystem over SDHC card. When i
> issue "reboot" command from prompt, it hangs:
>
>
> root@linaro-nano:/# reboot
>
> Broadcast message from root@linaro-nano
> (/dev/ttyO2) at 4:44 ...
>
> The system is going down for reboot NOW!
> root@linaro-nano:/# [  668.889892] Restarting system.
>
>
> Is this a know issue?

I hope below mail from me is the solution of this issue too:

8<---8<--

I have struggled today for some time to soft-reset panda board because
the switch S1 (PWRON_RESET) resets the board, but doesn't
start booting it again from xloader. Prompt simply hangs !!

My kernel was crashing after uncompressing linux... print. I didn't
had a debugger
to see value of __log_buf variable. So i wanted to soft reset the board and
check content of memory at address pointed by __log_buf.

I wanted to keep the contents of RAM as it is, so can't reboot it by unplugging
the power cable.

At last i found the trick to soft-reset the board with help of S1
button. Following
are the steps:

- Press S1 once, LED D1 will switch off
- remove SD card
- reinsert the card
- Press S1 again, LED D1 will switch on and board is rebooted, keeping RAM's
contents as is.

Hope, this will help somebody in future.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Powertop] [PATCH] Fix timer and work perf events timestamp tracing

2012-09-05 Thread Viresh Kumar
On Wed, Sep 5, 2012 at 3:52 PM, Rajagopal Venkat
 wrote:
> Incorrect timer and work perf events timestamp tracing is one
> of the reason for reporting usage over 100%. This patch will
> resolve the issue by
> - rejecting the events for which entry timestamp is not recorded.
> Currently these events exit timestamp itself is considered as
> usage period resulting in over 100% usage.
> - clearing event timestamps from global map at the end of each
> measurement to avoid collision with earlier recorded timestamps.

Tried it few times on Panda Board.

Tested-by: Viresh Kumar 

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7 - IMPORTANT

2012-09-05 Thread Viresh Kumar
On 5 September 2012 19:16, Morten Rasmussen  wrote:
> The patch is already in the original patch set, so I'm not sure why it
> is missing.
>
> http://linux-arm.org/git?p=arm-bls.git;a=commit;h=1416200dd62551aa9ac4aa207b0c66651ccbff2c
>
> It needs to be there for the HMP scheduling to work.

Surprisingly, it wasn't there in my tree since beginning... I have
included it now. :)

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [GIT PULL] bit-LITTLE-MP-v7 - IMPORTANT

2012-09-06 Thread Viresh Kumar
Tixy,

Can you please answer below queries? I am not sure about them.

--
viresh

On 6 September 2012 20:04, Lei Wen  wrote:
> Hi Viresh,
>
> On Thu, Sep 6, 2012 at 12:29 AM, Viresh Kumar 
> wrote:
>>
>> On 5 September 2012 19:16, Morten Rasmussen 
>> wrote:
>> > The patch is already in the original patch set, so I'm not sure why it
>> > is missing.
>> >
>> >
>> > http://linux-arm.org/git?p=arm-bls.git;a=commit;h=1416200dd62551aa9ac4aa207b0c66651ccbff2c
>> >
>> > It needs to be there for the HMP scheduling to work.
>>
>> Surprisingly, it wasn't there in my tree since beginning... I have
>> included it now. :)
>>
>
> I have several questions related how to run the mp over fastmodel.
> For the kernel config file, I see there are many for VE:
> android_vexpress_defconfig
> ubuntu_vexpress_defconfig
> vexpress_defconfig
> vexpress_tc2_defconfig
> Which one is suitable for the kernel run over fastmodel?
>
> Also the dts and bootwrapper, should I use below link?
> git://linux-arm.org/arm-dts.git
> git://git.linaro.org/arm/models/boot-wrapper.git or
> git://linux-arm.org/boot-wrapper.git
>
> Thanks,
> Lei
>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


boot fail with omap4-panda.dts release 12.08

2012-09-07 Thread Viresh Kumar
Hi,

I am trying to boot kernel on panda board. I got the source from:
http://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro

Following is my branch HEAD:

commit 7f39bb7ab9591c6254e5930a00d762e4b37f08b2
Merge: 1d10459 8b29cd5
Author: Andrey Konovalov 
Date:   Mon Sep 3 17:10:24 2012 +0400

Merge branch 'tracking-ll-last-minute-fixes' into merge-linux-linaro


I am using following for compilation: omap2plus_defconfig, omap4-panda.dts

When i try to boot, kernel hangs after uncompressing linux...
If i just remove the 0x815f from bootm command.. i.e. boot without dtb...
it boots fine.

Earlier i have flashed my card using linaro-media-create. Got, H/w package and
devel rootfs from 12.08 release. Replaced uImage and board.dtb in /dev/mmcblk0p1

viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


how to update kernel image on panda board?

2012-09-07 Thread Viresh Kumar
Hi Guys,

I have flashed my SD card with linaro-media-create with precise-devel
and latest h/w pack (12.08)

Now i have two requirements:
- Always use my copy of devel instead of the new devel everytime from
the latest release
  As i do install a lot of stuff on it. Will apt-get update would be
enough to get the latest things
  from linaro?
- Update kernel image, with my kernel, from mainline or linaro I have
tried a lot of
  combinations... but always some issues

I went through this too: https://wiki.linaro.org/Resources/HowTo/KernelDeploy

I want to know what's the best practice of updating image that is
followed by most of the Linaro developers?

viresh

NOTE: I raised this query here too:
http://ask.linaro.org/questions/1625/how-do-you-update-kernel-image-on-panda-board

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: boot fail with omap4-panda.dts release 12.08

2012-09-09 Thread Viresh Kumar
On 9 September 2012 14:11, Amit Kucheria  wrote:
> I believe Viresh has tried mainline as well. But some DT bits might be
> missing from there. Without DT, things start working and that is the
> route we'll take if we're unable to get help with LEB u-boot
> command-line parameters and 3.6 kernels on Pandaboard.
>
> We're coming up on 3.6 soon. Do we know when we'll have updated OMAP support?

Actually mainline image was working with DT, but i wanted to work on Linaro tree
to get latest patches on various topics...

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: boot fail with omap4-panda.dts release 12.08

2012-09-10 Thread Viresh Kumar
On 10 September 2012 20:25, Ricardo Salveti  wrote:
> That's interesting. Which rev from upstream did you use?
>
> I know Andrey is updating linux-linaro this week, which should be on
> top of 3.6-rc5.

Earlier i tried rc2 or 3.. Yesterday i tried rc5.. kernel boots with
all of them.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PULL REQUEST]: ARM: perf: multi-PMU support

2012-09-14 Thread Viresh Kumar
On 14 September 2012 14:56, Sudeep KarkadaNagesha
 wrote:
> Please pull the following changes for the multiple CPU PMU support
> (re-based to v3.6-rc5). Few patches in the list below are already
> queued up for 3.7.
>
> Since you have access to internal repository, I am posting patches on
> the same.
> Let me know if you face any issues.

Done.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PULL REQUEST]: ARM: perf: multi-PMU support

2012-09-14 Thread Viresh Kumar
On 14 September 2012 14:56, Sudeep KarkadaNagesha
 wrote:
> Please pull the following changes for the multiple CPU PMU support
> (re-based to v3.6-rc5). Few patches in the list below are already
> queued up for 3.7.
>
> Since you have access to internal repository, I am posting patches on
> the same.
> Let me know if you face any issues.

One more thing. Keep me in cc when you post these upstream, as we
want patches patches landing up in b.L. tree to get upstreamed quickly. :)

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL]: big LITTLE MP v8

2012-09-17 Thread Viresh Kumar
nc_counter_valid
  ARM: perf: define per-cpu arm_pmu instead of a single global pointer
  ARM: perf: register the init functions with the bindings
  ARM: perf: add support for per-cluster/multiple PMUs
  ARM: perf: save/restore pmu registers in pm notifier

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Vincent Guittot (2):
  sched: cpu_power: enable ARCH_POWER
  sched: Fix nohz_idle_balance()

Viresh Kumar (4):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  config-frag/big-LITTLE: Use device-tree to provide fast/slow CPU
list for HMP
  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1', 'rcu-hotplug-v1',
'arm-multi_pmu_v1', 'scheduler-misc-v1' and 'config-fragments' into
big-LITTLE-MP-v8

Will Deacon (6):
  ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs
  ARM: pmu: remove unused reservation mechanism
  ARM: perf: remove mysterious compiler barrier
  ARM: perf: probe devicetree in preference to current CPU
  ARM: perf: prepare for moving CPU PMU code into separate file
  ARM: perf: move CPU-specific PMU handling code into separate file

 Documentation/devicetree/bindings/arm/pmu.txt |7 +
 MAINTAINERS   |1 -
 arch/arm/Kconfig  |   54 +-
 arch/arm/include/asm/perf_event.h |9 +-
 arch/arm/include/asm/pmu.h|  128 +-
 arch/arm/include/asm/topology.h   |   35 +
 arch/arm/kernel/Makefile  |4 +-
 arch/arm/kernel/perf_event.c  |  391 +
 arch/arm/kernel/perf_event_cpu.c  |  351 
 arch/arm/kernel/perf_event_v6.c   |  152 +-
 arch/arm/kernel/perf_event_v7.c   |  330 ++--
 arch/arm/kernel/perf_event_xscale.c   |  179 ++-
 arch/arm/kernel/pmu.c |   36 -
 arch/arm/kernel/topology.c|  118 ++
 arch/arm/mach-bcmring/arch.c  |3 +-
 arch/arm/mach-omap2/devices.c |3 +-
 arch/arm/mach-pxa/devices.c   |3 +-
 arch/arm/mach-realview/realview_eb.c  |3 +-
 arch/arm/mach-realview/realview_pb1176.c  |3 +-
 arch/arm/mach-realview/realview_pb11mp.c  |3 +-
 arch/arm/mach-realview/realview_pba8.c|3 +-
 arch/arm/mach-realview/realview_pbx.c |3 +-
 arch/arm/mach-tegra/devices.c |3 +-
 arch/arm/mach-ux500/cpu-db8500.c  |4 +-
 arch/arm/mach-vexpress/ct-ca9x4.c |3 +-
 arch/arm/plat-iop/pmu.c   |3 +-
 arch/arm/plat-samsung/devs.c  |3 +-
 arch/x86/kernel/cpuid.c   |5 +
 arch/x86/kernel/msr.c |5 +
 drivers/hwmon/coretemp.c  |5 +
 drivers/hwmon/via-cputemp.c   |5 +
 drivers/infiniband/hw/ehca/ehca_irq.c |  253 ++-
 drivers/infiniband/hw/ehca/ehca_irq.h |6 +-
 include/linux/kthread.h   |   11 +-
 include/linux/sched.h |   34 +
 include/linux/smpboot.h   |   43 +
 include/trace/events/sched.h  |  153 ++
 kernel/Makefile   |3 +-
 kernel/cpu.c  |   10 +-
 kernel/kthread.c  |  185 ++-
 kernel/rcutree.c  |  105 +-
 kernel/rcutree.h  |   18 +-
 kernel/rcutree_plugin.h   |  403 +
 kernel/rcutree_trace.c|7 +-
 kernel/sched/core.c   |   56 +-
 kernel/sched/debug.c  |   39 +-
 kernel/sched/fair.c   | 1258 +--
 kernel/sched/features.h   |2 +-
 kernel/sched/sched.h  |   68 +-
 kernel/smpboot.c  |  233 +++
 kernel/smpboot.h  |4 +
 kernel/softirq.c  |  108 +-
 kernel/watchdog.c |  263 ++-
 linaro/configs/android.conf   |   33 +
 linaro/configs/big-LITTLE-MP.conf |9 +
 linaro/configs/linaro-base.conf   |   84 +
 linaro/configs/ubuntu-minimal.conf|   24 +
 linaro/configs/ubuntu.conf| 2133 +
 58 file

[PATCH 2/3] workqueue: create __flush_delayed_work to avoid duplicating code

2012-09-25 Thread Viresh Kumar
flush_delayed_work() and flush_delayed_work_sync() had major portion of code
similar. This patch introduces another routine __flush_delayed_work() which
contains the common part to avoid code duplication.

Signed-off-by: Viresh Kumar 
---
 kernel/workqueue.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 692d976..692a55b 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2820,6 +2820,13 @@ bool cancel_work_sync(struct work_struct *work)
 }
 EXPORT_SYMBOL_GPL(cancel_work_sync);
 
+static inline void __flush_delayed_work(struct delayed_work *dwork)
+{
+   if (del_timer_sync(&dwork->timer))
+   __queue_work(raw_smp_processor_id(),
+get_work_cwq(&dwork->work)->wq, &dwork->work);
+}
+
 /**
  * flush_delayed_work - wait for a dwork to finish executing the last queueing
  * @dwork: the delayed work to flush
@@ -2834,9 +2841,7 @@ EXPORT_SYMBOL_GPL(cancel_work_sync);
  */
 bool flush_delayed_work(struct delayed_work *dwork)
 {
-   if (del_timer_sync(&dwork->timer))
-   __queue_work(raw_smp_processor_id(),
-get_work_cwq(&dwork->work)->wq, &dwork->work);
+   __flush_delayed_work(dwork);
return flush_work(&dwork->work);
 }
 EXPORT_SYMBOL(flush_delayed_work);
@@ -2855,9 +2860,7 @@ EXPORT_SYMBOL(flush_delayed_work);
  */
 bool flush_delayed_work_sync(struct delayed_work *dwork)
 {
-   if (del_timer_sync(&dwork->timer))
-   __queue_work(raw_smp_processor_id(),
-get_work_cwq(&dwork->work)->wq, &dwork->work);
+   __flush_delayed_work(dwork);
return flush_work_sync(&dwork->work);
 }
 EXPORT_SYMBOL(flush_delayed_work_sync);
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-25 Thread Viresh Kumar
Workqueues queues work on current cpu, if the caller haven't passed a preferred
cpu. This may wake up an idle CPU, which is actually not required.

This work can be processed by any CPU and so we must select a non-idle CPU here.
This patch adds in support in workqueue framework to get preferred CPU details
from the scheduler, instead of using current CPU.

Signed-off-by: Viresh Kumar 
---
 arch/arm/Kconfig   | 11 +++
 kernel/workqueue.c | 25 ++---
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5944511..da17bd0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1594,6 +1594,17 @@ config HMP_SLOW_CPU_MASK
  Specify the cpuids of the slow CPUs in the system as a list string,
  e.g. cpuid 0+1 should be specified as 0-1.
 
+config MIGRATE_WQ
+   bool "(EXPERIMENTAL) Migrate Workqueues to non-idle cpu"
+   depends on SMP && EXPERIMENTAL
+   help
+ Workqueues queues work on current cpu, if the caller haven't passed a
+ preferred cpu. This may wake up an idle CPU, which is actually not
+ required. This work can be processed by any CPU and so we must select
+ a non-idle CPU here.  This patch adds in support in workqueue
+ framework to get preferred CPU details from the scheduler, instead of
+ using current CPU.
+
 config HAVE_ARM_SCU
bool
help
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 692a55b..fd8df4a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -456,6 +456,16 @@ static inline void debug_work_activate(struct work_struct 
*work) { }
 static inline void debug_work_deactivate(struct work_struct *work) { }
 #endif
 
+/* This enables migration of a work to a non-IDLE cpu instead of current cpu */
+#ifdef CONFIG_MIGRATE_WQ
+static int wq_select_cpu(void)
+{
+   return sched_select_cpu(SD_NUMA, -1);
+}
+#else
+#define wq_select_cpu()smp_processor_id()
+#endif
+
 /* Serializes the accesses to the list of workqueues. */
 static DEFINE_SPINLOCK(workqueue_lock);
 static LIST_HEAD(workqueues);
@@ -995,7 +1005,7 @@ static void __queue_work(unsigned int cpu, struct 
workqueue_struct *wq,
struct global_cwq *last_gcwq;
 
if (unlikely(cpu == WORK_CPU_UNBOUND))
-   cpu = raw_smp_processor_id();
+   cpu = wq_select_cpu();
 
/*
 * It's multi cpu.  If @wq is non-reentrant and @work
@@ -1066,8 +1076,9 @@ int queue_work(struct workqueue_struct *wq, struct 
work_struct *work)
 {
int ret;
 
-   ret = queue_work_on(get_cpu(), wq, work);
-   put_cpu();
+   preempt_disable();
+   ret = queue_work_on(wq_select_cpu(), wq, work);
+   preempt_enable();
 
return ret;
 }
@@ -1102,7 +1113,7 @@ static void delayed_work_timer_fn(unsigned long __data)
struct delayed_work *dwork = (struct delayed_work *)__data;
struct cpu_workqueue_struct *cwq = get_work_cwq(&dwork->work);
 
-   __queue_work(smp_processor_id(), cwq->wq, &dwork->work);
+   __queue_work(wq_select_cpu(), cwq->wq, &dwork->work);
 }
 
 /**
@@ -1158,7 +1169,7 @@ int queue_delayed_work_on(int cpu, struct 
workqueue_struct *wq,
if (gcwq && gcwq->cpu != WORK_CPU_UNBOUND)
lcpu = gcwq->cpu;
else
-   lcpu = raw_smp_processor_id();
+   lcpu = wq_select_cpu();
} else
lcpu = WORK_CPU_UNBOUND;
 
@@ -2823,8 +2834,8 @@ EXPORT_SYMBOL_GPL(cancel_work_sync);
 static inline void __flush_delayed_work(struct delayed_work *dwork)
 {
if (del_timer_sync(&dwork->timer))
-   __queue_work(raw_smp_processor_id(),
-get_work_cwq(&dwork->work)->wq, &dwork->work);
+   __queue_work(wq_select_cpu(), get_work_cwq(&dwork->work)->wq,
+&dwork->work);
 }
 
 /**
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 0/3] Create sched_select_cpu() and use it in workqueues

2012-09-25 Thread Viresh Kumar
In order to save power, it would be useful to schedule work onto non-IDLE cpus
instead of waking up an IDLE one.

To achieve this, we need scheduler to guide kernel frameworks (like: timers &
workqueues) on which is the most preferred CPU that must be used for these
tasks.

This patchset is about implementing this concept.

The first patch adds sched_select_cpu() routine which returns the preferred cpu
which is non-idle. It accepts max level of sched domain, upto which we can
choose a CPU from. It can accept following options: SD_SIBLING, SD_MC, SD_BOOK,
SD_CPU or SD_NUMA.

Second and Third patch are about adapting this change in workqueue framework.

Earlier discussions over this concept were done at last LPC:
http://summit.linuxplumbersconf.org/lpc-2012/meeting/90/lpc2012-sched-timer-workqueue/

Figures:


Test case 1:
- Performed on TC2 with ubuntu-devel
- Boot TC2 and run
 $ trace-cmd record -e workqueue_execute_start

This will trace only the points, where the work actually runs.

Do, this for 150 seconds.

Results:
-
Domain 0: CPU 0-1
Domain 1: CPU 2-4


Base Kernel: Without my modifications:
-

CPU No. of works run by CPU
-   ---
CPU0:   7
CPU1:   445
CPU2:   444
CPU3:   315
CPU4:   226


With my modifications:
--

CPU No. of works run by CPU
---
CPU0:   31
CPU2:   797
CPU3:   274
CPU4:   86


Test case 2:
---
I have created a small module, which does following:
- Create one work for each CPU (using queue_work_on(), so must schedule on that
  cpu)
- Above work, will queue "n" works for each cpu with queue_work(). These works
  are tracked within the module and results are printed at the end.

This gave similar results, with n ranging from 10 to 1000.

Viresh Kumar (3):
  sched: Create sched_select_cpu() to give preferred CPU for power
saving
  workqueue: create __flush_delayed_work to avoid duplicating code
  workqueue: Schedule work on non-idle cpu instead of current one

 arch/arm/Kconfig  | 11 +++
 include/linux/sched.h | 11 +++
 kernel/sched/core.c   | 88 +++
 kernel/workqueue.c| 36 ++---
 4 files changed, 115 insertions(+), 31 deletions(-)

-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 1/3] sched: Create sched_select_cpu() to give preferred CPU for power saving

2012-09-25 Thread Viresh Kumar
In order to save power, it would be useful to schedule work onto non-IDLE cpus
instead of waking up an IDLE one.

To achieve this, we need scheduler to guide kernel frameworks (like: timers &
workqueues) on which is the most preferred CPU that must be used for these
tasks.

This routine returns the preferred cpu which is non-idle. It accepts max level
of sched domain, upto which we can choose a CPU from. It can accept following
options: SD_SIBLING, SD_MC, SD_BOOK, SD_CPU or SD_NUMA.

If user passed SD_MC, then we can return a CPU from SD_SIBLING or SD_MC.  If the
level requested by user is not available for the current kernel configuration,
then current CPU will be returned.

If user has passed NUMA level, then we may need to go through numa_levels too.
Second parameter to this routine will now come into play. Its minimum value is
zero, in which case there is only one NUMA level to go through. If you want to
go through all NUMA levels, pass -1 here. This should cover all NUMA levels.

This patch reuses the code from get_nohz_timer_target() routine, which had
similar implementation. get_nohz_timer_target() is also modified to use
sched_select_cpu() now.

Signed-off-by: Viresh Kumar 
---
 include/linux/sched.h | 11 +++
 kernel/sched/core.c   | 88 +++
 2 files changed, 79 insertions(+), 20 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0059212..4b660ee 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -281,6 +281,10 @@ static inline void select_nohz_load_balancer(int 
stop_tick) { }
 static inline void set_cpu_sd_state_idle(void) { }
 #endif
 
+#ifdef CONFIG_SMP
+extern int sched_select_cpu(int sd_max_level, u32 numa_level);
+#endif
+
 /*
  * Only dump TASK_* tasks. (0 for all tasks)
  */
@@ -868,6 +872,13 @@ enum cpu_idle_type {
 #define SD_PREFER_SIBLING  0x1000  /* Prefer to place tasks in a sibling 
domain */
 #define SD_OVERLAP 0x2000  /* sched_domains of this level overlap 
*/
 
+/* sched-domain levels */
+#define SD_SIBLING 0x01/* Only for CONFIG_SCHED_SMT */
+#define SD_MC  0x02/* Only for CONFIG_SCHED_MC */
+#define SD_BOOK0x04/* Only for CONFIG_SCHED_BOOK */
+#define SD_CPU 0x08/* Always enabled */
+#define SD_NUMA0x10/* Only for CONFIG_NUMA */
+
 extern int __weak arch_sd_sibiling_asym_packing(void);
 
 struct sched_group_power {
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index de97083..a14014c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -551,22 +551,7 @@ void resched_cpu(int cpu)
  */
 int get_nohz_timer_target(void)
 {
-   int cpu = smp_processor_id();
-   int i;
-   struct sched_domain *sd;
-
-   rcu_read_lock();
-   for_each_domain(cpu, sd) {
-   for_each_cpu(i, sched_domain_span(sd)) {
-   if (!idle_cpu(i)) {
-   cpu = i;
-   goto unlock;
-   }
-   }
-   }
-unlock:
-   rcu_read_unlock();
-   return cpu;
+   return sched_select_cpu(SD_NUMA, -1);
 }
 /*
  * When add_timer_on() enqueues a timer into the timer wheel of an
@@ -639,6 +624,66 @@ void sched_avg_update(struct rq *rq)
}
 }
 
+/* Mask of all the SD levels present in current configuration */
+static int sd_present_levels;
+
+/*
+ * This routine returns the preferred cpu which is non-idle. It accepts max
+ * level of sched domain, upto which we can choose a CPU from. It can accept
+ * following options: SD_SIBLING, SD_MC, SD_BOOK, SD_CPU or SD_NUMA.
+ *
+ * If user passed SD_MC, then we can return a CPU from SD_SIBLING or SD_MC.
+ * If the level requested by user is not available for the current kernel
+ * configuration, then current CPU will be returned.
+ *
+ * If user has passed NUMA level, then we may need to go through numa_levels
+ * too. Second parameter to this routine will now come into play. Its minimum
+ * value is zero, in which case there is only one NUMA level to go through. If
+ * you want to go through all NUMA levels, pass -1 here. This should cover all
+ * NUMA levels.
+ */
+int sched_select_cpu(int sd_max_level, u32 numa_level)
+{
+   struct sched_domain *sd;
+   int cpu = smp_processor_id();
+   int i, sd_target_levels;
+
+   sd_target_levels = (sd_max_level | (sd_max_level - 1))
+   & sd_present_levels;
+
+   /* return current cpu if no sd_present_levels <= sd_max_level */
+   if (!sd_target_levels)
+   return cpu;
+
+   rcu_read_lock();
+   for_each_domain(cpu, sd) {
+   for_each_cpu(i, sched_domain_span(sd)) {
+   if (!idle_cpu(i)) {
+   cpu = i;
+   goto unlock;
+   }
+   }
+
+   /* Do we need to

Re: [PATCH 0/3] Create sched_select_cpu() and use it in workqueues

2012-09-25 Thread Viresh Kumar
On 25 September 2012 16:06, Viresh Kumar  wrote:
> Test case 2:
> ---
> I have created a small module, which does following:
> - Create one work for each CPU (using queue_work_on(), so must schedule on 
> that
>   cpu)
> - Above work, will queue "n" works for each cpu with queue_work(). These works
>   are tracked within the module and results are printed at the end.
>
> This gave similar results, with n ranging from 10 to 1000.
>

http://git.linaro.org/gitweb?p=people/vireshk/module.git;a=summary

Source of this module can be found at above repo.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-25 Thread Viresh Kumar
On 25 September 2012 16:52, Peter Zijlstra  wrote:
> On Tue, 2012-09-25 at 16:06 +0530, Viresh Kumar wrote:
>> @@ -1066,8 +1076,9 @@ int queue_work(struct workqueue_struct *wq,
>> struct work_struct *work)
>>  {
>> int ret;
>>
>> -   ret = queue_work_on(get_cpu(), wq, work);
>> -   put_cpu();
>> +   preempt_disable();
>> +   ret = queue_work_on(wq_select_cpu(), wq, work);
>> +   preempt_enable();
>>
>> return ret;
>>  }
>
> Right, so the problem I see here is that wq_select_cpu() is horridly
> expensive..

But this is what the initial idea during LPC we had. Any improvements here
you can suggest?

>> @@ -1102,7 +1113,7 @@ static void delayed_work_timer_fn(unsigned long
>> __data)
>> struct delayed_work *dwork = (struct delayed_work *)__data;
>> struct cpu_workqueue_struct *cwq = get_work_cwq(&dwork->work);
>>
>> -   __queue_work(smp_processor_id(), cwq->wq, &dwork->work);
>> +   __queue_work(wq_select_cpu(), cwq->wq, &dwork->work);
>>  }
>
> Shouldn't timer migration have sorted this one?

Maybe yes. Will investigate more on it.

Thanks for your early feedback.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 2/3] workqueue: create __flush_delayed_work to avoid duplicating code

2012-09-25 Thread Viresh Kumar
On 25 September 2012 23:17, Tejun Heo  wrote:
> On Tue, Sep 25, 2012 at 04:06:07PM +0530, Viresh Kumar wrote:
>> flush_delayed_work() and flush_delayed_work_sync() had major portion of code
>> similar. This patch introduces another routine __flush_delayed_work() which
>> contains the common part to avoid code duplication.
>
> This part has seen a lot of update in pending wq/for-3.7 branch.
> Please rebase on top of that.
>
>  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-3.7

So, this patch is not required anymore. As they are already merged :)

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-26 Thread Viresh Kumar
On 25 September 2012 23:26, Tejun Heo  wrote:
> On Tue, Sep 25, 2012 at 04:06:08PM +0530, Viresh Kumar wrote:
>> +config MIGRATE_WQ
>> + bool "(EXPERIMENTAL) Migrate Workqueues to non-idle cpu"
>> + depends on SMP && EXPERIMENTAL
>> + help
>> +   Workqueues queues work on current cpu, if the caller haven't passed a
>> +   preferred cpu. This may wake up an idle CPU, which is actually not
>> +   required. This work can be processed by any CPU and so we must select
>> +   a non-idle CPU here.  This patch adds in support in workqueue
>> +   framework to get preferred CPU details from the scheduler, instead of
>> +   using current CPU.
>
> I don't think it's a good idea to make behavior like this a config
> option.  The behavior difference is subtle and may induce incorrect
> behavior.

Ok. Will remove it.

>> @@ -1066,8 +1076,9 @@ int queue_work(struct workqueue_struct *wq, struct 
>> work_struct *work)
>>  {
>>   int ret;
>>
>> - ret = queue_work_on(get_cpu(), wq, work);
>> - put_cpu();
>> + preempt_disable();
>> + ret = queue_work_on(wq_select_cpu(), wq, work);
>> + preempt_enable();
>
> First of all, I'm not entirely sure this is safe.  queue_work() used
> to *guarantee* that the work item would execute on the local CPU.  I
> don't think there are many which depend on that but I'd be surprised
> if this doesn't lead to some subtle problems somewhere.  It might not
> be realistic to audit all users and we might have to just let it
> happen and watch for the fallouts.  Dunno, still wanna see some level
> of auditing.

Ok.

> Also, I'm wondering why this is necessary at all for workqueues.  For
> schedule/queue_work(), you pretty much know the current cpu is not
> idle.  For delayed workqueue, sure but for immediate scheduling, why?

This was done for below scenario:
- A cpu has programmed a timer and is IDLE now.
- CPU gets into interrupt handler due to timer and queues a work. As the
CPU is currently IDLE, we should queue this work to some other CPU.

I know this patch did migrate works in all cases. Will fix it by queuing work
only for this case in V2.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH V2 1/3] sched: Create sched_select_cpu() to give preferred CPU for power saving

2012-09-27 Thread Viresh Kumar
In order to save power, it would be useful to schedule work onto non-IDLE cpus
instead of waking up an IDLE one.

To achieve this, we need scheduler to guide kernel frameworks (like: timers &
workqueues) on which is the most preferred CPU that must be used for these
tasks.

This routine returns the preferred cpu which is non-idle. It accepts a bitwise
OR of SD_* flags present in linux/sched.h. If the local CPU isn't idle, it is
returned back. If it is idle, then we must look for another CPU which have all
the flags passed as argument as set. Also, as this activity is part of load
balancing only, SD_LOAD_BALANCE must also be set for selected domain.

This patch reuses the code from get_nohz_timer_target() routine, which had
similar implementation. get_nohz_timer_target() is also modified to use
sched_select_cpu() now.

Signed-off-by: Viresh Kumar 
---
 include/linux/sched.h | 16 ++--
 kernel/sched/core.c   | 69 +++
 2 files changed, 56 insertions(+), 29 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0059212..d2722cf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -272,14 +272,26 @@ extern void init_idle_bootup_task(struct task_struct 
*idle);
 
 extern int runqueue_is_locked(int cpu);
 
-#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
+#ifdef CONFIG_SMP
+extern int sched_select_cpu(unsigned int sd_flags);
+
+#ifdef CONFIG_NO_HZ
 extern void select_nohz_load_balancer(int stop_tick);
 extern void set_cpu_sd_state_idle(void);
-extern int get_nohz_timer_target(void);
+/*
+ * In the semi idle case, use the nearest busy cpu for migrating timers
+ * from an idle cpu.  This is good for power-savings.
+ *
+ * We don't do similar optimization for completely idle system, as
+ * selecting an idle cpu will add more delays to the timers than intended
+ * (as that cpu's timer base may not be uptodate wrt jiffies etc).
+ */
+#define get_nohz_timer_target() sched_select_cpu(0)
 #else
 static inline void select_nohz_load_balancer(int stop_tick) { }
 static inline void set_cpu_sd_state_idle(void) { }
 #endif
+#endif /* CONFIG_SMP */
 
 /*
  * Only dump TASK_* tasks. (0 for all tasks)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index de97083..d573183 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -542,33 +542,6 @@ void resched_cpu(int cpu)
 
 #ifdef CONFIG_NO_HZ
 /*
- * In the semi idle case, use the nearest busy cpu for migrating timers
- * from an idle cpu.  This is good for power-savings.
- *
- * We don't do similar optimization for completely idle system, as
- * selecting an idle cpu will add more delays to the timers than intended
- * (as that cpu's timer base may not be uptodate wrt jiffies etc).
- */
-int get_nohz_timer_target(void)
-{
-   int cpu = smp_processor_id();
-   int i;
-   struct sched_domain *sd;
-
-   rcu_read_lock();
-   for_each_domain(cpu, sd) {
-   for_each_cpu(i, sched_domain_span(sd)) {
-   if (!idle_cpu(i)) {
-   cpu = i;
-   goto unlock;
-   }
-   }
-   }
-unlock:
-   rcu_read_unlock();
-   return cpu;
-}
-/*
  * When add_timer_on() enqueues a timer into the timer wheel of an
  * idle CPU then this timer might expire before the next timer event
  * which is scheduled to wake up that CPU. In case of a completely
@@ -639,6 +612,48 @@ void sched_avg_update(struct rq *rq)
}
 }
 
+/*
+ * This routine returns the preferred cpu which is non-idle. It accepts a
+ * bitwise OR of SD_* flags present in linux/sched.h. If the local CPU isn't
+ * idle, it is returned back. If it is idle, then we must look for another CPU
+ * which have all the flags passed as argument as set. Also, as this activity 
is
+ * part of load balancing only, SD_LOAD_BALANCE must also be set for selected
+ * domain.
+ */
+int sched_select_cpu(unsigned int sd_flags)
+{
+   struct sched_domain *sd;
+   int cpu = smp_processor_id();
+   int i;
+
+   /* If Current cpu isn't idle, don't migrate anything */
+   if (!idle_cpu(cpu))
+   return cpu;
+
+   /* Add SD_LOAD_BALANCE to flags */
+   sd_flags |= SD_LOAD_BALANCE;
+
+   rcu_read_lock();
+   for_each_domain(cpu, sd) {
+   /*
+* If sd doesnt' have both sd_flags and SD_LOAD_BALANCE set,
+* skip sd.
+*/
+   if ((sd->flags & sd_flags) != sd_flags)
+   continue;
+
+   for_each_cpu(i, sched_domain_span(sd)) {
+   if (!idle_cpu(i)) {
+   cpu = i;
+   goto unlock;
+   }
+   }
+   }
+unlock:
+   rcu_read_unlock();
+   return cpu;
+}
+
 #else /* !CONFIG_SMP */
 void r

[PATCH V2 2/3] timer: hrtimer: Don't check idle_cpu() before calling get_nohz_timer_target()

2012-09-27 Thread Viresh Kumar
Check for current cpu's idleness already done in implementation of
sched_select_cpu() which is called by get_nohz_timer_target(). So, no need to
call idle_cpu() twice, once from sched_select_cpu() and once from timer and
hrtimer before calling get_nohz_timer_target().

This patch removes calls to idle_cpu() from timer and hrtimer.

Signed-off-by: Viresh Kumar 
---
 kernel/hrtimer.c | 2 +-
 kernel/timer.c   | 9 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 6db7a5e..74bdaf6 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -159,7 +159,7 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct 
hrtimer *timer,
 static int hrtimer_get_target(int this_cpu, int pinned)
 {
 #ifdef CONFIG_NO_HZ
-   if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu))
+   if (!pinned && get_sysctl_timer_migration())
return get_nohz_timer_target();
 #endif
return this_cpu;
diff --git a/kernel/timer.c b/kernel/timer.c
index d5de1b2..8409d9d 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -720,7 +720,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires,
 {
struct tvec_base *base, *new_base;
unsigned long flags;
-   int ret = 0 , cpu;
+   int ret = 0 , cpu = 0;
 
timer_stats_timer_set_start_info(timer);
BUG_ON(!timer->function);
@@ -733,12 +733,13 @@ __mod_timer(struct timer_list *timer, unsigned long 
expires,
 
debug_activate(timer, expires);
 
-   cpu = smp_processor_id();
-
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
-   if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
+   if (!pinned && get_sysctl_timer_migration())
cpu = get_nohz_timer_target();
 #endif
+   if (!cpu)
+   cpu = smp_processor_id();
+
new_base = per_cpu(tvec_bases, cpu);
 
if (base != new_base) {
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH V2 0/3] Create sched_select_cpu() and use it in workqueues

2012-09-27 Thread Viresh Kumar
Hi All,

This is V2 of my sched_select_cpu() work.

In order to save power, it would be useful to schedule work onto non-IDLE cpus
instead of waking up an IDLE one.

To achieve this, we need scheduler to guide kernel frameworks (like: timers &
workqueues) on which is the most preferred CPU that must be used for these
tasks.

This patchset is about implementing this concept.

- The first patch adds sched_select_cpu() routine which returns the preferred
  cpu which is non-idle. 
- Second patch removes idle_cpu() calls from timer & hrtimer.
- Third patch is about adapting this change in workqueue framework.

Earlier discussions over v1 can be found here:
http://www.mail-archive.com/linaro-dev@lists.linaro.org/msg13342.html

Earlier discussions over this concept were done at last LPC:
http://summit.linuxplumbersconf.org/lpc-2012/meeting/90/lpc2012-sched-timer-workqueue/

Module created for testing this behavior is present here:
http://git.linaro.org/gitweb?p=people/vireshk/module.git;a=summary

Following are the steps followed in test module:
1. Run single work on each cpu
2. This work will start a timer after x (tested with 10) jiffies of delay
3. Timer routine queues a work... (This may be called from idle or non-idle cpu)
   and starts the same timer again STEP 3 is done for n number of times (i.e.
   queuing n works, one after other)
4. All works will call a single routine, which will count following per cpu:
 - Total works processed by a CPU
 - Total works processed by a CPU, which are queued from it
 - Total works processed by a CPU, which aren't queued from it

Setup:
-
- ARM Vexpress TC2 - big.LITTLE CPU
- Core 0-1: A15, 2-4: A7
- rootfs: linaro-ubuntu-nano

Results:
---
Without Workqueue Modification, i.e. PATCH 3/3:
[ 2493.022335] Workqueue Analyser: works processsed by CPU0, Total: 1000, Own: 
0, migrated: 0
[ 2493.047789] Workqueue Analyser: works processsed by CPU1, Total: 1000, Own: 
0, migrated: 0
[ 2493.072918] Workqueue Analyser: works processsed by CPU2, Total: 1000, Own: 
0, migrated: 0
[ 2493.098576] Workqueue Analyser: works processsed by CPU3, Total: 1000, Own: 
0, migrated: 0
[ 2493.123702] Workqueue Analyser: works processsed by CPU4, Total: 1000, Own: 
0, migrated: 0

With Workqueue Modification, i.e. PATCH 3/3:
[ 2493.022335] Workqueue Analyser: works processsed by CPU0, Total: 1002, Own: 
999, migrated: 3
[ 2493.047789] Workqueue Analyser: works processsed by CPU1, Total: 998,  Own: 
997, migrated: 1
[ 2493.072918] Workqueue Analyser: works processsed by CPU2, Total: 1013, Own: 
996, migrated: 17
[ 2493.098576] Workqueue Analyser: works processsed by CPU3, Total: 998,  Own: 
993, migrated: 5
[ 2493.123702] Workqueue Analyser: works processsed by CPU4, Total: 989,  Own: 
987, migrated: 2

V1->V2
-
- New SD_* macros removed now and earlier ones used
- sched_select_cpu() rewritten and it includes the check on current cpu's
  idleness.
- cpu_idle() calls from timer and hrtimer removed now.
- Patch 2/3 from V1, removed as it doesn't apply to latest workqueue branch from
  tejun.
- CONFIG_MIGRATE_WQ removed and so is wq_select_cpu()
- sched_select_cpu() called only from __queue_work()
- got tejun/for-3.7 branch in my tree, before making workqueue changes.

Viresh Kumar (3):
  sched: Create sched_select_cpu() to give preferred CPU for power
saving
  timer: hrtimer: Don't check idle_cpu() before calling
get_nohz_timer_target()
  workqueue: Schedule work on non-idle cpu instead of current one

 include/linux/sched.h | 16 ++--
 kernel/hrtimer.c  |  2 +-
 kernel/sched/core.c   | 69 +++
 kernel/timer.c|  9 ---
 kernel/workqueue.c|  2 +-
 5 files changed, 63 insertions(+), 35 deletions(-)

-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH V2 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-27 Thread Viresh Kumar
Workqueues queues work on current cpu, if the caller haven't passed a preferred
cpu. This may wake up an idle CPU, which is actually not required.

This work can be processed by any CPU and so we must select a non-idle CPU here.
This patch adds in support in workqueue framework to get preferred CPU details
from the scheduler, instead of using current CPU.

Most of the time when a work is queued, the current cpu isn't idle and so we
will choose it only. There are cases when a cpu is idle when it queues some
work. For example, consider following scenario:
- A cpu has programmed a timer and is IDLE now.
- CPU gets into interrupt handler due to timer and queues a work. As the CPU is
  currently IDLE, we can queue this work to some other CPU.

Signed-off-by: Viresh Kumar 
---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 143fd8c..5fa4ba4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1238,7 +1238,7 @@ static void __queue_work(unsigned int cpu, struct 
workqueue_struct *wq,
struct global_cwq *last_gcwq;
 
if (cpu == WORK_CPU_UNBOUND)
-   cpu = raw_smp_processor_id();
+   cpu = sched_select_cpu(0);
 
/*
 * It's multi cpu.  If @work was previously on a different
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH V2 2/3] timer: hrtimer: Don't check idle_cpu() before calling get_nohz_timer_target()

2012-09-27 Thread Viresh Kumar
On 27 September 2012 14:34, Viresh Kumar  wrote:

>  #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
> -   if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
> +   if (!pinned && get_sysctl_timer_migration())
> cpu = get_nohz_timer_target();
>  #endif
> +   if (!cpu)
> +   cpu = smp_processor_id();

Ahh... Bad change... cpu can be returned as zero by get_nohz_timer_target().

Please consider below patch here:

8<-


Subject: [PATCH] timer: hrtimer: Don't check idle_cpu() before calling
 get_nohz_timer_target()

Check for current cpu's idleness already done in implementation of
sched_select_cpu() which is called by get_nohz_timer_target(). So, no need to
call idle_cpu() twice, once from sched_select_cpu() and once from timer and
hrtimer before calling get_nohz_timer_target().

This patch removes calls to idle_cpu() from timer and hrtimer.

This also reduces an extra call to smp_processor_id() when
get_nohz_timer_target() is called.

Signed-off-by: Viresh Kumar 
---
 kernel/hrtimer.c | 2 +-
 kernel/timer.c   | 8 +---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 6db7a5e..74bdaf6 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -159,7 +159,7 @@ struct hrtimer_clock_base *lock_hrtimer_base(const
struct hrtimer *timer,
 static int hrtimer_get_target(int this_cpu, int pinned)
 {
 #ifdef CONFIG_NO_HZ
-   if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu))
+   if (!pinned && get_sysctl_timer_migration())
return get_nohz_timer_target();
 #endif
return this_cpu;
diff --git a/kernel/timer.c b/kernel/timer.c
index d5de1b2..db57606 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -733,11 +733,13 @@ __mod_timer(struct timer_list *timer, unsigned
long expires,

debug_activate(timer, expires);

-   cpu = smp_processor_id();
-
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
-   if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
+   if (!pinned && get_sysctl_timer_migration())
cpu = get_nohz_timer_target();
+   else
+   cpu = smp_processor_id();
+#else
+   cpu = smp_processor_id();
 #endif
new_base = per_cpu(tvec_bases, cpu);

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH V2 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-27 Thread Viresh Kumar
On 27 September 2012 14:34, Viresh Kumar  wrote:
> Workqueues queues work on current cpu, if the caller haven't passed a 
> preferred
> cpu. This may wake up an idle CPU, which is actually not required.
>
> This work can be processed by any CPU and so we must select a non-idle CPU 
> here.
> This patch adds in support in workqueue framework to get preferred CPU details
> from the scheduler, instead of using current CPU.
>
> Most of the time when a work is queued, the current cpu isn't idle and so we
> will choose it only. There are cases when a cpu is idle when it queues some
> work. For example, consider following scenario:
> - A cpu has programmed a timer and is IDLE now.
> - CPU gets into interrupt handler due to timer and queues a work. As the CPU 
> is
>   currently IDLE, we can queue this work to some other CPU.
>
> Signed-off-by: Viresh Kumar 
> ---
>  kernel/workqueue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 143fd8c..5fa4ba4 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -1238,7 +1238,7 @@ static void __queue_work(unsigned int cpu, struct 
> workqueue_struct *wq,
> struct global_cwq *last_gcwq;
>
> if (cpu == WORK_CPU_UNBOUND)
> -   cpu = raw_smp_processor_id();
> +   cpu = sched_select_cpu(0);

Hi Tejun,

Following change is also required with this patch:


--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1383,7 +1383,7 @@ static void __queue_delayed_work(int cpu, struct
workqueue_struct *wq,
if (gcwq)
lcpu = gcwq->cpu;
if (lcpu == WORK_CPU_UNBOUND)
-   lcpu = raw_smp_processor_id();
+   lcpu = sched_select_cpu(0);
} else {
lcpu = WORK_CPU_UNBOUND;
}

Otherwise, we will end up running the re-reentrancy check, which we are trying
to skip for delayed work.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] timers: Avoid finding cpu for migration of running timers in __mod_timer()

2012-09-28 Thread Viresh Kumar
Currently we don't support migration of currently running timers. Current code
flow in __mod_timer() is:
- Find a cpu where we should migrate the timer
- Check if timer is currently running
- If yes, don't migrate.

In this process, the first step is a unnecessary activiy, if the timer is
currently running. This patch tries to avoid it in such cases.

Signed-off-by: Viresh Kumar 
---
 kernel/timer.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 8c5e7b9..6e5bf98 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -755,23 +755,23 @@ __mod_timer(struct timer_list *timer, unsigned long 
expires,
 
debug_activate(timer, expires);
 
-   cpu = smp_processor_id();
+   /*
+* Should we try to migrate timer?
+* However we can't change timer's base while it is running, otherwise
+* del_timer_sync() can't detect that the timer's handler yet has not
+* finished. This also guarantees that the timer is serialized wrt
+* itself.
+*/
+   if (likely(base->running_timer != timer)) {
+   cpu = smp_processor_id();
 
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
-   if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
-   cpu = get_nohz_timer_target();
+   if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
+   cpu = get_nohz_timer_target();
 #endif
-   new_base = per_cpu(tvec_bases, cpu);
+   new_base = per_cpu(tvec_bases, cpu);
 
-   if (base != new_base) {
-   /*
-* We are trying to schedule the timer on the local CPU.
-* However we can't change timer's base while it is running,
-* otherwise del_timer_sync() can't detect that the timer's
-* handler yet has not finished. This also guarantees that
-* the timer is serialized wrt itself.
-*/
-   if (likely(base->running_timer != timer)) {
+   if (base != new_base) {
/* See the comment in lock_timer_base() */
timer_set_base(timer, NULL);
spin_unlock(&base->lock);
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[RFC] timer: Migrate running timer

2012-09-28 Thread Viresh Kumar
Hi Thomas,

I haven't tested it much till now. I am sending this patch just to check if the
initial idea looks fine to you guys or not.

Till now, we weren't migrating a running timer because with migration
del_timer_sync() can't detect that the timer's handler yet has not finished.

Now, when can we actually to reach to the code (inside __mod_timer()) where

base->running_timer == timer ? i.e. We are trying to migrate current timer

I can see only following case:
- Timer re-armed itself. i.e. Currently we are running interrupt handler of a
  timer and it rearmed itself from there. At this time user might have called
  del_timer_sync() or not. If not, then there is no harm in re-arming the timer?

Now, when somebody tries to delete a timer, obviously he doesn't want to run it
any more for now. So, why should we ever re-arm a timer, which is scheduled for
deletion?

This patch tries to fix "migration of running timer", assuming above theory is
correct :)

So, now when we get a call to del_timer_sync(), we will mark it scheduled for
deletion in an additional variable. This would be checked whenever we try to
modify/arm it again. If it was currently scheduled for deletion, we must not
modify/arm it.

And so, whenever we reach to the situation where:
base->running_timer == timer

We are sure, nobody is waiting in del_timer_sync().

We will clear this flag as soon as the timer is deleted, so that it can be
started again after deleting it successfully.

Waiting for initial comments on it.

Signed-off-by: Viresh Kumar 
---
 include/linux/timer.h |  1 +
 kernel/timer.c| 58 +--
 2 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/include/linux/timer.h b/include/linux/timer.h
index 8c5a197..ea36ce9 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -22,6 +22,7 @@ struct timer_list {
unsigned long data;
 
int slack;
+   int sched_del;
 
 #ifdef CONFIG_TIMER_STATS
int start_pid;
diff --git a/kernel/timer.c b/kernel/timer.c
index 1cf8a91..536e7a3 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -620,6 +620,7 @@ static void do_init_timer(struct timer_list *timer, 
unsigned int flags,
timer->entry.next = NULL;
timer->base = (void *)((unsigned long)base | flags);
timer->slack = -1;
+   timer->sched_del = 0;
 #ifdef CONFIG_TIMER_STATS
timer->start_site = NULL;
timer->start_pid = -1;
@@ -727,38 +728,35 @@ __mod_timer(struct timer_list *timer, unsigned long 
expires,
 
base = lock_timer_base(timer, &flags);
 
+   if (timer->sched_del) {
+   /* Don't schedule it again, as it is getting deleted */
+   ret = -EBUSY;
+   goto out_unlock;
+   }
+
ret = detach_if_pending(timer, base, false);
if (!ret && pending_only)
goto out_unlock;
 
debug_activate(timer, expires);
 
-   /*
-* Should we try to migrate timer?
-* However we can't change timer's base while it is running, otherwise
-* del_timer_sync() can't detect that the timer's handler yet has not
-* finished. This also guarantees that the timer is serialized wrt
-* itself.
-*/
-   if (likely(base->running_timer != timer)) {
 #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
-   if (!pinned && get_sysctl_timer_migration())
-   cpu = get_nohz_timer_target();
-   else
-   cpu = smp_processor_id();
-#else
+   if (!pinned && get_sysctl_timer_migration())
+   cpu = get_nohz_timer_target();
+   else
cpu = smp_processor_id();
+#else
+   cpu = smp_processor_id();
 #endif
-   new_base = per_cpu(tvec_bases, cpu);
-
-   if (base != new_base) {
-   /* See the comment in lock_timer_base() */
-   timer_set_base(timer, NULL);
-   spin_unlock(&base->lock);
-   base = new_base;
-   spin_lock(&base->lock);
-   timer_set_base(timer, base);
-   }
+   new_base = per_cpu(tvec_bases, cpu);
+
+   if (base != new_base) {
+   /* See the comment in lock_timer_base() */
+   timer_set_base(timer, NULL);
+   spin_unlock(&base->lock);
+   base = new_base;
+   spin_lock(&base->lock);
+   timer_set_base(timer, base);
}
 
timer->expires = expires;
@@ -1037,9 +1035,11 @@ EXPORT_SYMBOL(try_to_del_timer_sync);
  */
 int del_timer_sync(struct timer_list *timer)
 {
-#ifdef CONFIG_LOCKDEP
+   struct tvec_base *base;
unsigned long flags;
 
+#ifdef CONFIG_LOCKDEP
+
/*
 * If lo

Re: [PATCH V2 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-30 Thread Viresh Kumar
On 30 September 2012 14:24, Tejun Heo  wrote:
> On Thu, Sep 27, 2012 at 02:34:05PM +0530, Viresh Kumar wrote:
>> - A cpu has programmed a timer and is IDLE now.
>> - CPU gets into interrupt handler due to timer and queues a work. As the CPU 
>> is
>>   currently IDLE, we can queue this work to some other CPU.
>
> I'm still a bit confused, if the CPU is already running the IRQ
> handler, the CPU is not idle by definition.  What am I missing here?

Hi Tejun,

For the scheduler CPU is idle, if all below are true:
- current task is idle task
- nr_running == 0
- wake_list is empty

And during these conditions, there can be a timer running in background.
And when we reach its interrupt handler, then also these conditions hold true
and local cpu is idle.

--
Viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH V2 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-30 Thread Viresh Kumar
On 1 October 2012 06:02, Tejun Heo  wrote:
> It isn't about the CPU being actually idle?

No. Being idle only from scheduler's perspective. :)

> Also, if it's only about timers, shouldn't it be enough to implement
> it for timer and delayed_work?

What if we need a timer, which must re-arm itself + schedule a work?
delayed_work will not be sufficient in that case, and we would need
to use normal work.

If i am not wrong, there can be other future users of this routine too.
@Vincent: Can you please comment on this?

> It would be great if you explain what you're trying to achieve how.  I
> can't tell what you're aiming for and why that would be beneficial
> from these submissions.

Following slides are implemented by Vincent and presented during LPC.
Please have a look at them, they explain the problem statement well:

http://www.linuxplumbersconf.org/2012/wp-content/uploads/2012/08/lpc2012-sched-timer-workqueue.pdf

Specifically slides: 12 & 19.

There aren't too many users with this behavior, but even a single user
will be sufficient not to let the cpu get idle at all. And that will result in
less power saving.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [U-Boot] [PATCH v2 0/3] EXYNOS: Add support for Exynos4x12

2012-10-02 Thread Viresh Kumar
On 3 October 2012 11:04, Chander Kashyap  wrote:
>> CCing Minkyu
> mk7.k...@samsung.com is also Minkyu's ID.
>>

Tip: Always place a blank line before/after your comments, when replying mails.
That makes it much more readable to others.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Query: Vexpress quick boot

2012-10-02 Thread viresh kumar
Hi Pawel,

Is there a way to skip the motherboard BIOS too? I know there is a way
to autoboot from
bootmon, which is well described here:

https://wiki.linaro.org/PawelMoll/BootingVEMadeEasy

But, i am looking for something, which can even run the "reboot"
command on BIOS.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC] timer: Migrate running timer

2012-10-03 Thread Viresh Kumar
On 28 September 2012 23:14, Viresh Kumar  wrote:
> I haven't tested it much till now. I am sending this patch just to check if 
> the
> initial idea looks fine to you guys or not.

Tested with:
- ARM Vexpress TC2 - big.LITTLE CPU
- Core 0-1: A15, 2-4: A7
- rootfs: linaro-ubuntu-nano

and following test module

http://git.linaro.org/gitweb?p=people/vireshk/module.git;a=summary

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL]: big LITTLE MP v9

2012-10-03 Thread Viresh Kumar
d support for per-cluster/multiple PMUs
  ARM: perf: save/restore pmu registers in pm notifier

Thomas Gleixner (6):
  rcu: Yield simpler
  kthread: Implement park/unpark facility
  smpboot: Provide infrastructure for percpu hotplug threads
  softirq: Use hotplug thread infrastructure
  watchdog: Use hotplug thread infrastructure
  infiniband: ehca: Use hotplug thread infrastructure

Tushar Behera (1):
  linaro/configs: ubuntu: Disable support for generic OHCI platform driver

Vincent Guittot (2):
  sched: cpu_power: enable ARCH_POWER
  sched: Fix nohz_idle_balance()

Viresh Kumar (4):
  configs: Add config fragments for big LITTLE MP
  linaro/configs: Update big LITTLE MP fragment for task placement work
  config-frag/big-LITTLE: Use device-tree to provide fast/slow CPU
list for HMP
  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1', 'rcu-hotplug-v1',
'arm-multi_pmu_v1', 'scheduler-misc-v1' and 'config-fragments' into
big-LITTLE-MP-v9

Will Deacon (6):
  ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs
  ARM: pmu: remove unused reservation mechanism
  ARM: perf: remove mysterious compiler barrier
  ARM: perf: probe devicetree in preference to current CPU
  ARM: perf: prepare for moving CPU PMU code into separate file
  ARM: perf: move CPU-specific PMU handling code into separate file

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 04/10] sched: Introduce priority-based task migration filter

2012-10-03 Thread Viresh Kumar
On 22 September 2012 00:02,   wrote:

Hi Morten,

I would try to review your patches in coming days. For now, Just
reporting a problem
which i encountered during routine build.

> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 490f1f0..8f0f3b9 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3129,9 +3129,12 @@ static int __init hmp_cpu_mask_setup(void)
>   * hmp_down_threshold: max. load allowed for tasks migrating to a slower cpu
>   * The default values (512, 256) offer good responsiveness, but may need
>   * tweaking suit particular needs.
> + *
> + * hmp_up_prio: Only up migrate task with high priority (   */
>  unsigned int hmp_up_threshold = 512;
>  unsigned int hmp_down_threshold = 256;

#ifdef CONFIG_SCHED_HMP_PRIO_FILTER

> +unsigned int hmp_up_prio = NICE_TO_PRIO(CONFIG_SCHED_HMP_PRIO_FILTER_VAL);

#endif

is required here for successful build without CONFIG_SCHED_HMP_PRIO_FILTER_VAL.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 02/10] sched: Task placement for heterogeneous systems based on task load-tracking

2012-10-03 Thread Viresh Kumar
Hi Morten,

On 22 September 2012 00:02,   wrote:
> From: Morten Rasmussen 
>
> This patch introduces the basic SCHED_HMP infrastructure. Each class of
> cpus is represented by a hmp_domain and tasks will only be moved between
> these domains when their load profiles suggest it is beneficial.
>
> SCHED_HMP relies heavily on the task load-tracking introduced in Paul
> Turners fair group scheduling patch set:
>
> 
>
> SCHED_HMP requires that the platform implements arch_get_hmp_domains()
> which should set up the platform specific list of hmp_domains. It is
> also assumed that the platform disables SD_LOAD_BALANCE for the
> appropriate sched_domains.

An explanation of this requirement would be helpful here.

> Tasks placement takes place every time a task is to be inserted into
> a runqueue based on its load history. The task placement decision is
> based on load thresholds.
>
> There are no restrictions on the number of hmp_domains, however,
> multiple (>2) has not been tested and the up/down migration policy is
> rather simple.
>
> Signed-off-by: Morten Rasmussen 
> ---
>  arch/arm/Kconfig  |   17 +
>  include/linux/sched.h |6 ++
>  kernel/sched/fair.c   |  168 
> +
>  kernel/sched/sched.h  |6 ++
>  4 files changed, 197 insertions(+)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index f4a5d58..5b09684 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1554,6 +1554,23 @@ config SCHED_SMT
>   MultiThreading at a cost of slightly increased overhead in some
>   places. If unsure say N here.
>
> +config DISABLE_CPU_SCHED_DOMAIN_BALANCE
> +   bool "(EXPERIMENTAL) Disable CPU level scheduler load-balancing"
> +   help
> + Disables scheduler load-balancing at CPU sched domain level.

Shouldn't this depend on EXPERIMENTAL?

> +config SCHED_HMP
> +   bool "(EXPERIMENTAL) Heterogenous multiprocessor scheduling"

ditto.

> +   depends on DISABLE_CPU_SCHED_DOMAIN_BALANCE && SCHED_MC && 
> FAIR_GROUP_SCHED && !SCHED_AUTOGROUP
> +   help
> + Experimental scheduler optimizations for heterogeneous platforms.
> + Attempts to introspectively select task affinity to optimize power
> + and performance. Basic support for multiple (>2) cpu types is in 
> place,
> + but it has only been tested with two types of cpus.
> + There is currently no support for migration of task groups, hence
> + !SCHED_AUTOGROUP. Furthermore, normal load-balancing must be 
> disabled
> + between cpus of different type (DISABLE_CPU_SCHED_DOMAIN_BALANCE).
> +
>  config HAVE_ARM_SCU
> bool
> help
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index 81e4e82..df971a3 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1039,6 +1039,12 @@ unsigned long default_scale_smt_power(struct 
> sched_domain *sd, int cpu);
>
>  bool cpus_share_cache(int this_cpu, int that_cpu);
>
> +#ifdef CONFIG_SCHED_HMP
> +struct hmp_domain {
> +   struct cpumask cpus;
> +   struct list_head hmp_domains;

Probably need a better name here. domain_list?

> +};
> +#endif /* CONFIG_SCHED_HMP */
>  #else /* CONFIG_SMP */
>
>  struct sched_domain_attr;
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 3e17dd5..d80de46 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3077,6 +3077,125 @@ static int select_idle_sibling(struct task_struct *p, 
> int target)
> return target;
>  }
>
> +#ifdef CONFIG_SCHED_HMP
> +/*
> + * Heterogenous multiprocessor (HMP) optimizations
> + *
> + * The cpu types are distinguished using a list of hmp_domains
> + * which each represent one cpu type using a cpumask.
> + * The list is assumed ordered by compute capacity with the
> + * fastest domain first.
> + */
> +DEFINE_PER_CPU(struct hmp_domain *, hmp_cpu_domain);
> +
> +extern void __init arch_get_hmp_domains(struct list_head *hmp_domains_list);
> +
> +/* Setup hmp_domains */
> +static int __init hmp_cpu_mask_setup(void)

How should we interpret its return value? Can you mention what does 0 & 1 mean
here?

> +{
> +   char buf[64];
> +   struct hmp_domain *domain;
> +   struct list_head *pos;
> +   int dc, cpu;
> +
> +   pr_debug("Initializing HMP scheduler:\n");
> +
> +   /* Initialize hmp_domains using platform code */
> +   arch_get_hmp_domains(&hmp_domains);
> +   if (list_empty(&hmp_domains)) {
> +   pr_debug("HMP domain list is empty!\n");
> +   return 0;
> +   }
> +
> +   /* Print hmp_domains */
> +   dc = 0;

Should be done during definition of dc.

> +   list_for_each(pos, &hmp_domains) {
> +   domain = list_entry(pos, struct hmp_domain, hmp_domains);
> +   cpulist_scnprintf(buf, 64, &domain->cpus);
> +   pr_debug("  HMP domain %d: %s\n", dc, buf);

Spaces before HMP are intenti

Re: [RFC PATCH 03/10] sched: Forced task migration on heterogeneous systems

2012-10-03 Thread Viresh Kumar
Minor comments here :)

On 22 September 2012 00:02,   wrote:

> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index d80de46..490f1f0 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3744,7 +3744,6 @@ int can_migrate_task(struct task_struct *p, struct 
> lb_env *env)
>  * 1) task is cache cold, or
>  * 2) too many balance attempts have failed.
>  */
> -

:(

> tsk_cache_hot = task_hot(p, env->src_rq->clock_task, env->sd);
> if (!tsk_cache_hot ||
> env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
> @@ -5516,6 +5515,199 @@ static unsigned int hmp_down_migration(int cpu, 
> struct sched_entity *se)
> return 0;
>  }
>

> +static int hmp_can_migrate_task(struct task_struct *p, struct lb_env *env)
> +{

<...>

> +static int move_specific_task(struct lb_env *env, struct task_struct *pm)
> +{
> +   struct task_struct *p, *n;
> +
> +   list_for_each_entry_safe(p, n, &env->src_rq->cfs_tasks, 
> se.group_node) {
> +   if (throttled_lb_pair(task_group(p), env->src_rq->cpu,
> +   env->dst_cpu))
> +   continue;

Please fix indentation of above if statement.

<...>

> +#else
> +static void hmp_force_up_migration(int this_cpu) { }

inline?

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 04/10] sched: Introduce priority-based task migration filter

2012-10-03 Thread Viresh Kumar
On 22 September 2012 00:02,   wrote:

> +config SCHED_HMP_PRIO_FILTER
> +   bool "(EXPERIMENTAL) Filter HMP migrations by task priority"
> +   depends on SCHED_HMP

Should it depend on EXPERIMENTAL?

> +   help
> + Enables task priority based HMP migration filter. Any task with
> + a NICE value above the threshold will always be on low-power cpus
> + with less compute capacity.
> +
> +config SCHED_HMP_PRIO_FILTER_VAL
> +   int "NICE priority threshold"
> +   default 5
> +   depends on SCHED_HMP_PRIO_FILTER
> +
>  config HAVE_ARM_SCU
> bool
> help
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 490f1f0..8f0f3b9 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3129,9 +3129,12 @@ static int __init hmp_cpu_mask_setup(void)
>   * hmp_down_threshold: max. load allowed for tasks migrating to a slower cpu
>   * The default values (512, 256) offer good responsiveness, but may need
>   * tweaking suit particular needs.
> + *
> + * hmp_up_prio: Only up migrate task with high priority (   */
>  unsigned int hmp_up_threshold = 512;
>  unsigned int hmp_down_threshold = 256;
> +unsigned int hmp_up_prio = NICE_TO_PRIO(CONFIG_SCHED_HMP_PRIO_FILTER_VAL);
>
>  static unsigned int hmp_up_migration(int cpu, struct sched_entity *se);
>  static unsigned int hmp_down_migration(int cpu, struct sched_entity *se);
> @@ -5491,6 +5494,12 @@ static unsigned int hmp_up_migration(int cpu, struct 
> sched_entity *se)
> if (hmp_cpu_is_fastest(cpu))
> return 0;
>
> +#ifdef CONFIG_SCHED_HMP_PRIO_FILTER
> +   /* Filter by task priority */
> +   if (p->prio >= hmp_up_prio)
> +   return 0;
> +#endif
> +
> if (cpumask_intersects(&hmp_faster_domain(cpu)->cpus,
> tsk_cpus_allowed(p))
> && se->avg.load_avg_ratio > hmp_up_threshold) {
> @@ -5507,6 +5516,12 @@ static unsigned int hmp_down_migration(int cpu, struct 
> sched_entity *se)
> if (hmp_cpu_is_slowest(cpu))
> return 0;
>
> +#ifdef CONFIG_SCHED_HMP_PRIO_FILTER
> +   /* Filter by task priority */
> +   if (p->prio >= hmp_up_prio)
> +   return 1;
> +#endif

Even if below cpumask_intersects() fails?

> if (cpumask_intersects(&hmp_slower_domain(cpu)->cpus,
> tsk_cpus_allowed(p))
> && se->avg.load_avg_ratio < hmp_down_threshold) {

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 06/10] ARM: sched: Use device-tree to provide fast/slow CPU list for HMP

2012-10-03 Thread Viresh Kumar
On 22 September 2012 00:02,   wrote:
> From: Morten Rasmussen 
>
> We can't rely on Kconfig options to set the fast and slow CPU lists for
> HMP scheduling if we want a single kernel binary to support multiple
> devices with different CPU topology. E.g. TC2 (ARM's Test-Chip-2
> big.LITTLE system), Fast Models, or even non big.LITTLE devices.
>
> This patch adds the function arch_get_fast_and_slow_cpus() to generate
> the lists at run-time by parsing the CPU nodes in device-tree; it
> assumes slow cores are A7s and everything else is fast. The function
> still supports the old Kconfig options as this is useful for testing the
> HMP scheduler on devices without big.LITTLE.

But this code is handling this case too at the end, with following logic:

> +   cpumask_setall(fast);
> +   cpumask_clear(slow);

Am i missing something?

> This patch is reuse of a patch by Jon Medhurst  with a
> few bits left out.

Then probably he must be the author of this commit? Also a SOB is required
from him here.

> Signed-off-by: Morten Rasmussen 
> ---
>  arch/arm/Kconfig   |4 ++-
>  arch/arm/kernel/topology.c |   69 
> 
>  2 files changed, 72 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index cb80846..f1271bc 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1588,13 +1588,15 @@ config HMP_FAST_CPU_MASK
> string "HMP scheduler fast CPU mask"
> depends on SCHED_HMP
> help
> -  Specify the cpuids of the fast CPUs in the system as a list string,
> +  Leave empty to use device tree information.
> + Specify the cpuids of the fast CPUs in the system as a list string,
>   e.g. cpuid 0+1 should be specified as 0-1.
>
>  config HMP_SLOW_CPU_MASK
> string "HMP scheduler slow CPU mask"
> depends on SCHED_HMP
> help
> + Leave empty to use device tree information.
>   Specify the cpuids of the slow CPUs in the system as a list string,
>   e.g. cpuid 0+1 should be specified as 0-1.
>
> diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
> index 26c12c6..7682e12 100644
> --- a/arch/arm/kernel/topology.c
> +++ b/arch/arm/kernel/topology.c
> @@ -317,6 +317,75 @@ void store_cpu_topology(unsigned int cpuid)
> cpu_topology[cpuid].socket_id, mpidr);
>  }
>
> +
> +#ifdef CONFIG_SCHED_HMP
> +
> +static const char * const little_cores[] = {
> +   "arm,cortex-a7",
> +   NULL,
> +};
> +
> +static bool is_little_cpu(struct device_node *cn)
> +{
> +   const char * const *lc;
> +   for (lc = little_cores; *lc; lc++)
> +   if (of_device_is_compatible(cn, *lc))
> +   return true;
> +   return false;
> +}
> +
> +void __init arch_get_fast_and_slow_cpus(struct cpumask *fast,
> +   struct cpumask *slow)
> +{
> +   struct device_node *cn = NULL;
> +   int cpu = 0;
> +
> +   cpumask_clear(fast);
> +   cpumask_clear(slow);
> +
> +   /*
> +* Use the config options if they are given. This helps testing
> +* HMP scheduling on systems without a big.LITTLE architecture.
> +*/
> +   if (strlen(CONFIG_HMP_FAST_CPU_MASK) && 
> strlen(CONFIG_HMP_SLOW_CPU_MASK)) {
> +   if (cpulist_parse(CONFIG_HMP_FAST_CPU_MASK, fast))
> +   WARN(1, "Failed to parse HMP fast cpu mask!\n");
> +   if (cpulist_parse(CONFIG_HMP_SLOW_CPU_MASK, slow))
> +   WARN(1, "Failed to parse HMP slow cpu mask!\n");
> +   return;
> +   }
> +
> +   /*
> +* Else, parse device tree for little cores.
> +*/
> +   while ((cn = of_find_node_by_type(cn, "cpu"))) {
> +
> +   if (cpu >= num_possible_cpus())
> +   break;
> +
> +   if (is_little_cpu(cn))
> +   cpumask_set_cpu(cpu, slow);
> +   else
> +   cpumask_set_cpu(cpu, fast);
> +
> +   cpu++;
> +   }
> +
> +   if (!cpumask_empty(fast) && !cpumask_empty(slow))
> +   return;
> +
> +   /*
> +* We didn't find both big and little cores so let's call all cores
> +* fast as this will keep the system running, with all cores being
> +* treated equal.
> +*/
> +   cpumask_setall(fast);
> +   cpumask_clear(slow);
> +}
> +
> +#endif /* CONFIG_SCHED_HMP */

All above calls to of_*() routines have dependency on CONFIG_OF

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 07/10] ARM: sched: Setup SCHED_HMP domains

2012-10-04 Thread Viresh Kumar
On 22 September 2012 00:02,   wrote:
> diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c

> +void __init arch_get_hmp_domains(struct list_head *hmp_domains_list)
> +{
> +   struct cpumask hmp_fast_cpu_mask;
> +   struct cpumask hmp_slow_cpu_mask;

can be merged to single line.

> +   struct hmp_domain *domain;
> +
> +   arch_get_fast_and_slow_cpus(&hmp_fast_cpu_mask, &hmp_slow_cpu_mask);
> +
> +   /*
> +* Initialize hmp_domains
> +* Must be ordered with respect to compute capacity.
> +* Fastest domain at head of list.
> +*/
> +   domain = (struct hmp_domain *)
> +   kmalloc(sizeof(struct hmp_domain), GFP_KERNEL);

should be:

domain = kmalloc(sizeof(*domain), GFP_KERNEL);

> +   cpumask_copy(&domain->cpus, &hmp_slow_cpu_mask);

what if kmalloc failed?

> +   list_add(&domain->hmp_domains, hmp_domains_list);
> +   domain = (struct hmp_domain *)
> +   kmalloc(sizeof(struct hmp_domain), GFP_KERNEL);

would be better to kmalloc only once with size 2* sizeof(*domain)

> +   cpumask_copy(&domain->cpus, &hmp_fast_cpu_mask);
> +   list_add(&domain->hmp_domains, hmp_domains_list);

Also would be better to create a macro for above two lines to remove
code redundancy.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Vexpress quick boot

2012-10-04 Thread Viresh Kumar
On 4 October 2012 14:48, Bernard Ogden  wrote:
> Pawel's on holiday this week. I'm no expert in this area, but I ran your 
> question past one of our platform guys. Does the following help?

Thanks for helping :)

> A "reboot" causes the motherboard micro to reset and do all its stuff like 
> reprogramming the FPGA and then reset the core which then runs boot monitor.
>
> Briefly hit the red push button on the back panel (the one next to the sdcard 
> slot) to have the motherboard micro issue a "reset" to the ARM core. This 
> will just start Boot Monitor again.

I tried that earlier, but my board just hangs. Doesn't start BIOS or bootmon.
Whereas, running reboot from Linux does reboot it properly.

I am using, Linaro-devel rootfs...

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Vexpress quick boot

2012-10-04 Thread Viresh Kumar
On 4 October 2012 16:18, Bernard Ogden  wrote:
> Does the Red button work when the core is just running Boot Monitor?

No... It has no effect during that time.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Vexpress quick boot

2012-10-04 Thread Viresh Kumar
On 4 October 2012 17:18, Jon Medhurst (Tixy)  wrote:
> Just tried it, and that's how my TC2 behaves as well. Whereas on A9 it
> does reset the CoreTile CPU and the bootmonitor runs again.

Good to know, i am not alone. :)

> I should also note that even when booting from the motherboard
> bootloader by typing "reboot" that my TC2 has a 50/50 chance of hanging
> at the stage just before the bootmonitor banner should appear.

I haven't noticed it much.. Normally i press the black button followed
by right one...
So don't use reboot from bootloader much.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Vexpress quick boot

2012-10-04 Thread Viresh Kumar
On 4 October 2012 21:26, Ryan Harkin  wrote:
> I'm not understanding this email thread at all... perhaps because I've
> read it from the top ;-)
>
> I thought from the first email that Viresh was trying to get the board
> to boot up completely from when he applies power to the board  in
> that case, editing /media/VEMSD/config.txt and changing "AUTORUN" to
> "TRUE" means that when you power on the board, it will automatically
> power on the core tile (ie. it's the equivalent of pressing the red
> button after the motherboard boots).

Bingo!! Exactly what i wanted. Updated here:

https://wiki.linaro.org/PawelMoll/BootingVEMadeEasy

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Query: Vexpress quick boot

2012-10-04 Thread Viresh Kumar
On 4 October 2012 19:16, Bernard Ogden  wrote:
> Please check the config.txt file on the motherboard micro SDCard and make 
> sure the following entry is set:
>
> ASSERTNPOR: TRUE ;External resets assert nPOR

It was false earlier. Changed it to TRUE, still unable to reboot after
pressing red button.
But when i press the red button multiple times quickly.. then boot
monitor reboots..
But linux hangs.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


sched: modify timer and workqueue framework to allow migration

2012-10-05 Thread Viresh Kumar
Hi Guys,

I have been working on this activity since some time and V2 of patches is up for
review over kernel mailing list. If any of us is interested in using
these patches,
can pick them from:

http://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=shortlog;h=refs/heads/sched-timer-wq-migration-v2

Patches are applied over a merge of v3.6 and workqueue-for-3.7 branch
from tejun.

Blueprint of this activity:

https://blueprints.launchpad.net/linaro-power-kernel/+spec/timer-workqueue-cpu-quiescent

NOTE: This branch isn't merged into big LITTLE MP merge branch till now. Waiting
for feedback from mainline.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] cpufreq: vexpress_bl: Optimize vexpress_cpufreq_of_init()

2012-10-08 Thread Viresh Kumar
This patch tries to optimize vexpress_cpufreq_of_init() routine of vexpress_bl
cpufreq driver.

Following are the optimizations:
- No need to allocate freq table array and copy it into struct
  cpufreq_frequency_table. This removes the need of
  _cpufreq_copy_table_from_array() routine too.
- Use global freq_table variable instead of creating local copy freqtable.
- replace kzalloc with kmalloc, as we are updating all the fields.
- free_mem: path expects the clusters to be defined in ascending order, which
  shouldn't be enforced. Instead try to free freq_table for all clusters.

Signed-off-by: Viresh Kumar 
---
Hi Sudeep,

I was going through cpufreq framework and took vexpress_bL_cpufreq.c as an
reference. While going through its code, i realized it can be optimized. So this
patch.

This is compiled tested only as i didn't had TC2 with me today. Can you please
see if it looks fine? Then we can ask Tixy to get this into his tree.

--
viresh

 drivers/cpufreq/vexpress_bL_cpufreq.c | 50 +--
 1 file changed, 18 insertions(+), 32 deletions(-)

diff --git a/drivers/cpufreq/vexpress_bL_cpufreq.c 
b/drivers/cpufreq/vexpress_bL_cpufreq.c
index 2c71b24..9af38cf 100644
--- a/drivers/cpufreq/vexpress_bL_cpufreq.c
+++ b/drivers/cpufreq/vexpress_bL_cpufreq.c
@@ -146,28 +146,14 @@ static unsigned int vexpress_cpufreq_get(unsigned int cpu)
return freq_table[cur_cluster][freq_tab_idx].frequency;
 }
 
-/* translate the integer array into cpufreq_frequency_table entries */
-static inline void _cpufreq_copy_table_from_array(uint32_t *table,
-   struct cpufreq_frequency_table *freq_table, int size)
-{
-   int i;
-   for (i = 0; i < size; i++) {
-   freq_table[i].index = i;
-   freq_table[i].frequency =  table[i] / 1000; /* in kHZ */
-   }
-   freq_table[i].index = size;
-   freq_table[i].frequency = CPUFREQ_TABLE_END;
-}
-
 static int vexpress_cpufreq_of_init(void)
 {
-   uint32_t cpu_opp_num;
-   struct cpufreq_frequency_table *freqtable[VEXPRESS_MAX_CLUSTER];
-   uint32_t *cpu_freqs;
-   int ret = 0, cluster_id = 0, len;
struct device_node *cluster = NULL;
const struct property *pp;
+   uint32_t cpu_opp_num;
+   int ret = 0, cluster_id = 0, len, i = -1;
const u32 *hwid;
+   const __be32 *val;
 
while ((cluster = of_find_node_by_name(cluster, "cluster"))) {
hwid = of_get_property(cluster, "reg", &len);
@@ -175,33 +161,33 @@ static int vexpress_cpufreq_of_init(void)
cluster_id = be32_to_cpup(hwid);
 
pp = of_find_property(cluster, "freqs", NULL);
-   if (!pp)
+   if (!pp || !pp->value || !pp->length)
return -EINVAL;
+
cpu_opp_num = pp->length / sizeof(u32);
if (!cpu_opp_num)
return -ENODATA;
 
-   cpu_freqs = kzalloc(sizeof(uint32_t) * cpu_opp_num, GFP_KERNEL);
-   freqtable[cluster_id] =
-   kzalloc(sizeof(struct cpufreq_frequency_table) *
-   (cpu_opp_num + 1), GFP_KERNEL);
-   if (!cpu_freqs || !freqtable[cluster_id]) {
+   freq_table[cluster_id] = kmalloc(sizeof(**freq_table) *
+   (cpu_opp_num + 1), GFP_KERNEL);
+   if (!freq_table[cluster_id]) {
ret = -ENOMEM;
goto free_mem;
}
-   of_property_read_u32_array(cluster, "freqs",
-   cpu_freqs, cpu_opp_num);
-   _cpufreq_copy_table_from_array(cpu_freqs,
-   freqtable[cluster_id], cpu_opp_num);
-   freq_table[cluster_id] = freqtable[cluster_id];
 
-   kfree(cpu_freqs);
+   val = pp->value;
+   while (++i < cpu_opp_num) {
+   freq_table[cluster_id][i].index = i;
+   freq_table[cluster_id][i].frequency =
+   be32_to_cpup(val++) / 1000; /* in kHZ */
+   }
+   freq_table[cluster_id][i].index = i;
+   freq_table[cluster_id][i].frequency = CPUFREQ_TABLE_END;
}
return ret;
 free_mem:
-   while (cluster_id >= 0)
-   kfree(freqtable[cluster_id--]);
-   kfree(cpu_freqs);
+   for (i = 0; i < VEXPRESS_MAX_CLUSTER; i++)
+   kfree(freq_table[i]);
return ret;
 }
 
-- 
1.7.12.rc2.18.g61b472e


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[Query]: CPUFREQ: Affected and related cpus in cpufreq

2012-10-08 Thread viresh kumar
Hi All,

Sorry for  asking one of the most basic question of cpufreq :(

I couldn't get the difference between affected (policy->cpus) and
related cpus (policy->related_cpus) in cpufreq...

As per Documentation/code:

affected_cpus(policy->cpus):
- List of CPUs that require software coordination of frequency.
- Processors part of affected_cpus share policy struct
- Policy limits the frequencies that the processor can work with.

related_cpus(policy->related_cpus):
- List of CPUs that need some sort of frequency coordination, whether
  software or hardware.
- Processors part of related_cpus share governer.
- Governer sets the rules, about when to change limits specified by policy.

Correct?

So, now comes the real question:
- In which scenario's should we populate affected and related cpus?
- Should related cpus will always be a superset of affected cpus?

--
Viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] cpufreq: vexpress_bl: Optimize vexpress_cpufreq_of_init()

2012-10-08 Thread Viresh Kumar
On 8 October 2012 13:48, Viresh Kumar  wrote:
> This patch tries to optimize vexpress_cpufreq_of_init() routine of vexpress_bl
> cpufreq driver.
>
> Following are the optimizations:
> - No need to allocate freq table array and copy it into struct
>   cpufreq_frequency_table. This removes the need of
>   _cpufreq_copy_table_from_array() routine too.
> - Use global freq_table variable instead of creating local copy freqtable.
> - replace kzalloc with kmalloc, as we are updating all the fields.
> - free_mem: path expects the clusters to be defined in ascending order, which
>   shouldn't be enforced. Instead try to free freq_table for all clusters.

Tested it today on TC2 and found to be working BUT with following fix :)

commit 3fb76ff621e023601bfff51326c8967c2fee0e7a
Author: Viresh Kumar 
Date:   Tue Oct 9 11:25:43 2012 +0530

fixup! cpufreq: vexpress_bl: Optimize vexpress_cpufreq_of_init()
---
 drivers/cpufreq/vexpress_bL_cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/vexpress_bL_cpufreq.c
b/drivers/cpufreq/vexpress_bL_cpufreq.c
index 9af38cf..8b7ec18 100644
--- a/drivers/cpufreq/vexpress_bL_cpufreq.c
+++ b/drivers/cpufreq/vexpress_bL_cpufreq.c
@@ -151,7 +151,7 @@ static int vexpress_cpufreq_of_init(void)
struct device_node *cluster = NULL;
const struct property *pp;
uint32_t cpu_opp_num;
-   int ret = 0, cluster_id = 0, len, i = -1;
+   int ret = 0, cluster_id = 0, len, i;
const u32 *hwid;
const __be32 *val;

@@ -176,7 +176,7 @@ static int vexpress_cpufreq_of_init(void)
}

val = pp->value;
-   while (++i < cpu_opp_num) {
+   for (i = 0; i < cpu_opp_num; i++) {
freq_table[cluster_id][i].index = i;
freq_table[cluster_id][i].frequency =
be32_to_cpup(val++) / 1000; /* in kHZ */


variable 'i' wasn't getting reset for the next loop on clusters.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] cpufreq: core: Fix typo in comment describing show_bios_limit()

2012-10-09 Thread Viresh Kumar
show_bios_limit is mistakenly written as show_scaling_driver in a comment
describing purpose of show_bios_limit() routine.

Fix it.

Signed-off-by: Viresh Kumar 
---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index fb8a527..021973b 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -581,7 +581,7 @@ static ssize_t show_scaling_setspeed(struct cpufreq_policy 
*policy, char *buf)
 }
 
 /**
- * show_scaling_driver - show the current cpufreq HW/BIOS limitation
+ * show_bios_limit - show the current cpufreq HW/BIOS limitation
  */
 static ssize_t show_bios_limit(struct cpufreq_policy *policy, char *buf)
 {
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars

2012-10-09 Thread Viresh Kumar
Following is the declaration of name field in struct cpufreq_driver:
char name[CPUFREQ_NAME_LEN];

where CPUFREQ_NAME_LEN is 16.

So, length of drivers name must be <=15 (one position for '\0').
Current name is crossing this limit and so name doesn't get printed properly
when we do:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

This patch renames driver-name to fix this issue.

Signed-off-by: Viresh Kumar 
---
 drivers/cpufreq/vexpress_bL_cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/vexpress_bL_cpufreq.c 
b/drivers/cpufreq/vexpress_bL_cpufreq.c
index 8b7ec18..541fc40 100644
--- a/drivers/cpufreq/vexpress_bL_cpufreq.c
+++ b/drivers/cpufreq/vexpress_bL_cpufreq.c
@@ -244,7 +244,7 @@ static struct cpufreq_driver vexpress_cpufreq_driver = {
.target = vexpress_cpufreq_set_target,
.get= vexpress_cpufreq_get,
.init   = vexpress_cpufreq_init,
-   .name   = "cpufreq_vexpress",
+   .name   = "vexpress-bL",
.attr   = vexpress_cpufreq_attr,
 };
 
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars

2012-10-09 Thread Viresh Kumar
On 9 October 2012 16:24, Pawel Moll  wrote:
> On Tue, 2012-10-09 at 11:42 +0100, Sudeep KarkadaNagesha wrote:
>> Robin raised a valid point that this driver is TC2 specific and bL is
>> not appropriate name for it including the file name(my bad choice at first).
>
> Just to be painfully precise ;-) I must say it's not TC2 specific, but
> V2P-CA15_A7 specific. TC2 == Test Chip 2, also known as Garuda. The SPC
> that the driver talks to is _not_ a part of the TC2, it's a separate
> component of the V2P-CA15_A7 core tile (HBI0249).

Why is it CA15_A7 specific? It looks to me like a simple cpufreq
driver for vexpress
board, that may support any coretile... Single cluster, multicluster
(big LITTLE or
otherwise)...

What's in there for CA15 or A7 ?

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars

2012-10-09 Thread Viresh Kumar
On 9 October 2012 21:02, Jon Medhurst (Tixy)  wrote:
> Considering the confusion over what the correct naming should be, I
> don't think it's worth me apply the renaming patch at the moment ;-)

This thread went into another direction, than the one it was intended for :)

Looks correct, would be better if Sudeep can send a quick patch with
renaming of file/routines/driver. Because the initial issue reported by me
was a bug and has to be fixed ASAP.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 02/10] sched: Task placement for heterogeneous systems based on task load-tracking

2012-10-09 Thread Viresh Kumar
On 9 October 2012 21:26, Morten Rasmussen  wrote:
> On Thu, Oct 04, 2012 at 07:02:03AM +0100, Viresh Kumar wrote:
>> On 22 September 2012 00:02,   wrote:

>> > SCHED_HMP requires that the platform implements arch_get_hmp_domains()
>> > which should set up the platform specific list of hmp_domains. It is
>> > also assumed that the platform disables SD_LOAD_BALANCE for the
>> > appropriate sched_domains.
>>
>> An explanation of this requirement would be helpful here.
>
> Yes. This is to prevent the load-balancer from moving tasks between
> hmp_domains. This will be done exclusively by SCHED_HMP instead to
> implement a strict task migration policy and avoid changing the
> load-balancer behaviour. The load-balancer will take care of
> load-balacing within each hmp_domain.

Honestly speaking i understood this point now and earlier it wasn't clear
to me :)

What would be ideal is to put this information in the comment just before
we re-define other SCHED_*** domains where we disable balancing.
And keep it in the commit log too.

>> > +struct hmp_domain {
>> > +   struct cpumask cpus;
>> > +   struct list_head hmp_domains;
>>
>> Probably need a better name here. domain_list?
>
> Yes. hmp_domain_list would be better and stick with the hmp_* naming
> convention.

IMHO hmp_ would be better for global names, but names of variables
enclosed within another hmp_*** data type don't actually need hmp_**,
as this is implicity.

i.e.
struct hmp_domain {
   struct cpumask cpus;
   struct list_head domain_list;
}

would be better than
   struct list_head hmp domain_list;

as the parent structure already have hmp_***. So whatever is inside the
struct is obviously hmp specific.

>> > +/* Setup hmp_domains */
>> > +static int __init hmp_cpu_mask_setup(void)
>>
>> How should we interpret its return value? Can you mention what does 0 & 1 
>> mean
>> here?
>>
>
> Returns 0 if domain setup failed, i.e. the domain list is empty, and 1
> otherwise.

Helpful. Please mention this in function comment in your next revision.

>> > +{
>> > +   char buf[64];
>> > +   struct hmp_domain *domain;
>> > +   struct list_head *pos;
>> > +   int dc, cpu;

>> > +   /* Print hmp_domains */
>> > +   dc = 0;
>>
>> Should be done during definition of dc.

You missed this ??

>> > +   for_each_cpu_mask(cpu, domain->cpus) {
>> > +   per_cpu(hmp_cpu_domain, cpu) = domain;
>> > +   }
>>
>> Should use hmp_cpu_domain(cpu) here. Also no need of {} for single
>> line loop.

??

>> > +   dc++;
>>
>> You aren't using it... Only for testing? Should we remove it from mainline
>> patchset and keep it locally?
>>
>
> I'm using it in the pr_debug line a little earlier. It is used for
> enumerating the hmp_domains.

My mistake :(

>> > +/* Check if cpu is in fastest hmp_domain */
>> > +static inline unsigned int hmp_cpu_is_fastest(int cpu)
>> > +{
>> > +   struct list_head *pos;
>> > +
>> > +   pos = &hmp_cpu_domain(cpu)->hmp_domains;
>> > +   return pos == hmp_domains.next;
>>
>> better create list_is_first() for this.
>
> I had the same thought, but I see that as a separate patch that should
> be submitted separately.

Correct. So better send it now, so that it is included before you send your
next version. :)

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] cpufreq: vexpress: cpufreq driver name can't be longer than 15 chars

2012-10-09 Thread Viresh Kumar
On 9 October 2012 22:30, Jon Medhurst (Tixy)  wrote:

> Perhaps I misunderstood the bug, I though it was just a name getting
> truncated and was otherwise harmless. If it's causing real problems then
> I'll apply the original suggested patch and not worry about other
> cosmetic renaming issues.

No real working failure without this patch. Only while doing

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

We don't get a new line entered at the print..

So, currently we get something like:
cpufreq_vexpress$/root/:

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PULL REQUEST]: ARM: perf: multi-PMU support v2

2012-10-09 Thread Viresh Kumar
On 9 October 2012 23:16, Sudeep KarkadaNagesha
 wrote:
> Hi Viresh,
>
> Please pull the following changes(v2) for the multiple CPU PMU support
> (re-based to v3.6).

Thanks.. Will be included in this release.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PULL REQUEST]: ARM: perf: multi-PMU support v2

2012-10-09 Thread Viresh Kumar
On 9 October 2012 23:16, Sudeep KarkadaNagesha
 wrote:
> Please pull the following changes(v2) for the multiple CPU PMU support
> (re-based to v3.6).

http://git.linaro.org/gitweb?p=arm/big.LITTLE/mp.git;a=shortlog;h=refs/heads/arm-multi_pmu_v2

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] cpufreq:core: Fix printing of governor and driver name

2012-10-09 Thread Viresh Kumar
Arrays for governer and driver name are of size CPUFREQ_NAME_LEN or 16.
i.e. 15 bytes for name and 1 for trailing '\0'.

When cpufreq driver print these names (for sysfs), it includes '\n' or ' ' in
the fmt string and still passes length as CPUFREQ_NAME_LEN. If the driver or
governor names are using all 15 fields allocated to them, then the trailing '\n'
or ' ' will never be printed. And so commands like:

root@linaro-developer# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

will print something like:

cpufreq_foodrvroot@linaro-developer#

Fix this by increasing print length by one character.

Signed-off-by: Viresh Kumar 
---
 drivers/cpufreq/cpufreq.c | 6 +++---
 include/linux/cpufreq.h   | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 021973b..db6e337 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -445,7 +445,7 @@ static ssize_t show_scaling_governor(struct cpufreq_policy 
*policy, char *buf)
else if (policy->policy == CPUFREQ_POLICY_PERFORMANCE)
return sprintf(buf, "performance\n");
else if (policy->governor)
-   return scnprintf(buf, CPUFREQ_NAME_LEN, "%s\n",
+   return scnprintf(buf, CPUFREQ_NAME_PLEN, "%s\n",
policy->governor->name);
return -EINVAL;
 }
@@ -491,7 +491,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy 
*policy,
  */
 static ssize_t show_scaling_driver(struct cpufreq_policy *policy, char *buf)
 {
-   return scnprintf(buf, CPUFREQ_NAME_LEN, "%s\n", cpufreq_driver->name);
+   return scnprintf(buf, CPUFREQ_NAME_PLEN, "%s\n", cpufreq_driver->name);
 }
 
 /**
@@ -512,7 +512,7 @@ static ssize_t show_scaling_available_governors(struct 
cpufreq_policy *policy,
if (i >= (ssize_t) ((PAGE_SIZE / sizeof(char))
- (CPUFREQ_NAME_LEN + 2)))
goto out;
-   i += scnprintf(&buf[i], CPUFREQ_NAME_LEN, "%s ", t->name);
+   i += scnprintf(&buf[i], CPUFREQ_NAME_PLEN, "%s ", t->name);
}
 out:
i += sprintf(&buf[i], "\n");
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index b60f6ba..fc4b785 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -22,6 +22,8 @@
 #include 
 
 #define CPUFREQ_NAME_LEN 16
+/* Print length for names. Extra 1 space for accomodating '\n' in prints */
+#define CPUFREQ_NAME_PLEN (CPUFREQ_NAME_LEN + 1)
 
 
 /*
-- 
1.7.12.rc2.18.g61b472e



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [RFC PATCH 06/10] ARM: sched: Use device-tree to provide fast/slow CPU list for HMP

2012-10-10 Thread Viresh Kumar
On 10 October 2012 15:47, Morten Rasmussen  wrote:
> On Thu, Oct 04, 2012 at 07:49:32AM +0100, Viresh Kumar wrote:

>> > This patch is reuse of a patch by Jon Medhurst  with a
>> > few bits left out.
>>
>> Then probably he must be the author of this commit? Also a SOB is required
>> from him here.
>>
>
> I don't know what the correct procedure is for this sort of partial
> patch reuse. Since I didn't know better, I adopted Tixy's own reference
> style that he used in one of his patches which is an extension of a
> previous patch by me. I will of course fix it to follow normal procedure
> if there is one.

AFAIK, if you have used only some part of the earlier patch, then you just
need to add an SOB of original author.
But if you have picked most of the stuff from original patch, which i feel is
the case here, you must have original author in author & SOB + your SOB.

> It would be very easy to blame someone else here... :) I will fix it.

:)

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Query]: CPUFREQ: Affected and related cpus in cpufreq

2012-10-10 Thread Viresh Kumar
On 10 October 2012 17:31, Sudeep KarkadaNagesha
 wrote:
> On 08/10/12 14:58, viresh kumar wrote:

>> affected_cpus(policy->cpus):
>> - List of CPUs that require software coordination of frequency.
>> - Processors part of affected_cpus share policy struct
>> - Policy limits the frequencies that the processor can work with.
>>
>> related_cpus(policy->related_cpus):
>> - List of CPUs that need some sort of frequency coordination, whether
>>software or hardware.
>> - Processors part of related_cpus share governer.
>
> Which document states this ?

Code.

> As per my understanding and if you see in cpufreq.c, related_cpus are
> used only when adding back the hotplugged cpu to get the governor.
> Elsewhere affected_cpus is used.

Probably yes. I was wrong.

> Ideally it would be good if above statements is true.
> E.g. In SMP with 4 CPUs(with same OPPs), if 0-1 and 2-3 need h/w
> co-ordination, then:
> related_cpus: 0-1 and 2-3
> affected_cpus: case#1: 0-1 and 2-3 if we want to have different policies
>case#2: 0-3 if we want to have same policy on all CPUS
> I believe this is not possible in current code.

I couldn't understand the difference b/w h/w and s/w coordination. What
do we mean by them here.

Following patch added related related_cpu stuff:


commit e8628dd06d66f2e3965ec9742029b401d63434f1
Author: Darrick J. Wong 
Date:   Fri Apr 18 13:31:12 2008 -0700

[CPUFREQ] expose cpufreq coordination requirements regardless of
coordination mechanism

Currently, affected_cpus shows which CPUs need to have their frequency
coordinated in software.  When hardware coordination is in use, the contents
of this file appear the same as when no coordination is required.  This can
lead to some confusion among user-space programs, for example, that do not
know that extra coordination is required to force a CPU core to a particular
speed to control power consumption.

To fix this, create a "related_cpus" attribute that always displays the
coordination map regardless of whatever coordination strategy the cpufreq
driver uses (sw or hw).  If the cpufreq driver does not provide a
value, fall
back to policy->cpus.

Signed-off-by: Darrick J. Wong 
Signed-off-by: Andrew Morton 
Signed-off-by: Dave Jones 
---

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [Query]: CPUFREQ: Affected and related cpus in cpufreq

2012-10-10 Thread Viresh Kumar
On 10 October 2012 19:14, Sudeep KarkadaNagesha
 wrote:
> Here is my understanding on this patch. This change is closely related
> to ACPI cpufreq driver(used mostly on Intel cores). This change was
> introduced to keep track of the related cpus as returned by ACPI
> firmware along with affected cpus as imposed by SW. I don't understand
> the exact difference in Intel cores.
> I believe it's just for tracking and not used much in the driver.

Then i believe we shouldn't fill the related_cpus field for ARM cores. As anyway
the show_related_cpus will pick affected cpus in that case.

--
viresh

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v2] ARM: hw_breakpoint: v7.1 self-hosted debug powerdown support

2012-10-12 Thread Viresh Kumar
On 12 October 2012 14:00, Dietmar Eggemann  wrote:
> This patch introduces os save and restore mechanism for v7.1 debug and
> self-hosted debuggers.
> It enables the os to save DBGDSCR before powerdown and restore it when power
> is restored.
>
> The clearing of the os lock in the restore function kick-starts the debug
> logic again.
>
> The os save and restore routines are hooked into the CPU PM event notifier
> chain. CPU PM events are used to save and restore per-cpu context when a
> single CPU is preparing to enter or has exited a low power state.
>
> Signed-off-by: Dietmar Eggemann 

Applied. thanks.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[GIT PULL]: big LITTLE MP v10

2012-10-12 Thread Viresh Kumar
Hi Andrey,

Please PULL b.L MP V10 branch from my tree.

Updates:
---
- Based on v3.6
- Stats:
 - Total Patches: 77 (V9 had incorrect count)
 - New Patches: 7
   - task-placement-v2: sched: Enable HMP priority filter by default
   - arm-multi_pmu_v2 updated existing patches:
 http://permalink.gmane.org/gmane.linux.linaro.devel/13707
   - hw-bkp-v7.1-debug-v1: new branch (1 patch)
 - Dropped Patches: 2
   - branch cpu-hotplug-get_online_cpus-v1 removed as patches are already there
 in rcu-hotplug-v1
 - Updated Patches:
   - per-task-load-average-v3-fixed updated with minor fixes.  from:
 git://git.kernel.org/pub/scm/linux/kernel/git/pjt/sched.git

8<

The following changes since commit c6617199117105f771463be72e69017303c9fe54:

  config-frag/big-LITTLE: Use device-tree to provide fast/slow CPU
list for HMP (2012-10-03 16:00:21 +0530)

are available in the git repository at:

  git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v10

for you to fetch changes up to 2027d925f44d49835beff1b4917d8fd91f8805d7:

  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'arm-asymmetric-support-v3-v3.6-rc1',
'rcu-hotplug-v1', 'arm-multi_pmu_v2', 'scheduler-misc-v1',
'hw-bkp-v7.1-debug-v1' and 'config-fragments' into big-LITTLE-MP-v10
(2012-10-12 14:14:20 +0530)



Axel Lin (1):
  ARM: ux500: Fix build error due to missing include of asm/pmu.h
in cpu-db8500.c

Ben Segall (1):
  sched: maintain per-rq runnable averages

Dietmar Eggemann (1):
  ARM: hw_breakpoint: v7.1 self-hosted debug powerdown support

Jon Hunter (1):
  ARM: PMU: Add runtime PM Support

Lorenzo Pieralisi (1):
  ARM: kernel: provide cluster to logical cpu mask mapping API

Marc Zyngier (1):
  ARM: perf: add guest vs host discrimination

Mark Rutland (1):
  ARM: perf: register cpu_notifier at driver init

Morten Rasmussen (12):
  sched: entity load-tracking load_avg_ratio
  sched: Task placement for heterogeneous systems based on task
load-tracking
  sched: Forced task migration on heterogeneous systems
  sched: Introduce priority-based task migration filter
  ARM: Add HMP scheduling support for ARM architecture
  ARM: sched: Use device-tree to provide fast/slow CPU list for HMP
  ARM: sched: Setup SCHED_HMP domains
  sched: Add ftrace events for entity load-tracking
  sched: Add HMP task migration ftrace event
  sched: SCHED_HMP multi-domain task migration control
  sched: Enable HMP priority filter by default
  linaro/configs: Enable HMP priority filter by default

Paul Turner (15):
  sched: track the runnable average on a per-task entity basis
  sched: aggregate load contributed by task entities on parenting cfs_rq
  sched: maintain the load contribution of blocked entities
  sched: add an rq migration call-back to sched_class
  sched: account for blocked load waking back up
  sched: aggregate total task_group load
  sched: compute load contribution by a group entity
  sched: normalize tg load contributions against runnable time
  sched: maintain runnable averages across throttled periods
  sched: replace update_shares weight distribution with per-entity
computation
  sched: refactor update_shares_cpu() -> update_blocked_avgs()
  sched: update_cfs_shares at period edge
  sched: make __update_entity_runnable_avg() fast
  sched: implement usage tracking
  sched: introduce temporary FAIR_GROUP_SCHED dependency for load-tracking

Sudeep KarkadaNagesha (11):
  ARM: pmu: remove arm_pmu_type enumeration
  ARM: perf: move irq registration into pmu implementation
  ARM: perf: allocate CPU PMU dynamically at probe time
  ARM: perf: consistently use struct perf_event in arm_pmu functions
  ARM: perf: check ARMv7 counter validity on a per-pmu basis
  ARM: perf: replace global CPU PMU pointer with per-cpu pointers
  ARM: perf: register CPU PMUs with idr types
  ARM: perf: set cpu affinity to support multiple PMUs
  ARM: perf: set cpu affinity for the irqs correctly
  ARM: perf: remove spaces in CPU PMU names
  ARM: perf: save/restore pmu registers in pm notifier

Viresh Kumar (1):
  Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'arm-asymmetric-support-v3-v3.6-rc1',
'rcu-hotplug-v1', 'arm-multi_pmu_v2', 'scheduler-misc-v1',
'hw-bkp-v7.1-debug-v1' and 'config-fragments' into big-LITTLE-MP-v10

Will Deacon (8):
  ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs
  ARM: pmu: remove unused reservation mechanism
  ARM: perf: remove mysterious compiler barrier
  ARM: perf: probe devicetree in

  1   2   3   4   5   >