Commit d4a7882f authored by Zhongqiu Han's avatar Zhongqiu Han Committed by Rafael J. Wysocki
Browse files

cpuidle: menu: Optimize bucket assignment when next_timer_ns equals KTIME_MAX



Directly assign the last bucket value instead of calling which_bucket()
when next_timer_ns equals KTIME_MAX, the largest possible value that
always falls into the last bucket.

This avoids unnecessary calculations and enhances performance.

Reviewed-by: default avatarChristian Loehle <christian.loehle@arm.com>
Signed-off-by: default avatarZhongqiu Han <quic_zhonhan@quicinc.com>
Link: https://patch.msgid.link/20250405135308.1854342-1-quic_zhonhan@quicinc.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 194c396e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment