From: Quentin Perret <qperret@google.com>
To: zhuguangqing83@gmail.com
Cc: lukasz.luba@arm.com, quentin.perret@arm.com, rjw@rjwysocki.net,
pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
zhuguangqing <zhuguangqing@xiaomi.com>
Subject: Re: [PATCH] PM / EM: consult something about cpumask in em_dev_register_perf_domain
Date: Mon, 12 Oct 2020 14:10:04 +0100 [thread overview]
Message-ID: <20201012131004.GB3366383@google.com> (raw)
In-Reply-To: <20201012130501.GA3366383@google.com>
On Monday 12 Oct 2020 at 14:05:01 (+0100), Quentin Perret wrote:
> > 3, The third question is, how can we ensure cpu_dev as follows is not
> > NULL? If we can't ensure that, maybe we should add a check before using
> > it.
> > /kernel/power/energy_model.c
> > 174) static int em_create_pd(struct device *dev, int nr_states,
> > 175) struct em_data_callback *cb, cpumask_t *cpus)
> > 176) {
> > 199) if (_is_cpu_device(dev))
> > 200) for_each_cpu(cpu, cpus) {
> > 201) cpu_dev = get_cpu_device(cpu);
> > 202) cpu_dev->em_pd = pd;
> > 203) }
>
> And that should not be necessary as we check for the !dev case at the
> top of em_dev_register_perf_domain(). Or were you thinking about
> something else?
Oh I think I read that one wrong, but the conclusion should be the same,
at least on Arm64 -- all _possible_ CPUs should be registered early
enough for that not to be an issue.
Did you observe anything wrong there for your use-case?
Thanks,
Quentin
next prev parent reply other threads:[~2020-10-12 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 12:41 zhuguangqing83
2020-10-12 13:05 ` Quentin Perret
2020-10-12 13:10 ` Quentin Perret [this message]
2020-10-13 3:40 zhuguangqing83
2020-10-13 15:20 ` Quentin Perret
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=20201012131004.GB3366383@google.com \
--to=qperret@google.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=pavel@ucw.cz \
--cc=quentin.perret@arm.com \
--cc=rjw@rjwysocki.net \
--cc=zhuguangqing83@gmail.com \
--cc=zhuguangqing@xiaomi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome