From owner-freebsd-arch@FreeBSD.ORG Fri Jun 29 08:53:08 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0993E16A47D for ; Fri, 29 Jun 2007 08:53:08 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id C00C613C45A for ; Fri, 29 Jun 2007 08:53:07 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id B159420B0; Fri, 29 Jun 2007 10:53:03 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id A44C320AF; Fri, 29 Jun 2007 10:53:03 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 64E195F68; Fri, 29 Jun 2007 10:53:03 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jeff Roberson References: <20070628123314.W552@10.0.0.1> Date: Fri, 29 Jun 2007 10:53:03 +0200 In-Reply-To: <20070628123314.W552@10.0.0.1> (Jeff Roberson's message of "Thu\, 28 Jun 2007 12\:41\:15 -0700 \(PDT\)") Message-ID: <86ejjvyweo.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: Add wakeup_with() before 7.0? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2007 08:53:08 -0000 Jeff Roberson writes: > This allows wakeup callers to hint the scheduler about various > information. WAKEUP_LOCAL would allow us to prefer affinity for the > waking cpu. I have patches to use this in pipe code and socket buffer > code that improve performance in some workloads. WAKEUP_TAIL could be > used for accept() which I have heard can significantly improve > webserver performance. Yes, for accept() and other situations where the sleepers are otherwise equivalent (i.e. you don't care *who* is woken up as long as *somebody* is woken up), picking the most recent entry on the sleep queue (the entry which is most likely to still be in cache, or at least not paged out) will greatly reduce cache and VM thrashing. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no