All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Porting cpufreq module for memory frequency scaling 'memfreq'
       [not found] <CAMefCkCXyM4EV92Q==zScae7FzgD2VjmyGx2nTf_u2LK6b6hvQ@mail.gmail.com>
@ 2013-06-26 15:58 ` Guru Prasad
  2013-06-27  7:18   ` Viresh Kumar
  2013-06-27  8:11   ` Vincent Guittot
  0 siblings, 2 replies; 4+ messages in thread
From: Guru Prasad @ 2013-06-26 15:58 UTC (permalink / raw)
  To: cpufreq

Hi,

I'm working with a hardware simulator - Gem5 (http://gem5.org). I have
added some functionality to this simulator to modify memory frequency.

I would like to add kernel support to manage memory frequency similar
to how cpu frequency is currently maintained so that I can study the
cost-benefit of memory frequency scaling.

I copied all the generic cpufreq sources to a separate folder
kernel_source/drivers/memfreq and setup the drivers/Makefile. I have
also done the preliminary Kconfig modifications.

A few things I don't follow are

Where does the kernel actually implement the delay resulting from
cpuinfo.transition_latency?
Does the kernel stall for the duration of the delay?

the per_cpu macro        - I don't understand what this does..How can
I implement the same for memory - which I'm considering as a shared
resource rather than per_cpu.

the subsys interface      - What does it do and how do I reproduce
this for memory? Can I use the existing bus_type memory_subsys?
(drivers/base/memory.c)

callback                       - This seems to be specific for
CONFIG_HOTPLUG_CPU..do I need to implement this at all for memfreq?

sysfs interface              - Is there any place I can look to
implement a nice sysfs interface similar to cpufreq?


Please let me know if there is anything I've missed out that might
complicate the process.


Regards
Guru

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting cpufreq module for memory frequency scaling 'memfreq'
  2013-06-26 15:58 ` Fwd: Porting cpufreq module for memory frequency scaling 'memfreq' Guru Prasad
@ 2013-06-27  7:18   ` Viresh Kumar
  2013-06-27  8:11   ` Vincent Guittot
  1 sibling, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2013-06-27  7:18 UTC (permalink / raw)
  To: Guru Prasad; +Cc: cpufreq

On Wed, Jun 26, 2013 at 9:28 PM, Guru Prasad <gurupras@buffalo.edu> wrote:
> I'm working with a hardware simulator - Gem5 (http://gem5.org). I have
> added some functionality to this simulator to modify memory frequency.
>
> I would like to add kernel support to manage memory frequency similar
> to how cpu frequency is currently maintained so that I can study the
> cost-benefit of memory frequency scaling.
>
> I copied all the generic cpufreq sources to a separate folder
> kernel_source/drivers/memfreq and setup the drivers/Makefile. I have
> also done the preliminary Kconfig modifications.
>
> A few things I don't follow are
>
> Where does the kernel actually implement the delay resulting from
> cpuinfo.transition_latency?
> Does the kernel stall for the duration of the delay?

This is the expected hardware latency for changing frequency and
not a delay that kernel will implement.

This will help in taking a decision to change freq, if its really worth or
not.

> the per_cpu macro        - I don't understand what this does..How can
> I implement the same for memory - which I'm considering as a shared
> resource rather than per_cpu.

This helps in creating an instance of variable per cpu... so if your system have
four cpus, we will have four variables with the same name :)

Just create a normal variable if you don't want per-cpu stuff.

> the subsys interface      - What does it do and how do I reproduce
> this for memory? Can I use the existing bus_type memory_subsys?
> (drivers/base/memory.c)

This helps in getting notifications when cpus are added/removed.

> sysfs interface              - Is there any place I can look to
> implement a nice sysfs interface similar to cpufreq?

cpufreq.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting cpufreq module for memory frequency scaling 'memfreq'
  2013-06-26 15:58 ` Fwd: Porting cpufreq module for memory frequency scaling 'memfreq' Guru Prasad
  2013-06-27  7:18   ` Viresh Kumar
@ 2013-06-27  8:11   ` Vincent Guittot
  2013-06-27 13:06     ` Guru Prasad
  1 sibling, 1 reply; 4+ messages in thread
From: Vincent Guittot @ 2013-06-27  8:11 UTC (permalink / raw)
  To: Guru Prasad; +Cc: cpufreq

