All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Yuantian Tang <Yuantian.Tang@freescale.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"LeoLi@freescale.com" <LeoLi@freescale.com>,
	Hongtao Jia <hongtao.jia@freescale.com>
Subject: Re: [PATCH 2/2] cpufreq: ppc-corenet: remove per-cpu variable 'cpu_mask'
Date: Wed, 3 Sep 2014 15:20:24 +0530	[thread overview]
Message-ID: <CAKohpo=Pb88SBg0HwrAtzfRkG5Z9HgsapSmA1PbmqqvP-wQ1qw@mail.gmail.com> (raw)
In-Reply-To: <d9f1dbc51c9d408ea593d11a95a36ee4@BY2PR03MB570.namprd03.prod.outlook.com>

On 3 September 2014 13:32, Yuantian Tang <Yuantian.Tang@freescale.com> wrote:
> Test confirmed what I am concerned. Patch 1 is working but patch 2 didn't working in hotplug case.
> (tested on t4240 platform with 3 cluster and 8 cpus in each cluster, kernel version is 3.12).

:(

> Log is as follows:
> root@t4240rdb:~# cd /sys/devices/system/
> root@t4240rdb:/sys/devices/system# ls
> clockevents  clocksource  cpu  edac
> root@t4240rdb:/sys/devices/system# cd cpu/
> root@t4240rdb:/sys/devices/system/cpu# ls
> cpu0  cpu1  cpu10  cpu11  cpu12  cpu13  cpu14  cpu15  cpu16  cpu17  cpu18  cpu19  cpu2  cpu20  cpu21  cpu22  cpu23  cpu3  cpu4cpu5  cpu6  cpu7  cpu8  cpu9  kernel_max  offline  online  possible  present  probe  release  uevent
> root@t4240rdb:/sys/devices/system/cpu# cat cpu8/
> altivec_idle            altivec_idle_wait_time  cache/                  cpufreq/                online                  physical_id             pir                     pw20_state              pw20_wait_time          smt_snooze_delay        subsystem/              topology/               uevent
> root@t4240rdb:/sys/devices/system/cpu# cat cpu8/cpufreq/affected_cpus
> 8 9 10 11 12 13 14 15
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu8/online
> Cannot set affinity for irq 467
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu9/online
> root@t4240rdb:/sys/devices/system/cpu# cat cpu10/cpufreq/affected_cpus
> 10 11 12 13 14 15
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu10/online
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu11/online
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu12/online
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu13/online
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu14/online
> root@t4240rdb:/sys/devices/system/cpu# echo 0 > cpu15/online
> root@t4240rdb:/sys/devices/system/cpu# echo 1 > cpu9/online
> smp_85xx_kick_cpu: Can not start CPU #9. Start CPU #8 first.
> smp: failed starting cpu 9 (rc -2)
> -sh: echo: write error: No such file or directory

I don't understand how is this related to my patch? And the successful sequence
below has CPU14 here instead of 8.. So this error might come without my
patch as well if this sequence is followed..

> root@t4240rdb:/sys/devices/system/cpu# echo 1 > cpu10/online
> root@t4240rdb:/sys/devices/system/cpu# cat cpu10/cpufreq/affected_cpus
> 10
> root@t4240rdb:/sys/devices/system/cpu# echo 1 > cpu11/online
> sysfs: cannot create duplicate filename '/devices/system/cpu/cpu10/cpufreq'
> ------------[ cut here ]------------
> WARNING: at fs/sysfs/dir.c:526

I think I know why this happened.

Does cpu_core_mask() gives mask of ONLY Online CPUs ? I *strongly* believe
YES looking at above crash.

If we can change that with some other routine which gives mask of all
(online+offline)
CPUs then this crash might go away..

Because of that, I believe there is another problem in your driver even without
my patch. Do this to get similar crash:

- build driver as module and don't load it by default
- boot your system
- offline CPUs 8 to 15 as you did above.
- insert module
- try to online cores as you did above.

--
viresh

  reply	other threads:[~2014-09-03  9:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  3:41 [PATCH 1/2] cpufreq: ppc-corenet: remove duplicate update of cpu_data Viresh Kumar
2014-09-02  3:41 ` [PATCH 2/2] cpufreq: ppc-corenet: remove per-cpu variable 'cpu_mask' Viresh Kumar
2014-09-02  6:46   ` Yuantian Tang
2014-09-02  6:49     ` Viresh Kumar
2014-09-02  7:02       ` Yuantian Tang
2014-09-02  7:09         ` Viresh Kumar
2014-09-02  8:08           ` Yuantian Tang
2014-09-03  8:02           ` Yuantian Tang
2014-09-03  9:50             ` Viresh Kumar [this message]
2014-09-04  2:51               ` Yuantian Tang
2014-09-04  3:38                 ` Viresh Kumar
2014-09-04  4:33                   ` Yuantian Tang
2014-09-04  4:37                     ` Viresh Kumar
2014-09-05  9:35                       ` Yuantian Tang
2014-09-05  9:40                         ` Viresh Kumar
2014-09-02  6:38 ` [PATCH 1/2] cpufreq: ppc-corenet: remove duplicate update of cpu_data Yuantian Tang
2014-09-02  6:47   ` Viresh Kumar
2014-09-10  4:32 ` Viresh Kumar
2014-09-10  5:30   ` Yuantian Tang
2014-09-10  5:39     ` Viresh Kumar
2014-09-10  6:19       ` Yuantian Tang
2014-09-10  6:20 ` Yuantian Tang
2014-09-24 23:45 ` Rafael J. Wysocki
2014-09-29  9:05   ` Viresh Kumar
2014-09-29 23:41     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKohpo=Pb88SBg0HwrAtzfRkG5Z9HgsapSmA1PbmqqvP-wQ1qw@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=LeoLi@freescale.com \
    --cc=Yuantian.Tang@freescale.com \
    --cc=hongtao.jia@freescale.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.