From owner-freebsd-current@FreeBSD.ORG Tue Oct 26 19:58:21 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFDA71065670 for ; Tue, 26 Oct 2010 19:58:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 24D0F8FC12 for ; Tue, 26 Oct 2010 19:58:20 +0000 (UTC) Received: by fxm17 with SMTP id 17so4502270fxm.13 for ; Tue, 26 Oct 2010 12:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=+39SDKZj+XBm00WDZdvwxRdB2EHvdKe1a04TzeKRPs0=; b=teOG24ZzLbj6XI1hp/g/L4Wh2EbU4Fi2MOqqjHaFt0PZWoNSREGThy8IoN/C2gmTgC DszP9KgGK3HNIxG1bB4dnadaI6mWAdKA5e657ZpbJpVuSQnBursRzm1lDy1SwNUEMKP0 jmhiJgbhxBzHy2HrEVDxuX3m/2gdyd49krSx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=U7pmVW22pXiOjDpxfK4OXqOTjYWVuuYjqFGKcAk1Cz3kGQS7MsFGdhjeQm8DgpRK/r 7l830KLrfzRlg9vuOtThHBkpPt0AYLQ5wXpCU/FLk91gp/6ZY2T7/QQeLytWxMWzLfp+ Ps3jyVZeUUXtoGplw7Mt7jPAO6Ywl4LgJi0GY= Received: by 10.223.97.69 with SMTP id k5mr100873fan.67.1288123100051; Tue, 26 Oct 2010 12:58:20 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (95-109-148-112.dialup.umc.net.ua [95.109.148.112]) by mx.google.com with ESMTPS id l23sm546154fam.19.2010.10.26.12.58.12 (version=SSLv3 cipher=RC4-MD5); Tue, 26 Oct 2010 12:58:18 -0700 (PDT) Sender: Alexander Motin Message-ID: <4CC732C7.50409@FreeBSD.org> Date: Tue, 26 Oct 2010 22:57:59 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Takanori Watanabe References: <201010261904.o9QJ4iwq089834@sana.init-main.com> In-Reply-To: <201010261904.o9QJ4iwq089834@sana.init-main.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org, current@freebsd.org, hselasky@c2i.net Subject: Re: Event based scheduling and USB. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 19:58:21 -0000 Takanori Watanabe wrote: > I updated my FreeBSD tree on laptop, to the current > as of 18 Oct.2010, it works fine with CPU C3 state enabled, > > I think this is your achievement of event time scheduler, > thanks! > > But when USB driver is enabled, the load average is considerablly > high (0.6 to 1.0) if sysctl oid kern.eventtimer.periodic is set to 0. > Then kern.eventtimer.periodic is set to 1, the load average goes > to 0 quickly as before, but almost never transit to C3. > > Is this behavior expected, or something wrong? > I noticed one of usb host controller device shares HPET irq. > When I implement interrupt filter in uhci driver, the load average > goes to 0 as before. > > > ==== > % vmstat -i > interrupt total rate > irq1: atkbd0 398 2 > irq9: acpi0 408 2 > irq12: psm0 3 0 > irq19: ehci1 37 0 > irq20: hpet0 uhci0 35970 230 > irq22: ehci0 2 0 > irq256: em0 4 0 > irq257: ahci0 1692 10 > Total 38514 246 > === I haven't noticed that issue and it is surely not expected for me. I will try to reproduce it. Most likely you should be able to avoid interrupt sharing using some additional HPET options, described at hpet(4). > BTW, when USB port is enabled C3 transition rate gets lower. > I think it is likely to occur. But how can I supress power > consumption? I can't say about USB, but you may try this patch to optimize some other subsystems: http://people.freebsd.org/~mav/tm6292_idle.patch > It's time to implement powertop for freebsd, isn't it? Surely it is. I was even thinking about possibility to port one from OpenSolaris, but other work distracted me. You may take it, it you wish. -- Alexander Motin