From owner-freebsd-threads@FreeBSD.ORG Tue Oct 2 12:52:41 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C3E16A494 for ; Tue, 2 Oct 2007 12:52:41 +0000 (UTC) (envelope-from sa2c@sa2c.net) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 3A99C13C469 for ; Tue, 2 Oct 2007 12:52:40 +0000 (UTC) (envelope-from sa2c@sa2c.net) Received: by an-out-0708.google.com with SMTP id c14so841116anc for ; Tue, 02 Oct 2007 05:52:40 -0700 (PDT) Received: by 10.114.202.15 with SMTP id z15mr2233772waf.1191329558918; Tue, 02 Oct 2007 05:52:38 -0700 (PDT) Received: from ?192.168.1.3? ( [125.192.93.82]) by mx.google.com with ESMTPS id c36sm9422327rvf.2007.10.02.05.52.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 02 Oct 2007 05:52:37 -0700 (PDT) Message-ID: <47023F11.7000604@sa2c.net> Date: Tue, 02 Oct 2007 21:52:33 +0900 From: NIIMI Satoshi MIME-Version: 1.0 To: Jeff Roberson References: <46FD4B09.20006@sa2c.net> <20071002011337.Q6669@10.0.0.1> In-Reply-To: <20071002011337.Q6669@10.0.0.1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-threads@freebsd.org Subject: Re: sched_yield() is very slow when other threads are busy on FreeBSD-current X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 12:52:41 -0000 Hi, Jeff Roberson wrote: > Can you please try the enclosed patch and tell me if it addresses your > problem? I've tested with SCHED_4BSD and SCHED_ULE. 7-CURRENT, SCHED_4BSD, HZ=100: 81.14 real 80.32 user 0.00 sys 80.85 real 80.03 user 0.00 sys 82.37 real 81.54 user 0.00 sys 7-CURRENT, SCHED_4BSD, HZ=1000: 3.06 real 2.84 user 0.00 sys 3.08 real 2.87 user 0.00 sys 3.00 real 2.80 user 0.01 sys 7-CURRENT, SCHED_ULE, HZ=100: 9.03 real 8.93 user 0.00 sys 1.68 real 1.67 user 0.00 sys 9.13 real 9.04 user 0.00 sys 7-CURRENT, SCHED_ULE, HZ=1000: 4.49 real 4.38 user 0.00 sys 4.57 real 4.48 user 0.00 sys 4.78 real 4.67 user 0.01 sys 6.2-RELEASE, SCHED_4BSD, HZ=100: 0.55 real 0.55 user 0.00 sys 0.54 real 0.54 user 0.00 sys 0.60 real 0.60 user 0.00 sys 6.2-RELEASE, SCHED_4BSD, HZ=1000: 0.29 real 0.29 user 0.00 sys 0.27 real 0.26 user 0.00 sys 0.28 real 0.28 user 0.00 sys I picked up 3 medians of 5 tests since durations are not stable on SCHED_ULE. SCHED_ULE is much faster than before, but still slower than 6.2-RELEASE. SCHED_4BSD is still very slow with small HZ. Thanks, -- NIIMI Satoshi