On 26 June 2013 17:58, Guru Prasad <gurupras@buffalo.edu> wrote:
> Hi,
>
> I'm working with a hardware simulator - Gem5 (http://gem5.org). I have
> added some functionality to this simulator to modify memory frequency.
>
> I would like to add kernel support to manage memory frequency similar
> to how cpu frequency is currently maintained so that I can study the
> cost-benefit of memory frequency scaling.

Have you looked at devfreq framework ? It should match with what you
are looking for.

devfreq is used to manage the frequency scaling of devices other than
cpu like the gpu or the memory

Vincent


>
> I copied all the generic cpufreq sources to a separate folder
> kernel_source/drivers/memfreq and setup the drivers/Makefile. I have
> also done the preliminary Kconfig modifications.
>
> A few things I don't follow are
>
> Where does the kernel actually implement the delay resulting from
> cpuinfo.transition_latency?
> Does the kernel stall for the duration of the delay?
>
> the per_cpu macro        - I don't understand what this does..How can
> I implement the same for memory - which I'm considering as a shared
> resource rather than per_cpu.
>
> the subsys interface      - What does it do and how do I reproduce
> this for memory? Can I use the existing bus_type memory_subsys?
> (drivers/base/memory.c)
>
> callback                       - This seems to be specific for
> CONFIG_HOTPLUG_CPU..do I need to implement this at all for memfreq?
>
> sysfs interface              - Is there any place I can look to
> implement a nice sysfs interface similar to cpufreq?
>
>
> Please let me know if there is anything I've missed out that might
> complicate the process.
>
>
> Regards
> Guru
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Porting cpufreq module for memory frequency scaling 'memfreq'
  2013-06-27  8:11   ` Vincent Guittot
@ 2013-06-27 13:06     ` Guru Prasad
  0 siblings, 0 replies; 4+ messages in thread
From: Guru Prasad @ 2013-06-27 13:06 UTC (permalink / raw)
  To: Vincent Guittot; +Cc: cpufreq

@Viresh Kumar:
Thank you for taking time out to resolve my questions.

@Vincent Guittot:
I have not looked into the devfreq framework. Thank you for pointing
me towards it. I will try to use this framework to implement the
proposed memory frequency scaling.
I have only been working on the Linux kernel a few months, but it
seems to me that Linux has thought of everything already!


Regards
Guru


On Thu, Jun 27, 2013 at 4:11 AM, Vincent Guittot
<vincent.guittot@linaro.org> wrote:
> On 26 June 2013 17:58, Guru Prasad <gurupras@buffalo.edu> wrote:
>> Hi,
>>
>> I'm working with a hardware simulator - Gem5 (http://gem5.org). I have
>> added some functionality to this simulator to modify memory frequency.
>>
>> I would like to add kernel support to manage memory frequency similar
>> to how cpu frequency is currently maintained so that I can study the
>> cost-benefit of memory frequency scaling.
>
> Have you looked at devfreq framework ? It should match with what you
> are looking for.
>
> devfreq is used to manage the frequency scaling of devices other than
> cpu like the gpu or the memory
>
> Vincent
>
>
>>
>> I copied all the generic cpufreq sources to a separate folder
>> kernel_source/drivers/memfreq and setup the drivers/Makefile. I have
>> also done the preliminary Kconfig modifications.
>>
>> A few things I don't follow are
>>
>> Where does the kernel actually implement the delay resulting from
>> cpuinfo.transition_latency?
>> Does the kernel stall for the duration of the delay?
>>
>> the per_cpu macro        - I don't understand what this does..How can
>> I implement the same for memory - which I'm considering as a shared
>> resource rather than per_cpu.
>>
>> the subsys interface      - What does it do and how do I reproduce
>> this for memory? Can I use the existing bus_type memory_subsys?
>> (drivers/base/memory.c)
>>
>> callback                       - This seems to be specific for
>> CONFIG_HOTPLUG_CPU..do I need to implement this at all for memfreq?
>>
>> sysfs interface              - Is there any place I can look to
>> implement a nice sysfs interface similar to cpufreq?
>>
>>
>> Please let me know if there is anything I've missed out that might
>> complicate the process.
>>
>>
>> Regards
>> Guru
>> --
>> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-27 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMefCkCXyM4EV92Q==zScae7FzgD2VjmyGx2nTf_u2LK6b6hvQ@mail.gmail.com>
2013-06-26 15:58 ` Fwd: Porting cpufreq module for memory frequency scaling 'memfreq' Guru Prasad
2013-06-27  7:18   ` Viresh Kumar
2013-06-27  8:11   ` Vincent Guittot
2013-06-27 13:06     ` Guru Prasad

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.