From: Vallish Vaidyeshwara <vallish@amazon.com>
To: David Miller <davem@davemloft.net>
Cc: <shuah@kernel.org>, <richardcochran@gmail.com>,
<xiyou.wangcong@gmail.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <eduval@amazon.com>,
<anchalag@amazon.com>
Subject: Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket
Date: Sun, 27 Aug 2017 20:47:25 +0000 [thread overview]
Message-ID: <20170827204725.GA8625@amazon.com> (raw)
In-Reply-To: <20170822.213030.1848111782253505433.davem@davemloft.net>
On Tue, Aug 22, 2017 at 09:30:30PM -0700, David Miller wrote:
> From: Vallish Vaidyeshwara <vallish@amazon.com>
> Date: Wed, 23 Aug 2017 00:10:25 +0000
>
> > I am submitting 2 patch series to enable hires timer to timeout
> > datagram sockets (AF_UNIX & AF_INET domain) and test code to test
> > timeout accuracy on these sockets.
>
> This is not reasonable.
>
> If you want high resolution events with real guarantees, please use
> the kernel interfaces which provide this as explained to you as
> feedback by other reviewers.
>
> I'm not applying this, sorry.
Hello David,
I respect the decision not to upstream this patch series, however I
wanted to provide additional details. Application wanting high
resolution events with real guarantees is not the case, but the case
here is regression in system call behavior:
1) Change in system call behavior:
strace from 4.4 test run of waiting for 180 seconds on datagram socket:
10:25:48.239685 setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
10:25:48.239755 recvmsg(3, 0x7ffd0a3beec0, 0) = -1 EAGAIN (Resource temporarily unavailable)
10:28:48.236989 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
strace from 4.9 test run of waiting for 180 seconds on datagram socket times out close to 195 seconds:
setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\264\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0 <0.000028>
recvmsg(3, 0x7ffd6a2c4380, 0) = -1 EAGAIN (Resource temporarily unavailable) <194.852000>
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 <0.000018>
This is the change in behavior of system call that is causing our application
to regress on 4.9 kernel. There are events which need to be run on timeouts
and now response time for such timeouts on 4.9 kernel are being triggered
with extended delay of close to 195 seconds as in one of the test runs
shown above.
2) Comparison with MacOS:
I ran the same test on OS X El Capitan version 10.11.6 and the behavior is
consistent with Linux 4.4 Kernel behavior. I have not tested the program on
other flavors of OS like HPUX or AIX or Solaris, but I guess if these OS
implement SO_RCVTIMEO and tested, this behavior will not be different than
Linux 4.4 kernel.
3) Standards Specification:
Opengroups standard does not talk about how quick SO_RCVTIMEO need to respond
for timeouts. However, the standards for select system call do mention that
timeout need to respond quickly. It would be good to restore SO_RCVTIMEO
behavior to 4.4 kernel and have SO_RCVTIMEO be consistent with select timeout.
4) Changing application code:
Any change to application code to accommodate this change of behavior in system
call breaks application migration between 4.4 kernel and 4.9 kernel.
Moreover, making application code change is not feasible in all cases as in
the case where the source code is not available (third party vendor).
Thanks.
-Vallish
next prev parent reply other threads:[~2017-08-27 20:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 0:10 [PATCH v2 0/2] enable hires timer to timeout datagram socket Vallish Vaidyeshwara
2017-08-23 0:10 ` [PATCH v2 1/2] net: enable high resolution timer mode to timeout datagram sockets Vallish Vaidyeshwara
2017-08-23 0:10 ` [PATCH v2 2/2] selftests/net: add test to verify datagram socket timeout Vallish Vaidyeshwara
2017-08-23 4:30 ` [PATCH v2 0/2] enable hires timer to timeout datagram socket David Miller
2017-08-27 20:47 ` Vallish Vaidyeshwara [this message]
2017-08-29 11:16 ` David Laight
2017-09-08 17:04 ` Eduardo Valentin
2017-09-08 17:16 ` David Miller
2017-09-08 17:23 ` David Woodhouse
2017-09-08 17:26 ` David Miller
2017-09-08 18:55 ` Eduardo Valentin
2017-09-08 19:11 ` Eric Dumazet
2017-09-16 9:47 ` Thomas Gleixner
2017-09-20 22:48 ` Vallish Vaidyeshwara
2017-09-25 20:42 ` Thomas Gleixner
2017-09-08 21:44 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170827204725.GA8625@amazon.com \
--to=vallish@amazon.com \
--cc=anchalag@amazon.com \
--cc=davem@davemloft.net \
--cc=eduval@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=shuah@kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).