From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22862 invoked from network); 20 Oct 2022 16:05:11 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2022 16:05:11 -0000 Received: from ftrv.se ([45.76.35.157]) by 9front; Thu Oct 20 12:03:52 -0400 2022 Message-ID: <26B1535D9EE1F3549FAB661259CC3845@ftrv.se> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ftrv.se; s=mail; t=1666281829; bh=QbSZ4Cha4dhrDMhn0rokyLLW2wxPpYO3bFFLu+/krr8=; h=To:Subject:Date:From:In-Reply-To; b=kK4PoJzXvZhx4BgT4HPlmhTnnaI8dunlECTAJG9CMdnoMYN8R+61o3azYgV552jAx SnsTxmY11DC446zlHnZx9AK7rrh+EqHkDAqvsDUA3Dad/mhf404o88RKk2nxra05hq 1PsK39XUWZz6Ce5fvSE5YGSYPY74pSvNg7szgGl0= To: 9front@9front.org Date: Thu, 20 Oct 2022 18:03:47 +0200 From: =?UTF-8?B?U2lncmlkIFNvbHZlaWcgSGFmbMOtbnVkw7N0dGly?= In-Reply-To: <85db2d6b-e60a-4236-9a2c-5b0b77ef99f6@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: non-blocking pipelining-aware STM scripting software Subject: Re: [9front] Speeding up snoopy(8) Reply-To: 9front@9front.org Precedence: bulk Quoth David Arroyo : > I will experiment with putting the pwrite in a separate thread, and > look for small performance improvements in the other functions. I > am not sure why nsec() time is so high, but I think that's a function > that could perform very differently on real vs virtual hardware, so > I'm hesitant to try to improve it until I get 9front running on a > real machine. nsec() is a function that results in a syscall. It is also affected by time adjustments, to my knowledge. At some point I replaced nsec() call with a (somewhat dirty) nanosec() in vmx, see /sys/src/cmd/vmx/nanosec.c It would be nice to have a way to get monotonic timestamps in userspace without having to go into the kernel. For now, you can try nanosec and see if anything changes.