On Wed, Jun 26, 2013 at 9:28 PM, Guru Prasad <gurupras@xxxxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html