From: Ahmad Gani <reyuki@gnuweeb.org>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
"GNU/Weeb Mailing List" <gwml@vger.gnuweeb.org>
Subject: Re: [PATCH gwproxy v0] epoll: Improve log readability and efficiency
Date: Sun, 17 Aug 2025 12:02:37 +0700 [thread overview]
Message-ID: <CAADvAgq2BQCYwgsX=tKkDvt6uZWNX3yVDagW3Qnks-H5r20ykw@mail.gmail.com> (raw)
In-Reply-To: <20250817045739.GA553171-ammarfaizi2@gnuweeb.org>
On Sun, Aug 17, 2025 at 11:57 AM Ammar Faizi wrote:
> On Sun, Aug 17, 2025 at 11:49:13AM +0700, Ahmad Gani wrote:
> > By the way, I wonder why GWP_CONN_FLAG_NO_CLOSE_FD exists? Can you explain
> > the use cases for such a thing to exist?
> >
> > Wouldn't it cause a file descriptor leak too?
>
> I should have explained it better.
>
> GWP_CONN_FLAG_NO_CLOSE_FD is only used from the io_uring case.
>
> __sys_close() is a heavy syscall and better be done asynchronously via
> prep_close() in io_uring context.
>
> GWP_CONN_FLAG_NO_CLOSE_FD allows log_conn_pair_close() to log the fd
> numbers without the obligation to call __sys_close() in free_conn().
>
> Previously, it was confusing to debug when the fd is set to -1 by
> the gwp_free_conn_pair()'s caller.
>
> GWP_CONN_FLAG_NO_CLOSE_FD simply means the fds are no longer owned by gcp.
I see; now it makes sense. Thanks for the explanation!
--
Ahmad Gani
prev parent reply other threads:[~2025-08-17 5:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-17 3:16 [PATCH gwproxy v0] epoll: Improve log readability and efficiency Ahmad Gani
2025-08-17 4:24 ` Alviro Iskandar Setiawan
2025-08-17 4:34 ` Ahmad Gani
2025-08-17 4:37 ` Ammar Faizi
2025-08-17 4:49 ` Ahmad Gani
2025-08-17 4:56 ` Ahmad Gani
2025-08-17 4:57 ` Ammar Faizi
2025-08-17 5:02 ` Ahmad Gani [this message]
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='CAADvAgq2BQCYwgsX=tKkDvt6uZWNX3yVDagW3Qnks-H5r20ykw@mail.gmail.com' \
--to=reyuki@gnuweeb.org \
--cc=alviro.iskandar@gnuweeb.org \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
/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