From nobody Mon Aug 09 08:54:11 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EB2EF174D2F6 for ; Mon, 9 Aug 2021 08:54:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GjqdH66YXz3k3k for ; Mon, 9 Aug 2021 08:54:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA6752515B for ; Mon, 9 Aug 2021 08:54:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1798sBWx035289 for ; Mon, 9 Aug 2021 08:54:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1798sBcY035288 for bugs@FreeBSD.org; Mon, 9 Aug 2021 08:54:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 256952] kqueue(2): Improve epoll Linux compatibility (compat/linux/linux_event) Date: Mon, 09 Aug 2021 08:54:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: feature, needs-qa, standards X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vico13.chen@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? maintainer-feedback? mfc-stable13? mfc-stable12? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256952 --- Comment #5 from Vico --- Comment on attachment 227028 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227028 note_hup.patch Hi Vladimir, I have several questions: 1. For 'LINUX_EPOLL_EVRD', it is defined only as =E2=80=9CLINUX_EPOLLIN|LINUX_EPOLLRDNORM". If the user call epoll with only "EPOLLRDHUP", then filter will be no actions. 2. The Linux behavior for Linux are: a.If both sender and receiver are shutdown, Linux reports 'EPOLLHUP | EPOLLRDHUP | EPOLLRDNORM | EPOLLIN' b.If only receiver is shutdown, Linux reports 'EPOLLRDHUP | EPOLLRDNORM= | EPOLLIN'. c. For EPOLL error, Linux reports it with other epoll events but not re= port epoll error only once error detected. d. LINUX_EPOLLERR and LINUX_EPOLLHUP are always in EPOLL mask. For this patch, based on Linux behavior a) and b), EPOLLRDNORM is missed for socket.=20 3. No masks for this patch. For example, if the applications only request EPOLLHUP, but EPOLLIN is detected, the applicaiton will be waken up and cat= ch EPOLLIN. It is better to design a generic framework to handle all cases to match Lin= ux behavior. And let each module to handle its own EPOLL events, for example, socket knows its own epoll behavior, and pipe knows its own epoll behavior,= and epoll_to_kevent is a generic handling. Please refer https://reviews.freebsd.org/D31037, as someone has concerns to introduce pevent and pmask in kevent structure. Coudl you please help clari= fy the issue? --=20 You are receiving this mail because: You are the assignee for the bug.=