From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 26 10:40:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C5F216A41A; Sat, 26 Jan 2008 10:40:52 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 8F73513C43E; Sat, 26 Jan 2008 10:40:51 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 038E41B10EDC; Sat, 26 Jan 2008 11:40:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 Received: from hater.haters.org (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 269CF1B10C26; Sat, 26 Jan 2008 11:40:47 +0100 (CET) Message-ID: <479B0E2E.8070309@moneybookers.com> Date: Sat, 26 Jan 2008 12:40:46 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: Kris Kennaway References: <4795CC13.7080601@moneybookers.com> <868x2i3v8d.fsf@ds4.des.no> <864pd63v2h.fsf@ds4.des.no> <4795FE54.9090606@moneybookers.com> <86lk6i0vzk.fsf@ds4.des.no> <479605E2.6070709@moneybookers.com> <479621BE.2060907@FreeBSD.org> <4796357B.9020508@moneybookers.com> <47963911.4000002@FreeBSD.org> <84dead720801252234v1e7a8856g339faa02c1250bbf@mail.gmail.com> <479B06BC.7030603@FreeBSD.org> In-Reply-To: <479B06BC.7030603@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5561/Sat Jan 26 09:04:18 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: =?UTF-8?B?RGFnLUVybGluZyBTbcO4?=, =?UTF-8?B?cmdyYXY=?= , freebsd-hackers@freebsd.org Subject: Re: gettimeofday() in hping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2008 10:40:52 -0000 Greetings, Kris Kennaway wrote: > Joseph Koshy wrote: >>> OK, this is the famous problem with modern CPUs that jkoshy has >>> declined >>> to work around :( There are patches for this in perforce, see >>> >>> http://perforce.freebsd.org/changeView.cgi?CH=126189 >> >> "Famous problem" indeed :). I declined the patch because it >> is incorrect and incomplete. > >> I will accept a patch that demonstrates clue about the >> workings of the overall system---the changes in the patch >> should be safe, complete, should demonstrate that the submitter >> has read and understood vendor documentation, should preserve >> user experience for naming events, and each supported PMC event >> needs to be documented in pmc.3. > > I am aware of these issues but repeat my statement that the lack of > working pmc on modern CPUs is causing serious difficulties for our > developer and user base, as witnessed again in this thread. > > Kris Kris do you think the information, that I send you (private email) is useful ? :) Also using hwpmc with your patch shows a serious problem with pf and dynamic rules. I have desktop PC at home where hwpmc work out of the box, but I'm running 6.3 on it. If the information that I send you is not useful, I can spend my weekend upgrading my desktop PC to RELENG_7_0 and providing new pmc stats, but I have to be sure that developers are interested in fixing those issues. I'm willing to invest my time in this, but my skills are not enough to solve the issues alone, and without help I'll just waste my time. How hping works is not my biggest problem - for me as I said on few other mail list the real showstopper is pf and it's keep-state feature. The interesting part is that both problems point to kernel spending most of it's time in _mtx_lock_sleep(): pmcstat - pf - during syn flood: % cumulative self self total time seconds seconds calls ms/call ms/call name 24.0 268416.00 268416.00 0 100.00% _mtx_lock_sleep [1] 6.7 343572.50 75156.50 0 100.00% pf_state_compare_ext_gwy [2] 6.7 418405.50 74833.00 0 100.00% pf_src_compare [3] 3.9 462298.50 43893.00 0 100.00% pf_state_compare_lan_ext [4] 3.6 503019.50 40721.00 0 100.00% pf_test [5] pmcstat - hping: % cumulative self self total time seconds seconds calls ms/call ms/call name 8.6 116120.00 116120.00 0 100.00% _mtx_lock_sleep [1] 5.5 190764.00 74644.00 0 100.00% syscall [2] 3.0 231390.00 40626.00 0 100.00% bpf_mtap [3] 2.9 270334.00 38944.00 0 100.00% Xfast_syscall [4] 2.5 304458.00 34124.00 0 100.00% bus_dmamap_load_mbuf_sg [5] 2.3 335825.00 31367.00 0 100.00% uma_zalloc_arg [6] P.S. my desktop PC i single core, but I think I'll find old server with 2x intel p4 CPUs. -- Best Wishes, Stefan Lambrev ICQ# 24134177