From nobody Sun Jun 14 14:49:43 2026 X-Original-To: dev-commits-src-all@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 4gdbkg1yJKz6gq6l; Sun, 14 Jun 2026 14:49:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gdbkg1SZbz3jhZ; Sun, 14 Jun 2026 14:49:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781448587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R5BkbEo4RjydM9wfkK8zmY2CTr7WYO/qY4orS0WV20g=; b=HNakyIKb/WSYznJe09suFtDXUgIPraxfWlTfUhqqPT1kwSQSTdqrZsmTDvIWisrtk4q+sf cit3WVk1+kaZr/ChMQxFCQ5aG0iUou6ADrLPN4YLlzECBTv1Syfy5+vtgOQ+spMwVtChfh f3PKyHYuA8rYU1T41gmPjIko1sSu6f+WOr4PXbroNxB7INSQDGIS9IcfzP16Vvo3G760Sl ZImZR5L4xnYfY8+nnTJ1zgQ/FTVsQZwfPPnoocEDDwD9X80pPqbaIcDVpSmHw2omTHrVRo h9uws9cg7prvNOBLqbH7NaOQCFfVhXsYx5+KgJsZT4YUVQGtRmsgswokv06M/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781448587; a=rsa-sha256; cv=none; b=ul1DFWOuRTKQLdwl6GPhCWsXo6W4biPKwxONCalJot6P8tymTBSj/c4mmVCHemH/zgOhMV il5kFhaZm1WjF/GbPLBYqJiJ5YQLBwllpNpVk5hfFbwLaleXGGLOrznBkoqwlMQTT38g6e kGy+oZXbCfl4w/nGpZDDJrSX9PRG958Ppe+81k+oY3PMx5/C+PlAU31lqf8zpWnJDLOl8T gzX+iYleyry2IGYrA6sRsSBQiRgdjDQxrHdUUpdKnGiK4cey7y1vTafhDzI1Xy4p9eriv/ UiALR6ugi7OizGcyyezQRrJY90F4MCWOyPli6SpyY6w36tntno5u3FhIa0/Icg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781448587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R5BkbEo4RjydM9wfkK8zmY2CTr7WYO/qY4orS0WV20g=; b=BUODDY9sEYKCDiiPcMe1Hrvt4qA8tp7KUFJEk+6LMnCNSpGVzE6C4b39w7fCDkeU+dILph zCKE9kuuuuWExHuXKyUYO35X7SGCsGo385UbUrpekuC0YYK9jL/qEGXdJJyhzUmaPDpBYD ZVyrTi9g2QCg8X5iMEAvT6IJfVyUtZ2P8chmIlBygSagVNszFsVcNWLph1WBAkuxbh4OTQ 6X20aA0LYIVD9PsJ1CGaw/+jBsw6aQUEUMP16B2j7hGOEZJ0lT6gfOo51M8N/uzJ6S8lbM bFjd5yRzOh/InwV5TJgXI6vXCiEK+klf0M+jJGxeJMZoHsV41RUe0hT/CWYNlw== Received: from b.nours.eu (b.nours.eu [IPv6:2001:41d0:303:5e39::1]) (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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gdbkg02f7z1MJq; Sun, 14 Jun 2026 14:49:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by b.nours.eu (Postfix, from userid 1001) id EAEF169DC3; Sun, 14 Jun 2026 16:49:43 +0200 (CEST) Date: Sun, 14 Jun 2026 16:49:43 +0200 From: Baptiste Daroussin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ffe47c424e0a - main - grep: periodic timer-based fflush instead of unconditional per-line flush Message-ID: References: <6a2eba3d.37a89.6e8ac4b2@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a2eba3d.37a89.6e8ac4b2@gitrepo.freebsd.org> On Sun 14 Jun 14:27, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ffe47c424e0a45f5d8d20a5944477821bd946eef > > commit ffe47c424e0a45f5d8d20a5944477821bd946eef > Author: Baptiste Daroussin > AuthorDate: 2026-06-12 12:13:35 +0000 > Commit: Baptiste Daroussin > CommitDate: 2026-06-14 14:26:30 +0000 > > grep: periodic timer-based fflush instead of unconditional per-line flush > > Replace the unconditional fflush(stdout) in grep_printline and > procmatches with a periodic timer that flushes at most once every > 100ms. This preserves interactive responsiveness (grep | tee, > grep | tail -f) while avoiding 1M+ write(2) syscalls when > processing large inputs. > > The flush interval is tracked via clock_gettime(CLOCK_MONOTONIC) > and a static timespec. --line-buffered continues to flush > immediately via setlinebuf(3), as before. > > Benchmark on 1M lines (37MB output to file): > unconditional fflush: 1.90s (sys 1.22s) > periodic 100ms timer: 0.49s (sys 0.007s) > > Reviewed by: kevans > Differential Revision: https://reviews.freebsd.org/D57528 The actuall review is: https://reviews.freebsd.org/D57563 Best regards Bapt