Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 18 Oct 2002 14:58:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 18 Oct 2002 14:57:32 -0400 Received: from e34.co.us.ibm.com ([32.97.110.132]:16638 "EHLO e34.co.us.ibm.com") by vger.kernel.org with ESMTP id ; Fri, 18 Oct 2002 14:56:37 -0400 Subject: [RFC] vsyscall_A0 LD_PRELOAD implementation From: john stultz To: Linus Torvalds , andrea Cc: Michael Hohnbaum , "Martin J. Bligh" , george anzinger , lkml , ak@muc.de In-Reply-To: <1034915132.1681.144.camel@cog> References: <1034915132.1681.144.camel@cog> Content-Type: multipart/mixed; boundary="=-RQVzvqqFIUg9+1c7vtnW" X-Mailer: Ximian Evolution 1.0.8 Date: 18 Oct 2002 11:54:01 -0700 Message-Id: <1034967241.4048.9.camel@cog> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2165 Lines: 52 --=-RQVzvqqFIUg9+1c7vtnW Content-Type: text/plain Content-Transfer-Encoding: 7bit Here's an example use of the vsyscall via LD_PRELOAD. Attached is an example library that can be LD_PRELOADED to alias glib's gettimeofday function w/ the vsyscall implementation. I've also included a quick performance test to give a rough idea of the savings this gives. Example run on a SMP P4 box: [jstultz@elm3b52 vsyscall_test]$ ./run.sh Normal gettimeofday gettimeofday ( 1391621us / 1000000runs ) = 1.391620us vsyscall LD_PRELOAD gettimeofday gettimeofday ( 286567us / 1000000runs ) = 0.286567us So it looks like a pretty big win. thanks -john --=-RQVzvqqFIUg9+1c7vtnW Content-Disposition: attachment; filename=vsyscall_test.tar.gz Content-Type: application/x-gzip; name=vsyscall_test.tar.gz Content-Transfer-Encoding: base64 H4sIAB2rrz0AA+2X3W/aMBDAeSV/xYmqU8JHcCAh0iiTpnYPlSitOqG9TEJZYiCbSVDioNFp//vO CQkERCtNtFU3/x4S+e58/rj4zlnF69h1GJtwGvN25VkgxCS2beHbMCzD3HkXVIhtWV27Yxk9lBsm MewKWM8znTJJzJ0IoPI95gnjD0ftntK/UVal+Oct3T3lGMQgpNczj8a/Y9t5/LuG3UX7HumYFSCn nMQx/vP4n/mByxKPwkXMPT/U5x+Ukoj534RMWYW+B2pdfCCaGvMocTlwf0FXDqs3YU+gwQBU0aOu kZ9ThGKUx8P+xs2McmEZTj1nve8L+AoO/AF/0JRfSjUfn6+aKOkrv5XX3r43T/n83zg/6NRn9LRj PHX+u0Y3P/+mSUT+t0zTkuf/JcDQv1eqM9eF1vTu+hJakbcOnIWP7Rm08PkFLWBbFza28dyJqAeo Zq04xA60WdjEoW5AK4SSQCcoLCQhtBh6YR7L/M146LXEF6i7omfRVBSXUSfAGUYLqOs7mkPvMhf8 DeXzvxOHE46Rnn/z6Pk3jG6vqP+2TdL6b3fk+X8JHq//67gtanB6AzjzsDQEFEbjm8n9ePQZjCx8 heLm+vL+tpAqfsBh4fiBmpbuckUHselc1Plw2QQU9JWqsPfxnQSxPwswubAwmGUPjzLuoGrKQofD kkYuDTi2txZ8scR26WLxbjPGaDwcaqJzGKn+gPTBh4tiEdhqNDSlutcVZ7TtuO9VTHmjE+sKlzpf TWKKmWuQrWvT7m+1yb46yfTpwsRl6XDR2o7nera1OM1q41HbzK1S3WyR8JzumZYO1FbzZTcMsbBl hHs+VWu7CwQVzhlLkhjacO5HOBaI29z5NIm/BrWmmEPqq1lsYTMPCLoEJKI8iQIg8nr2Fijnf4y3 Hs9PPYbI/4/9/xuY7PP/f2LZ4v6HFUDm/5eAuvMQaqMwWmBW3k0ENUXfXgeUzCz/WGB4Nbm7/zS8 /Xi112erGOjtwwvgrsvXXrlEIpFIJBKJRCKRSCQSiUQikfzb/AGCgp9CACgAAA== --=-RQVzvqqFIUg9+1c7vtnW-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/