Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923AbdHUUK5 (ORCPT ); Mon, 21 Aug 2017 16:10:57 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34926 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753548AbdHUUKz (ORCPT ); Mon, 21 Aug 2017 16:10:55 -0400 MIME-Version: 1.0 In-Reply-To: <1503081850-10671-2-git-send-email-vallish@amazon.com> References: <1503081850-10671-1-git-send-email-vallish@amazon.com> <1503081850-10671-2-git-send-email-vallish@amazon.com> From: Cong Wang Date: Mon, 21 Aug 2017 13:10:34 -0700 Message-ID: Subject: Re: [PATCH RESEND 1/2] net: enable high resolution timer mode to timeout datagram sockets To: Vallish Vaidyeshwara Cc: David Miller , shuah@kernel.org, Linux Kernel Network Developers , LKML , Eduardo Valentin , anchalag@amazon.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 394 Lines: 9 On Fri, Aug 18, 2017 at 11:44 AM, Vallish Vaidyeshwara wrote: > - *timeo_p = schedule_timeout(*timeo_p); > + /* Wait using highres timer */ > + expires = ktime_add_ns(ktime_get(), jiffies_to_nsecs(*timeo_p)); > + pre_sched_time = jiffies; > + if (schedule_hrtimeout(&expires, HRTIMER_MODE_ABS)) Does this work with MAX_SCHEDULE_TIMEOUT too??