The invention is applicable to the field of power adjustment, and provides a device for power adjustment method, including the power adjustment method: to detect whether the adapter access; when the access adapter, support the preservation performance status of P-state all order; find things trigger to modify the parameters of P-state; using the search event, find the P-state modify. To search and modify the parameters passed to CPU P-state. The invention solves the problem that the existing P-state is fixed after entering the operating system, and the operating system can not adjust the power consumption in real time by modifying the P-state, thereby preventing the problem of prolonging the endurance time of the portable device. Through modifying the parameters of P-state and writing to various P-state parameters, the modification of P-state is completed, and the power consumption is reduced, and the life time and resource utilization are improved without affecting the performance.
【技术实现步骤摘要】
一种功耗调整方法及装置
本专利技术属于便携设备领域,尤其涉及一种功耗调整方法及装置。
技术介绍
P-state在Intel是平台上通常指的是智能降频(EnhancedIntelSpeedStepTechnology,EIST),它能够根据不同的工作量自动调节处理器的电压和频率。P-state初始化是在开机DXE阶段初始电源管理的模块里,在这阶段中决定了有几阶的P-state,进入系统后,OS的CPU驱动就会根据CPU负载,调用acpi里面的_PCT的控制函数控制CPU进入P-state。然而,现有的P-state进入操作系统(OperatingSystem,OS)后是固定的,操作系统无法通过修改P-state来实时调整功耗,不利于延长便携设备的续航时间。其原因在于,一般的操作系统都是只写入一种P-state参数,通过一种P-state参数调节处理器的电压和频率,一种P-state参数的适用范围有限,在使用电池的状态下,不利于调整电压和频率,延长使用时间。
技术实现思路
本专利技术实施例的目的在于提供一种功耗调整方法,旨在解决现有的P-state进入操作系统(OperatingSystem,OS)后是固定的,操作系统无法通过修改P-state来实时调整功耗,不利于延长便携设备的续航时间。本专利技术实施例是这样实现的,一种功耗调整方法,包括:检测适配器是否接入;当接入适配器时,保存支持所有阶的性能状态P-state;触发P-state修改参数的查找事件;利用所述查找事件,查找P-state修改参数,并将查找到的P-state修改参数传递至CPU。本专利技术实施例的 ...
【技术保护点】
一种功耗调整方法,其特征在于,包括:检测适配器是否接入;当接入适配器时,保存支持所有阶的性能状态P‑state;触发P‑state修改参数的查找事件;利用所述查找事件,查找P‑state修改参数,并将查找到的P‑state修改参数传递至CPU。
【技术特征摘要】
1.一种功耗调整方法,其特征在于,包括:检测适配器是否接入;当接入适配器时,保存支持所有阶的性能状态P-state;触发P-state修改参数的查找事件;利用所述查找事件,查找P-state修改参数,并将查找到的P-state修改参数传递至CPU。2.如权利要求1所述的功耗调整方法,其特征在于,所有阶的性能状态P-state包括第一种性能状态P0、第二种性能状态P1以及第三种性能状态P2,所述P0、P1以及P2的工作电压和频率均不相同。3.如权利要求2所述的功耗调整方法,其特征在于,在所述检测适配器是否接入之后,所述功耗调整方法,还包括:当不接入适配器时,保存所述第三种性能状态P2。4.如权利要求1所述的功耗调整方法,其特征在于,在利用所述查找事件,查找P-state修改参数,并将查找到的P-state修改参数传递至CPU之后,所述功耗调整方法,还包括:所述CPU根据所述P-state修改参数,修改所述P-state,调整功耗。5.如权利要求4所述的功耗调整方法,其特征在于,所述CPU根据所述P-state修改参数,修改所述P-state,调整功耗,具体为:所述CPU检测当前的总功耗是否超过设定的功耗;若当前的总功耗超过设定的功耗,则在所述P-state修改参数中,修改所述P-state的值,调整工作电压和频率,...
【专利技术属性】
技术研发人员:张伟进,石明,王飞舟,
申请(专利权)人:中国长城计算机深圳股份有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。