From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net-next,v3] tcp: Improve setsockopt() TCP_USER_TIMEOUT accuracy Date: Tue, 10 Jul 2018 05:48:22 -0700 Message-ID: References: <20180710065147.27647-1-jmaxwell37@gmail.com> <3f856638-52bc-6630-a3d2-2b50f1bf7e48@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: edumazet@google.com, ncardwell@google.com, David.Laight@aculab.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jmaxwell@redhat.com To: Jon Maxwell , davem@davemloft.net Return-path: In-Reply-To: <3f856638-52bc-6630-a3d2-2b50f1bf7e48@gmail.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 07/10/2018 05:38 AM, Eric Dumazet wrote: > Note that if we always do jiffies_to_msecs(icsk->icsk_user_timeout) in TCP, > we also could change the convention and store msecs in this field instead of jiffies. > > That would eliminate the msecs_to_jiffies() and jiffies_to_msecs() dance. > > (That would be done in a patch of its own, of course) tcp_keepalive_timer() does use icsk->icsk_user_timeout directly in jiffies unit, but considering keeapalive timers are rarely used, this point would have to do the msecs_to_jiffies() conversion.