All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liu, Jinsong" <jinsong.liu@intel.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: RE: [PATCH 2] X86: cpufreq get_cur_val adjustment
Date: Wed, 11 Feb 2009 20:28:35 +0800	[thread overview]
Message-ID: <706158FABBBA044BAD4FE898A02E4BC22411C7D2@pdsmsx503.ccr.corp.intel.com> (raw)
In-Reply-To: <4992B6CA.76E4.0078.0@novell.com>

Jan Beulich wrote:
>>>> "Liu, Jinsong" <jinsong.liu@intel.com> 11.02.09 09:46 >>>
>> X86: cpufreq get_cur_val adjustment
>> 
>> c/s 19149 update cpufreq get_cur_val logic to avoid cross processor
>> call, it's a good point. 
>> However, to avoid null drv_data pointer, we adjust some logic in
>> this patch, to keep advantage of c/s 19149 and at same time to avoid
>> null drv_data pointer. 
> 
> Are you saying that there are cases where
> cpufreq_cpu_policy[cpu]->cpu != cpu? 
> 
> And shouldn't drv_data[] be initialized for all known CPUs (possibly
> set to the same value for several of them)? 
> 
> The patch you submitted would only be needed if the answer is 'yes'
> to the first question, and 'no' to the second (and even then I would
> think fixing drv_data[] initialization would be better than the patch
> presented here).   
> 
> Jan

You have eagle eyes :)

For the 1st question, the answer is yes.
    - in cpufreq_cpu_policy[cpu], cpu is the processor number as a index;
    - in cpufreq_cpu_policy[cpu]->cpu, the later cpu is the 'main cpu' of the coordination domain;

For the 2nd question, the answer is no.
    - this is inherited from native linux, although it seems a little strange, native linux really works so;
    - in a _PSD domain, there is a 'main cpu', and only drv_data[main_cpu] is not null;
    - I agree with you, logically drv_data[] can be a per-domain data structure rather than as current per-cpu data structure, however, native linux don't have per-domain level structure, and considering different coordination type, per-domain structure will be very complex. I think current drv_data is OK, it works and compatible with latest native linux (i.e. 2.6.26.5).

Thanks,
Jinsong

      reply	other threads:[~2009-02-11 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11  8:46 [PATCH 2] X86: cpufreq get_cur_val adjustment Liu, Jinsong
2009-02-11 10:30 ` Jan Beulich
2009-02-11 12:28   ` Liu, Jinsong [this message]

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=706158FABBBA044BAD4FE898A02E4BC22411C7D2@pdsmsx503.ccr.corp.intel.com \
    --to=jinsong.liu@intel.com \
    --cc=jbeulich@novell.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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 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.