[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj1V4wQBPUuhWRwmQ7Nfp2WJrH=yAv-v0sP-jXBKGoPdw@mail.gmail.com>
Date: Tue, 4 Mar 2025 08:12:14 -1000
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Mateusz Guzik <mjguzik@...il.com>, brauner@...nel.org, mingo@...hat.com,
peterz@...radead.org, rostedt@...dmis.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: pipes && EPOLLET, again
On Tue, 4 Mar 2025 at 05:45, Oleg Nesterov <oleg@...hat.com> wrote:
>
> Linus,
>
> On 03/04, Oleg Nesterov wrote:
> >
> > and we need to cleanup the poll_usage
> > logic first.
>
> We have already discussed this before, I'll probably do this later,
> but lets forget it for now.
>
> Don't we need the trivial one-liner below anyway?
See this email of mine:
https://lore.kernel.org/all/CAHk-=wiCRwRFi0kGwd_Uv+Xv4HOB-ivHyUp9it6CNSmrKT4gOA@mail.gmail.com/
and the last paragraph in particular.
The whole "poll_usage" thing is a kernel *hack* to deal with broken
user space that expected garbage semantics that aren't real, and were
never real.
They were a random implementation detail, and they were *wrong*.
But because we have a strict "we don't break user space", we
introduced that completely bogus hack to say "ok, we'll send these
completely wrong extraneous events despite the fact that nothing has
changed, because some broken user space program was written to expect
them".
> I am not saying this is a bug, but please consider
That program is buggy, and we're not adding new hacks for new bugs.
If you ask for an edge-triggered EPOLL event, you get an *edge*
triggered EPOLL event. And there is no edge - the pipe was already
readable, no edge anywhere in sight.
So to clarify: we added the hack to work around *existing* user space
bugs that happened to work before.
If anything, we might consider removing the crazy "poll_usage" hack in
the (probably futile) hope that user space has been fixed.
But we're not encouraging *new* bugs.
Linus
Powered by blists - more mailing lists