linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Rajendra Nayak <rajendra.nayak@linaro.org>
Cc: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
	linaro-dev@lists.linaro.org
Subject: Re: [PATCH 2/4] cpuidle: define the enter function in the driver structure
Date: Tue, 10 Jul 2012 13:39:40 +0200	[thread overview]
Message-ID: <4FFC147C.4050508@linaro.org> (raw)
In-Reply-To: <4FFBE7E3.8020809@linaro.org>

On 07/10/2012 10:29 AM, Rajendra Nayak wrote:
> Hi Daniel,
> 
> On Friday 06 July 2012 04:28 PM, Daniel Lezcano wrote:
>> The main purpose of all these cleanup patches are to move out all
>> non-data information from the cpuidle_state structure in order to add a
>> new api which could be 'cpuidle_register_cpu_latency(int cpu, struct
>> cpuidle_latencies latencies)'.
> 
> So are there any technical difficulties in adding such an api with the
> non-data information being part of cpuidle_state? Or its just that you
> think the already duplicated non-data information (per state) is going
> to be duplicated much more (per state per cpu) in most cases.

Yes, it is possible. I am already working on an alternate patchset I
will post soon, but I don't like to add more things in a subsystem
before cleaning up the code when it makes sense.

When I looked at the cpuidle code, I noticed this 'enter' field was used
for the same function. With per cpu latency and using the cpuidle_state
structure, that means duplication of this field. For an x86_64
architecture with 16 cores and 4 C-states, that is 512 bytes of memory
instead of 8 bytes.

That is the same for example the 'disable' field which could be stored
in the 'flags' field as a bit instead of the moving it to the 'stats'
structure with "unsigned long long".

As the architectures tend to add more cores [1][2], that means more
memory consumption. In a very near future, we will have 100 cores in a
cpu. Assuming we have 4 C-states, that is 100 * 4 * 8 = 3200 bytes of
memory used for a single function. IMHO, the kernel shouldn't assume the
user must add more memory on the system.

Anyway, I will post a patchset to use the cpuidle_state per cpu.

Thanks
  -- Daniel

[1] http://www.engadget.com/2007/02/11/intel-demonstrates-80-core-processor/
[2] http://www.tilera.com/products/processors/TILE-Gx_Family

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2012-07-10 11:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 13:23 [PATCH 1/4] acpi: intel_idle : break dependency between modules Daniel Lezcano
2012-07-05 13:23 ` [PATCH 2/4] cpuidle: define the enter function in the driver structure Daniel Lezcano
2012-07-05 20:38   ` Rafael J. Wysocki
2012-07-06 10:58     ` Daniel Lezcano
2012-07-06 21:23       ` Rafael J. Wysocki
2012-07-10  8:29       ` Rajendra Nayak
2012-07-10 11:39         ` Daniel Lezcano [this message]
2012-07-10 12:38           ` Rajendra Nayak
2012-07-05 13:23 ` [PATCH 3/4] cpuidle: move enter_dead to " Daniel Lezcano
2012-07-05 20:40   ` Rafael J. Wysocki
2012-07-06 11:05     ` Daniel Lezcano
2012-07-06 21:27       ` Rafael J. Wysocki
2012-07-05 13:23 ` [PATCH 4/4] cpuidle : move tlb flag to the cpuidle header Daniel Lezcano
2012-07-05 20:43   ` Rafael J. Wysocki
2012-07-06 11:07     ` Daniel Lezcano
2012-07-06 21:29       ` Rafael J. Wysocki
2012-07-05 20:26 ` [PATCH 1/4] acpi: intel_idle : break dependency between modules 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=4FFC147C.4050508@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rajendra.nayak@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).