Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1729094 > unrolled thread

Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

Started byEduardo Valentin <eduval@amazon.com>
First post2017-09-08 19:10 +0200
Last post2017-09-08 19:30 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket Eduardo Valentin <eduval@amazon.com> - 2017-09-08 19:10 +0200
    Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket David Miller <davem@davemloft.net> - 2017-09-08 19:20 +0200
      Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket David Miller <davem@davemloft.net> - 2017-09-08 19:30 +0200
        Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket Eduardo Valentin <eduval@amazon.com> - 2017-09-08 21:00 +0200
          Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket Eric Dumazet <eric.dumazet@gmail.com> - 2017-09-08 21:20 +0200
          Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket David Miller <davem@davemloft.net> - 2017-09-08 23:50 +0200
      Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket David Woodhouse <dwmw2@infradead.org> - 2017-09-08 19:30 +0200

#1729094 — Re: [PATCH v2 0/2] enable hires timer to timeout datagram socket

FromEduardo Valentin <eduval@amazon.com>
Date2017-09-08 19:10 +0200
SubjectRe: [PATCH v2 0/2] enable hires timer to timeout datagram socket
Message-ID<unuX0-1th-15@gated-at.bofh.it>
David,

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 understand the kernel provides other interfaces.

> 
> I'm not applying this, sorry.

However, this is a clear, the system call, from the net subsystem,  has changed in behavior across kernel versions. From application / userspace perspective, changing the system call without clear documentation or deprecation path, to me, looks like breaking userspace, isn't it?

If the correct recommendation is to use different system calls this should have been mentioned in system call documentation before changing its behavior, not expect the user to figure out after kernel release/upgrade, right?


-- 
All the best,
Eduardo Valentin

[toc] | [next] | [standalone]


#1729106

FromDavid Miller <davem@davemloft.net>
Date2017-09-08 19:20 +0200
Message-ID<unv6H-1yj-25@gated-at.bofh.it>
In reply to#1729094
From: Eduardo Valentin <eduval@amazon.com>
Date: Fri, 8 Sep 2017 10:04:09 -0700

> However, this is a clear, the system call, from the net subsystem,
> has changed in behavior across kernel versions. From application /
> userspace perspective, changing the system call without clear
> documentation or deprecation path, to me, looks like breaking
> userspace, isn't it?

Where is the chapter and verse of the system call documentation that
guaranteed this level of timer granularity for you?

Or were you simply relying upon implementation dependent behavior?
I can't see anything which ever guarateed the granularity of timers
to the extent upon which you were relying.

And most importantly, letting the kernel have flexibility in this area
is absolutely essential for various forms of optimizations and power
savings.

[toc] | [prev] | [next] | [standalone]


#1729107

FromDavid Miller <davem@davemloft.net>
Date2017-09-08 19:30 +0200
Message-ID<unvgl-1Cc-3@gated-at.bofh.it>
In reply to#1729106
From: David Woodhouse <dwmw2@infradead.org>
Date: Fri, 08 Sep 2017 18:23:22 +0100

> I don't know that anyone's ever tried saying "show me the chapter and
> verse of the documentation"

Do you know why I brought this up?  Because the person I am replying
to told me that the syscall documentation should have suggested this
or that.

That's why.

So let's concentrate on the other aspects of my reply, ok?

[toc] | [prev] | [next] | [standalone]


#1729206

FromEduardo Valentin <eduval@amazon.com>
Date2017-09-08 21:00 +0200
Message-ID<unwFs-2mq-17@gated-at.bofh.it>
In reply to#1729107
Hello,

On Fri, Sep 08, 2017 at 10:26:45AM -0700, David Miller wrote:
> From: David Woodhouse <dwmw2@infradead.org>
> Date: Fri, 08 Sep 2017 18:23:22 +0100
> 
> > I don't know that anyone's ever tried saying "show me the chapter and
> > verse of the documentation"
> 
> Do you know why I brought this up?  Because the person I am replying
> to told me that the syscall documentation should have suggested this
> or that.
> 
> That's why.

:-) My intention was for sure not to upset anybody.

Just to reiterate, the point of patch is simple, there was a change in behavior in the system call from one kernel version to the other. As I mentioned, I agree that the userspace could use other means to achieve the same, but still the system call behavior has changed.

