From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1755406995; bh=9NOA+yAvf8EI3vfDwkMinAi2sVRUUAIckOdgn/2hpbE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=CMBWefnv7y38LUfrWDschJCkdG+k5xRl/GeZIMWVTGZWuczvaRYE+Gokep6pwocHA RTZ98a9f/4wlYRaOlU0EBuA5uNnH+cijZSRm89ZUuDrA8eaA5hkQIB2qgtJl9+PXN1 TQcchQu+pPxllnKTsOqGsfH70fsXp8HpnFdPID8DjO8q2OxEoog9TMsNPYrWCKF4CC PDaJc8ASbOkZlOnEttXPpQODYt3LwH6Pkg9Ye7Q/OwAxA0SYhLo1IS475ycg3bLAXp 6WGXBFWk397GDlFS6rningg+zPyDZD16NHatFAEz/wR+E1TTVuHy1JOwSSsb4sNdys xY9QcUdsgmOlQ== Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 263703127EA9 for ; Sun, 17 Aug 2025 05:03:15 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-333f8f0965dso26225661fa.1 for ; Sat, 16 Aug 2025 22:03:15 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWcquvYRt6BtLUZeESqp+Lz7z8zRtHLGEhZQ/fD/HeBpxVIFOHo6DlfEPq8iQUEbT5ql06t@vger.gnuweeb.org X-Gm-Message-State: AOJu0Yw46yz5FjRU9o6J48qdqoiMHP63jSU9qOOrtpWoAGO49z9YZMwM ypSajfjtlQTFDuk6I3u/2Ia6+vkDNX7o1BqcRXn+SeEOmZ2InyoqG8UaLxdEd47VJwSmtuigRjw ZUkCy4tfo6cC+NED3kbCOEYKdbgUuInw= X-Google-Smtp-Source: AGHT+IH88WcQdkvazBgMCQDOeuKcFSnyjLFy8XXX/gTOUYagWhGiGjpextyWVBdbuyL0TF5iewNa99WY1LFM/I27pWo= X-Received: by 2002:a05:651c:1117:20b0:332:1de5:c51a with SMTP id 38308e7fff4ca-3340996e76cmr15087121fa.36.1755406994514; Sat, 16 Aug 2025 22:03:14 -0700 (PDT) MIME-Version: 1.0 References: <20250817031621.81090-1-reyuki@gnuweeb.org> <20250817043750.GA545393-ammarfaizi2@gnuweeb.org> <20250817045739.GA553171-ammarfaizi2@gnuweeb.org> In-Reply-To: <20250817045739.GA553171-ammarfaizi2@gnuweeb.org> From: Ahmad Gani Date: Sun, 17 Aug 2025 12:02:37 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXwjCRg9TL_iJO62wapGns0XmiMrrgaW4a7miHOFxRm_c7T_wP0etCxnzN4 Message-ID: Subject: Re: [PATCH gwproxy v0] epoll: Improve log readability and efficiency To: Ammar Faizi Cc: Alviro Iskandar Setiawan , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: On Sun, Aug 17, 2025 at 11:57=E2=80=AFAM 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 expl= ain > > 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