Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263486AbUKAWip (ORCPT ); Mon, 1 Nov 2004 17:38:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S377810AbUKAWim (ORCPT ); Mon, 1 Nov 2004 17:38:42 -0500 Received: from twinlark.arctic.org ([168.75.98.6]:21907 "EHLO twinlark.arctic.org") by vger.kernel.org with ESMTP id S313147AbUKAUXK (ORCPT ); Mon, 1 Nov 2004 15:23:10 -0500 Date: Mon, 1 Nov 2004 12:23:07 -0800 (PST) From: dean gaudet To: linux-os@analogic.com cc: Linus Torvalds , Andreas Steinmetz , Kernel Mailing List , Richard Henderson , Andi Kleen , Andrew Morton , Jan Hubicka Subject: Re: Semaphore assembly-code bug In-Reply-To: Message-ID: References: <417550FB.8020404@drdos.com> <1098218286.8675.82.camel@mentorng.gurulabs.com> <41757478.4090402@drdos.com> <20041020034524.GD10638@michonline.com> <1098245904.23628.84.camel@krustophenia.net> <1098247307.23628.91.camel@krustophenia.net> <41826A7E.6020801@domdv.de> MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY="1678434306-666545155-1099272700=:19538" Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10873 Lines: 193 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1678434306-666545155-1099272700=:19538 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: On Sun, 31 Oct 2004, linux-os wrote: > Timer overhead = 88 CPU clocks > push 3, pop 3 = 12 CPU clocks > push 3, pop 2 = 12 CPU clocks > push 3, pop 1 = 12 CPU clocks > push 3, pop none using ADD = 8 CPU clocks > push 3, pop none using LEA = 8 CPU clocks > push 3, pop into same register = 12 CPU clocks your microbenchmark makes assumptions about rdtsc which haven't been valid since the days of the 486. rdtsc has serializing aspects and overhead that you can't just eliminate by running it in a tight loop and subtracting out that "overhead". you have to run your inner loops at least a few thousand of times between rdtsc invocations and divide it out to find out the average cost in order to eliminate the problems associated with rdtsc. -dean --1678434306-666545155-1099272700=:19538 Content-Type: APPLICATION/X-GZIP; NAME="test-sp.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="test-sp.tar.gz" H4sIAIabhUEAA+xbDXRcxXV+u293tT+SJVnyD7Vjnn9EpVha7Z9lWTZgWxZC IEtCksHgmmV/3moXVvvEvreyzK+NMCCMixM4KTm4BUpbOKWF0NMGmqSNqQnE bU/qEpJDCBzSnnAQxSGc4Dr0QKreb+a93bcrCZk2cuiJZ8++uXPvnTt37tyZ Nz9vNFnVmtSRZmEeg88X8q1ft45iFkpjBvt9/pA/6F8XWt8i+Px+f4tfkNbN p1JGyKlaJCtJQlZRtE/jm4v+/zRoevtn45oa8w7MSxk+v8/XEgrN1v5+XyCo t7+vZb2f8P5AyBcSJN+8aFMSfsvbf7V7tSRdkkrLbZLuApI5tGfliCbHJX+g 6bItPU0Bai3C9qdiyUg2Lm31SpcpyYyqZNyr3W5vPKJF3OmIqqXbXN60khly +VgyWUh6NXlMc3sj6dRQxtXqcnuH0ko07dJSw0TaOyJLADcncpmYliKpbqZe v6zlshlJS8pSe98OKZZWYjdI8VQiIWflTEyWorK2R5YzkpqLxWRVTY3KUiyS Tqteyk7i2lwjOTWZdtXJ0TG3i9XS7RpWRtOueqZsQ6MEksu1WuqUNQk4Ka3s kaDyHiUbNzMnGXOsmDmZGkqWctfJkbFGSS8A3AMRqJXLksoziq+T40aG5PQM JUWouSivD7SJMG3adc4mphOxRBlLjLHEx7jEYVnak9KSUlTJZpU9bteIMpK3 i0ztImfibvdv2iXPhbMYisd/ZV7KmGv897eESt7/gdC69efG/7MRbu/ovsRi seTTFkEULCb6YT0OsWe94BTsDBqo9B/8AoCDFTZ6Pg5wYhHAhtfO+8ddx/IC vOreYS0SpVjL8jhpQFk5zd4HAntzCN6oqp6x3uczXQXBoadb6S+Z6E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yOiysn58tzslIhW1qI338HACFxiGOq/3biIsRQhtzGhzfE5E4qUK8JB lawsZPhOJLdC7g10m6EC6yyqH52K46QsWVbOFppPTJil5UmM0NiFcQxL5Wiy et05h6xrUejmWG1hslyLFqanT1TrUb08WavCvaAIpdV2YiyP0DF10DeOn48W k1WMU3Bt41YsS9BUZ3n8/1zU/h+dlWEbdHTL/1S09//T/p8jo4f8/p8HId3y P32V/FX5n3bCG1hP17Zjsx2isVvND6VikWrYj/bPWeXqleGAcPfzXGbtqHov Cjfv093q8ZgC1hu2+G4xhZ8CutZor9pn1C6mgLG5l9u010nuzPuUYsxrBDJK oD7DPE84qn/MYhyF77UYR81DFuMot2QxxpHKFidPuuTZIB9K5LjJSdNjjZ6B XrZRuP/fjgyw3fx/6fBh5f9LR/Kj0v/n/f7PByIZkJG4JdOtpik7a0Z+NV+R GUEzGfkNdVOoquNl67gJx/jan5Yn68yi+HFyuHzhznyj9JpNiTvSlAE2LWHY ygErTSjeuwmNZnM1PVgafqEVr6X/qxlF24yibYZ0T1u1YoxZ0U51wVZd4Krz W1VdKCrdXGHeVph3Lzn633vXCCetpgvFIVT4Ulu12K5Wi+D8n+jve9PXVLpb tZOpY5FrIVQ0FgI4F8anyPXixYsXL168ePHixYsXL168ePHixYsXL168ePHy MMu/HnKCxAB4AAA= --1678434306-666545155-1099272700=:19538-- - 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/