From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7BC12D48B5 for ; Wed, 19 Jun 2024 23:41:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1718840484; bh=J7+J3ciTVMWmwtMyjBytnBV6ZXrCgdX04qbEnzvHQdA=; h=From:To:Subject:Date:From; b=viz8A+8ZRHtaLIDq1k6hMq7UOGwYx6XPu0BJlKY1T1c168a68X/u1na+lhdFasEWg t+SFXbPNuKkNo/XTEptW47D4bv3MRhppm3E/DgaCt/pADQA+XrQ+Xr58niXw9VC33O N9oxzXBmf6RxRYYJLwBAjseuKVBsXjCeiMyv69Qo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/5] use sendmsg|writev to reduce syscalls Date: Wed, 19 Jun 2024 23:40:59 +0000 Message-ID: <20240619234104.80183-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: First two are overdue cleanups, the rest introduce iovec support to allow combining more send/write calls together in order to reduce syscall (and Perl subroutine dispatch) overhead. It's much more pleasant to read strace output, now. Eric Wong (5): ds: remove needless O_APPEND import ds: update indentation to match rest of source use sendmsg w/ MSG_MORE to reduce syscalls http: set Content-Length for simple array responses http: use writev for known Content-Length responses MANIFEST | 1 + devel/sysdefs-list | 1 + lib/PublicInbox/Compat.pm | 4 +- lib/PublicInbox/DS.pm | 407 +++++++++++++++++++---------------- lib/PublicInbox/DSdeflate.pm | 11 +- lib/PublicInbox/HTTP.pm | 31 +-- lib/PublicInbox/IMAP.pm | 14 +- lib/PublicInbox/Syscall.pm | 66 +++++- t/syscall.t | 20 ++ 9 files changed, 328 insertions(+), 227 deletions(-) create mode 100644 t/syscall.t