IB/mlx4: Use boottime
Subsystems (2)
PATCH 1/1 IB/mlx4: Use boottime
Wall time obtained from ktime_get_real_ns is susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps.
--- drivers/infiniband/hw/mlx4/alias_GUID.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/mlx4/alias_GUID.c +3 -3
@@ -310,7 +310,7 @@ static void aliasguid_query_handler(int status,if (status) {pr_debug ("(port: %d) failed: status = %d\n" , cb_ctx->port, status); - rec->time_to_run =ktime_get_real_ns () +1 *NSEC_PER_SEC ; + rec->time_to_run =ktime_get_boot_ns () +1 *NSEC_PER_SEC ; goto out; }
@@ -416,7 +416,7 @@ next_entry:be64_to_cpu ((__force __be64 )rec->guid_indexes),be64_to_cpu ((__force __be64 )applied_guid_indexes), be64_to_cpu((__force __be64)declined_guid_indexes)); - rec->time_to_run =ktime_get_real_ns () + + rec->time_to_run =ktime_get_boot_ns () + resched_delay_sec *NSEC_PER_SEC ; }else { rec->status =MLX4_GUID_INFO_STATUS_SET ;
@@ -708,7 +708,7 @@ static int get_low_record_time_index(struct mlx4_ib_dev *dev, u8 port, } }if (resched_delay_sec) { -u64 curr_time =ktime_get_real_ns (); +u64 curr_time =ktime_get_boot_ns (); *resched_delay_sec = (low_record_time < curr_time) ?0 :div_u64 ((low_record_time - curr_time),NSEC_PER_SEC );
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1454219752-23246-1-git-send-email-klock.android-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 3 lines · Abhilash Jindal
Wall time obtained from
ktime_get_real_nsis susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps.
Please add your Signed-of signature and resubmit it. Thanks.
Quoted 42 lines
--- drivers/infiniband/hw/mlx4/alias_GUID.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/infiniband/hw/mlx4/alias_GUID.c +3
-3@@ -310,7 +310,7 @@ static void aliasguid_query_handler(int status,if (status) {pr_debug ("(port: %d) failed: status = %d\n" , cb_ctx->port, status); - rec->time_to_run =ktime_get_real_ns () +1 *NSEC_PER_SEC ; + rec->time_to_run =ktime_get_boot_ns () +1 *NSEC_PER_SEC ; goto out; }@@ -416,7 +416,7 @@ next_entry:be64_to_cpu ((__force __be64 )rec->guid_indexes),be64_to_cpu ((__force __be64 )applied_guid_indexes), be64_to_cpu((__force __be64)declined_guid_indexes)); - rec->time_to_run =ktime_get_real_ns () + + rec->time_to_run =ktime_get_boot_ns () + resched_delay_sec *NSEC_PER_SEC ; }else { rec->status =MLX4_GUID_INFO_STATUS_SET ;@@ -708,7 +708,7 @@ static int get_low_record_time_index(struct mlx4_ib_dev *dev, u8 port, } }if (resched_delay_sec) { -u64 curr_time =ktime_get_real_ns (); +u64 curr_time =ktime_get_boot_ns (); *resched_delay_sec = (low_record_time < curr_time) ?0 :div_u64 ((low_record_time - curr_time),NSEC_PER_SEC );Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20160131095534.GA30795-2ukJVAZIZ/[email protected]
PATCH 1/1 IB/mlx4: Use boottime
Wall time obtained from ktime_get_real_ns is susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps.
--- drivers/infiniband/hw/mlx4/alias_GUID.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/mlx4/alias_GUID.c +3 -3
@@ -310,7 +310,7 @@ static void aliasguid_query_handler(int status,if (status) {pr_debug ("(port: %d) failed: status = %d\n" , cb_ctx->port, status); - rec->time_to_run =ktime_get_real_ns () +1 *NSEC_PER_SEC ; + rec->time_to_run =ktime_get_boot_ns () +1 *NSEC_PER_SEC ; goto out; }
@@ -416,7 +416,7 @@ next_entry:be64_to_cpu ((__force __be64 )rec->guid_indexes),be64_to_cpu ((__force __be64 )applied_guid_indexes), be64_to_cpu((__force __be64)declined_guid_indexes)); - rec->time_to_run =ktime_get_real_ns () + + rec->time_to_run =ktime_get_boot_ns () + resched_delay_sec *NSEC_PER_SEC ; }else { rec->status =MLX4_GUID_INFO_STATUS_SET ;
@@ -708,7 +708,7 @@ static int get_low_record_time_index(struct mlx4_ib_dev *dev, u8 port, } }if (resched_delay_sec) { -u64 curr_time =ktime_get_real_ns (); +u64 curr_time =ktime_get_boot_ns (); *resched_delay_sec = (low_record_time < curr_time) ?0 :div_u64 ((low_record_time - curr_time),NSEC_PER_SEC );
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1454266411-25591-1-git-send-email-klock.android-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Leon Romanovsky
Reviewed-byQuoted 5 lines · Abhilash Jindal
Wall time obtained from
ktime_get_real_nsis susceptible to sudden jumps due to user setting the time or due to NTP. Boot time is constantly increasing time better suited for comparing two timestamps.Signed-off-by Abhilash Jindal <[email protected]>
Thanks you.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html