> 
> So let's concentrate on the other aspects of my reply, ok?

I agree. I would prefer to understand here what is the technical reason not to accept these patches other than "use other system calls".


-- 
All the best,
Eduardo Valentin

[toc] | [prev] | [next] | [standalone]


#1729216

FromEric Dumazet <eric.dumazet@gmail.com>
Date2017-09-08 21:20 +0200
Message-ID<unwYN-2QU-3@gated-at.bofh.it>
In reply to#1729206
On Fri, 2017-09-08 at 11:55 -0700, Eduardo Valentin wrote:
> Hello,
> 
> On Fri, Sep 08, 2017 at 10:26:45AM -0700, David Miller wrote:
> > From: David Woodhouse <dwmw2@infradead.org>
> > Date: Fri, 08 Sep 2017 18:23:22 +0100
> > 
> > > I don't know that anyone's ever tried saying "show me the chapter
> and
> > > verse of the documentation"
> > 
> > Do you know why I brought this up?  Because the person I am replying
> > to told me that the syscall documentation should have suggested this
> > or that.
> > 
> > That's why.
> 
> :-) My intention was for sure not to upset anybody.
> 
> Just to reiterate, the point of patch is simple, there was a change in
> behavior in the system call from one kernel version to the other. As I
> mentioned, I agree that the userspace could use other means to achieve
> the same, but still the system call behavior has changed.
> 
> > 
> > So let's concentrate on the other aspects of my reply, ok?
> 
> I agree. I would prefer to understand here what is the technical
> reason not to accept these patches other than "use other system
> calls".

So if we need to replace all 'legacy' timers to high resolution timer,
because some application was _relying_ on jiffies being kind of precise,
maybe it is better to revert the change done on legacy timers.

Or continue the migration and make them use high res internally.

select() and poll() are the standard way to have precise timeouts,
it is silly we have to maintain a timeout handling in the datagram fast
path.

[toc] | [prev] | [next] | [standalone]


#1729308

FromDavid Miller <davem@davemloft.net>
Date2017-09-08 23:50 +0200
Message-ID<unzjY-4iI-17@gated-at.bofh.it>
In reply to#1729206
From: Eduardo Valentin <eduval@amazon.com>
Date: Fri, 8 Sep 2017 11:55:21 -0700

> I agree. I would prefer to understand here what is the technical
> reason not to accept these patches other than "use other system
> calls".

I explained this, let me reiterate:

====================
And most importantly, letting the kernel have flexibility in this area
is absolutely essential for various forms of optimizations and power
savings.
====================

[toc] | [prev] | [next] | [standalone]


#1729112

FromDavid Woodhouse <dwmw2@infradead.org>
Date2017-09-08 19:30 +0200
Message-ID<unvgl-1Cc-5@gated-at.bofh.it>
In reply to#1729106

[Multipart message — attachments visible in raw view] — view raw

On Fri, 2017-09-08 at 10:16 -0700, David Miller wrote:
> From: Eduardo Valentin <eduval@amazon.com>
> Date: Fri, 8 Sep 2017 10:04:09 -0700
> 
> > 
> > However, this is a clear, the system call, from the net subsystem,
> > has changed in behavior across kernel versions. From application /
> > userspace perspective, changing the system call without clear
> > documentation or deprecation path, to me, looks like breaking
> > userspace, isn't it?
>
> Where is the chapter and verse of the system call documentation that
> guaranteed this level of timer granularity for you?
> 
> Or were you simply relying upon implementation dependent behavior?
> I can't see anything which ever guarateed the granularity of timers
> to the extent upon which you were relying.
> 
> And most importantly, letting the kernel have flexibility in this area
> is absolutely essential for various forms of optimizations and power
> savings.

The rule we normally use, typically enforced very shoutily by Linus, is
that *however* stupid userspace was to rely on something, if they *do*
rely on it then we shouldn't change it.

I don't know that anyone's ever tried saying "show me the chapter and
verse of the documentation" to Linus when he's in full rant mode, as he
tends to get in such discussions. You could try it, I suppose.

I don't think 'HZ==100' was documented per se either, was it? Perhaps
we *could* change that, after all? :)

(Not that I've actually looked at the patch or the userspace in
question yet, mind you. Just commenting on the absurdity of the
response.)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web