From owner-freebsd-mobile@FreeBSD.ORG Mon Jun 17 19:20:05 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 35C17613; Mon, 17 Jun 2013 19:20:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x22d.google.com (mail-qa0-x22d.google.com [IPv6:2607:f8b0:400d:c00::22d]) by mx1.freebsd.org (Postfix) with ESMTP id E32181A25; Mon, 17 Jun 2013 19:20:04 +0000 (UTC) Received: by mail-qa0-f45.google.com with SMTP id ci6so1687936qab.18 for ; Mon, 17 Jun 2013 12:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=pxRIarUDvAXiWVhHVRzbpTIPZtZ0uXkPaWU3Oy8l80M=; b=lBKVRxiSyBC/L3tSttsJrtWc+CrC0yqUd36s2Xac16FbogV/emWohFGSF5smn+74dR WI18/iIHoRvCZTID2OGufaiS5gRH1UHlmnt4/TPnI2GjOCX3F9j38nXHJW0GcC2yQYvD gRm0yAG5i768ZMnTs1VByLNUKeNQDxwwdW6vB63gOqNLfUmrt1o9YpWmxjGgMTNWhAna yQM3UAy5tzIeGTc05TXbe74W7d0dINbDDu4lVYVMls0JqF861weKQenyKot1nmjvSqZn kzgOR7CyFYW7yZOiUZa6DFVJh5eI2hmYtdDYauaxvBDZ3NQf/olmQP3EGZNHPO5rf0t1 z5zA== MIME-Version: 1.0 X-Received: by 10.229.112.6 with SMTP id u6mr7167855qcp.47.1371496804475; Mon, 17 Jun 2013 12:20:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Mon, 17 Jun 2013 12:20:04 -0700 (PDT) Date: Mon, 17 Jun 2013 12:20:04 -0700 X-Google-Sender-Auth: XdHl3wEWmaNfUPmFhJhPgj7921k Message-ID: Subject: T400 suspend/resume quirk - USB ports stay powered down From: Adrian Chadd To: freebsd-usb@freebsd.org, freebsd-mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 19:20:05 -0000 Hi, The one annoyance with my Thinkpad T400 is that the USB ports stay powered down upon resume. this is on a very recent -9 (as of a few days ago.) What kind of debugging information would help people chase down what this particular issue is? Thanks! adrian From owner-freebsd-mobile@FreeBSD.ORG Thu Jun 20 23:45:50 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 23741EB0; Thu, 20 Jun 2013 23:45:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) by mx1.freebsd.org (Postfix) with ESMTP id BAA881D06; Thu, 20 Jun 2013 23:45:49 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id u12so4130126qcx.40 for ; Thu, 20 Jun 2013 16:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=LcvjrjXbhLn3R5sXsLXN/JhjGxs/alwhsjaDJ4KvZLk=; b=0gG73WeLQHO3NmZd8oBRQWZEL8GBTUQlXNt1ZaJmBmUCOmSc+J39qU2EZBd0ZUFhSZ QID4ZCcfK8kgJlOq/ScByvzjf2+Dy4oHfCLr00AQdU35tausRt5HXhVf0duwUen/EVrA /N6PtgnvXEguvtrFXxqInEfvDCXXZ3sdIxf4S2Al5n/5vPxxIfP2K0ToVz0//JbSLZW6 iFW2C+odRhLUE3Ep5uA1Mk0ML8wscvt82u/GLr7dTJwG69vOwFFlHNPhWGmv2L47OYFB u0NiU2zfHz4iuceMj2gyIdORzep+TC6z4ObOo4OR2wQ3PrVvHtFZDQR51eUUedJ0KZx1 RG6A== MIME-Version: 1.0 X-Received: by 10.229.204.131 with SMTP id fm3mr583400qcb.15.1371771949298; Thu, 20 Jun 2013 16:45:49 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Thu, 20 Jun 2013 16:45:49 -0700 (PDT) Date: Thu, 20 Jun 2013 16:45:49 -0700 X-Google-Sender-Auth: nHcwnst0iIEi-cwkwWwp_bT4ibc Message-ID: Subject: Atom N450 + C3 + HPET == bad timer behaviour From: Adrian Chadd To: freebsd-mobile@freebsd.org, freebsd-current , Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 23:45:50 -0000 Hi, I'm having issues with HPET + C3 state on this Atom N450 based netbook. This is (shocking, I know!) running -HEAD (r251605.) If I use C2, HPET is fine. If I use RTC, i8254, LAPIC, C3 is also fine. But C3 + HPET results in multi-second pauses where it should be 1 second. I've disabled powerd and verified that dev.cpu.0.freq=1667; so it's not CPU frequency related. Doug found this: apparently SMI + timer fondling doesn't quite work out? http://lkml.indiana.edu/hypermail/linux/kernel/1102.3/00842.html Thanks! adrian From owner-freebsd-mobile@FreeBSD.ORG Fri Jun 21 01:02:15 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 79D4E986; Fri, 21 Jun 2013 01:02:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1C71FFF; Fri, 21 Jun 2013 01:02:15 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id z10so4127140qcx.21 for ; Thu, 20 Jun 2013 18:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=K1zWoeLapUKqt4bn3FQ8YSdpKZYRowEtIFIzzZGmT18=; b=DOhmpT1Wky70TVJKFSO920d432oBGi2venNh06oCY1HxA3MQMfJkAJlyEojVO7KByi CRN6ioYVKg2x6/4n5Dc8HMb+GL0KrWD3GYE3+PUfTM1ohPZi1m4+CfUV8c/qMqKL9vER lJaVLjdPXqzwlqYabI54zz8/Gf4NlaZXKTihGQMYC5g0fXOc89RWODudYAcFnq7hDkmZ PzazWG3rdGOIb/m8vNezUtTaFgZ5qdxNNLTs7tJlfj7ZkwgJDMh+bZ8CXYHp/eduxb3z nrgd/aqLZQPPu5BrkInhepJciqAKVPZklPayCc7eSGo4i6268IH3nnnhGPFkfeV0PnEg /0pg== MIME-Version: 1.0 X-Received: by 10.49.98.196 with SMTP id ek4mr12149460qeb.8.1371776534646; Thu, 20 Jun 2013 18:02:14 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Thu, 20 Jun 2013 18:02:14 -0700 (PDT) In-Reply-To: References: Date: Thu, 20 Jun 2013 18:02:14 -0700 X-Google-Sender-Auth: -CONjKYYXZqn2WjOusEeUZh6mrg Message-ID: Subject: Re: Atom N450 + C3 + HPET == bad timer behaviour From: Adrian Chadd To: freebsd-mobile@freebsd.org, freebsd-current , Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 01:02:15 -0000 On 20 June 2013 16:45, Adrian Chadd wrote: > Hi, > > I'm having issues with HPET + C3 state on this Atom N450 based > netbook. This is (shocking, I know!) running -HEAD (r251605.) > > If I use C2, HPET is fine. > > If I use RTC, i8254, LAPIC, C3 is also fine. > > But C3 + HPET results in multi-second pauses where it should be 1 second. > > I've disabled powerd and verified that dev.cpu.0.freq=1667; so it's > not CPU frequency related. > > Doug found this: apparently SMI + timer fondling doesn't quite work out? > > http://lkml.indiana.edu/hypermail/linux/kernel/1102.3/00842.html .. and the resolution: http://lkml.indiana.edu/hypermail/linux/kernel/1102.3/00957.html "clockevents: Prevent oneshot mode when broadcast device is periodic When the per cpu timer is marked CLOCK_EVT_FEAT_C3STOP, then we only can switch into oneshot mode, when the backup broadcast device supports oneshot mode as well. Otherwise we would try to switch the broadcast device into an unsupported mode unconditionally. This went unnoticed so far as the current available broadcast devices support oneshot mode. Seth unearthed this problem while debugging and working around an hpet related BIOS wreckage. Add the necessary check to tick_is_oneshot_available()." does that help? adrian From owner-freebsd-mobile@FreeBSD.ORG Fri Jun 21 09:02:34 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 144A13AE; Fri, 21 Jun 2013 09:02:34 +0000 (UTC) (envelope-from l.yotov@gmail.com) Received: from mail-qc0-x22a.google.com (mail-qc0-x22a.google.com [IPv6:2607:f8b0:400d:c01::22a]) by mx1.freebsd.org (Postfix) with ESMTP id A83AD1365; Fri, 21 Jun 2013 09:02:33 +0000 (UTC) Received: by mail-qc0-f170.google.com with SMTP id s1so4478237qcw.29 for ; Fri, 21 Jun 2013 02:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=V1rc+WUiwxl5MabkduseJJskguvB+fbBluqitqFuQVI=; b=YqIHGsa8H50TGwg9f5Hx9sGP0YOmptF8+b6ZEMnS4+oNUY01K7P5Ohq73JwHCKSO8H hOdnJe+QN8QFvbX5h7+4P5Kyft85fispWHDSvNtDFe/B1/sxD8dhnLgvsMCcpci0tAyX CZdzVqPA6ki2eZppyfiSR7K8ZQfNwdwU6vz+9kW3XPyj1ALm44QDjyspCqDyPMyG+8Ys +X4A2enNOYPB4HIw87rhbRCKdx4m4EcEYtNw1HbJyjt4JknLcbA6y7tbsnWDNEWYJIuA sN/xPqH284LHc4eCyNgf7wae7aEm80IOrmtx8M2xYyvshaKXiSXtPf1NxbvfzQ3GksTS KD5A== MIME-Version: 1.0 X-Received: by 10.224.13.19 with SMTP id z19mr13193567qaz.12.1371805353157; Fri, 21 Jun 2013 02:02:33 -0700 (PDT) Received: by 10.224.212.129 with HTTP; Fri, 21 Jun 2013 02:02:33 -0700 (PDT) In-Reply-To: References: Date: Fri, 21 Jun 2013 12:02:33 +0300 Message-ID: Subject: Re: Thinkpad T60 with Atheros working only after restart from Windows From: Lyubomir Yotov To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-wireless@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 09:02:34 -0000 Hello Adrian, Do you have any feedback on the matter? Regards, Lyubomir On 13 June 2013 10:09, Lyubomir Yotov wrote: > Hello Adrian, > > I enabled acpi_ibm.ko but this didn't help and after "halt" the wifi is > not working again. > > Regards, > > Lyubomir > > > On 13 June 2013 08:03, Lyubomir Yotov wrote: > >> Hello Adrian, >> I did some tests and discovered that the problem is related to >> "halt"/"shutdown" of system. If "reboot" is carried out than there is no >> problem and the wifi works properly (even if done from Gnome - Gnome seems >> to have no relation to the problem). So what could lead to "ath0: time out" >> after shutting down or halting the system? I noticed that there are irq >> storms on irq 17 which is the wifi irq (interrupt storm detected on >> "irq17:"; throttling interrupt source). Something else that I am not sure >> to have relevance - after shutdown during the start-up ath0 is reported to >> use autoselect mode 11g: >> (below is from dmesg) >> >> ath0: flags=8843 metric 0 mtu 2290 >> >> ether 00:19:7e:91:xx:xx >> nd6 options=29 >> media: IEEE 802.11 Wireless Ethernet autoselect mode 11g >> status: associated >> >> After the boot has finished the mode changes to 11a: >> >> #ifconfig ath0 >> >> ath0: flags=8843 metric 0 mtu 2290 >> ether 00:19:7e:91:xx:xx >> nd6 options=29 >> media: IEEE 802.11 Wireless Ethernet autoselect mode 11a >> status: associated >> >> Do you have any idea where to look for now? >> >> Regards, >> >> >> Lyubomir >> P.S. I will try to play with acpi_ibm.ko and see if things change if I >> make it auto-load. >> >> >> On 10 June 2013 16:06, Lyubomir Yotov wrote: >> >>> Hello Adrian, >>> >>> Attached are files with consecutive vmstat -i when the wlan is working >>> (vmstat-i_working.txt) and when the wlan is not working >>> (vmstat-i_not_working.txt). There is also output from ifconfig when the >>> wlan is not working (ifconfig.txt). >>> After some more deeper investigation it seems to me that the problem >>> appears after starting X with Gnome. I will continue investigating with >>> "reboot"/"halt -p" and inform you. >>> BTW do you think that starting Gnome session (using startx, as I haven't >>> set auto start of X if this is of any importance) can cause problems - in >>> Gnome I have no settings for the network in the "System->Network" >>> application and I start it with normal user? >>> >>> Regards, >>> >>> Lyubo >>> >>> >>> On 9 June 2013 18:28, Adrian Chadd wrote: >>> >>>> Can you please paste the vmstat -i output? >>>> >>>> >>>> >>>> adrian >>>> >>>> On 9 June 2013 06:53, Lyubomir Yotov wrote: >>>> > Hi, >>>> > >>>> > After restart from Windows and working wireless the number of >>>> interrupts >>>> > increases and the rate increases. After next restart (the ath0 times >>>> out) >>>> > the interrupts increase but the rate is going down. >>>> > I noticed that after restart from Windows and working wifi if I >>>> restart >>>> > /etc/rc.d/netif the wifi is working again. If I shutdown wlan0 and >>>> bring it >>>> > up again then I wlan0 doesn't get address but ath0 is not timing out. >>>> I can >>>> > still get a list with the available APs around. >>>> > >>>> > Regards, >>>> > >>>> > Lyubo >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > On 8 June 2013 18:28, Adrian Chadd wrote: >>>> >> >>>> >> Hm! >>>> >> >>>> >> Ok, this should be working. I frequently test (read: every other day) >>>> >> with the AR5416. But you're not the first person to report this bug. >>>> >> >>>> >> >>>> >> Unfortunately when this happens, the interrupts aren't actually >>>> making >>>> >> it to the OS. >>>> >> >>>> >> Can you check the output of vmstat -i whilst you're doing it? The >>>> ath0 >>>> >> counter should be increasing. >>>> >> >>>> >> >>>> >> >>>> >> adrian >>>> >> >>>> >> On 8 June 2013 06:49, Lyubomir Yotov wrote: >>>> >> > Hello, >>>> >> > I have a Thinkpad T60 with dual boot between Windows XP and FreeBSD >>>> >> > 9.1-Release: >>>> >> > >>>> >> > uname -a >>>> >> > FreeBSD T60.workgroup 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: >>>> Tue >>>> >> > Dec >>>> >> > 4 06:55:39 UTC 2012 >>>> >> > root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC >>>> >> > i386 >>>> >> > >>>> >> > I am trying to use my wifi card which is: >>>> >> > >>>> >> > dmesg >>>> >> > .... >>>> >> > ath0: mem 0xedf00000-0xedf0ffff irq 17 at device >>>> 0.0 on >>>> >> > pci3 >>>> >> > ath0: AR5418 mac 12.10 RF5133 phy 8.1 >>>> >> > .... >>>> >> > >>>> >> > pciconf -lv >>>> >> > .... >>>> >> > ath0@pci0:3:0:0: class=0x028000 card=0x0033168c >>>> chip=0x0024168c >>>> >> > rev=0x01 hdr=0x00 >>>> >> > vendor = 'Atheros Communications Inc.' >>>> >> > device = 'AR5008 Wireless Network Adapter' >>>> >> > class = network >>>> >> > ..... >>>> >> > >>>> >> > I followed several HOW-TOs in order to make it work. Unfortunately >>>> I it >>>> >> > is >>>> >> > working only after I reboot from my Windows installation >>>> (regardless of >>>> >> > the >>>> >> > position of the wifi switch on the front panel of the notebook). >>>> After >>>> >> > restart from Windows everything is fine - the wifi associates with >>>> the >>>> >> > AP >>>> >> > and I can use it. If I reboot the system during the boot and >>>> afterwards >>>> >> > I >>>> >> > constantly get: >>>> >> > >>>> >> > ath0: device timeout >>>> >> > >>>> >> > When I get the device status through ifconfig I can see that ath0 >>>> is >>>> >> > associated but wlan0 is not associated. >>>> >> > >>>> >> > ifconfig ath0 >>>> >> > ath0: flags=8843 metric 0 >>>> mtu >>>> >> > 2290 >>>> >> > ether 00:19:7e:91:xx:xx >>>> >> > nd6 options=29 >>>> >> > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g >>>> >> > status: associated >>>> >> > >>>> >> > ifconfig wlan0 >>>> >> > wlan0: flags=8843 metric 0 >>>> mtu >>>> >> > 1500 >>>> >> > ether 00:19:7e:91:xx:xx >>>> >> > nd6 options=29 >>>> >> > media: IEEE 802.11 Wireless Ethernet autoselect >>>> (autoselect) >>>> >> > status: no carrier >>>> >> > ssid "" channel 5 (2432 MHz 11g) >>>> >> > regdomain 98 indoor ecm authmode WPA privacy ON deftxkey >>>> UNDEF >>>> >> > txpower 20 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 >>>> >> > bgscanidle >>>> >> > 250 >>>> >> > roam:rssi 7 roam:rate 5 protmode CTS wme burst roaming >>>> MANUAL >>>> >> > >>>> >> > >>>> >> > In /var/log/messages I get: >>>> >> > >>>> >> > Jun 8 16:39:16 PC wpa_supplicant[3463]: Trying to associate with >>>> >> > 54:e6:fc:ae:xx:xx (SSID='access1' freq=2432 MHz) >>>> >> > Jun 8 16:39:20 PC kernel: ath0: device timeout >>>> >> > Jun 8 16:39:26 PC wpa_supplicant[3463]: Authentication with >>>> >> > 54:e6:fc:ae:xx:xx timed out. >>>> >> > >>>> >> > If I scan for wireless networks I get a list and my ap is in the >>>> list >>>> >> > >>>> >> > ifconfig wlan0 scan >>>> >> > SSID/MESH ID BSSID CHAN RATE S:N INT CAPS >>>> >> > net1 00:11:11:01:xx:xx 6 54M -68:-96 100 EP >>>> >> > 5edf9c 70:71:bc:26:xx:xx 11 54M -68:-96 100 EP WPS >>>> WPA >>>> >> > WME >>>> >> > access1 54:e6:fc:ae:xx:xx 5 54M -66:-96 100 EP WPA >>>> HTCAP >>>> >> > WME >>>> >> > >>>> >> > >>>> >> > In rc.local I have: >>>> >> > >>>> >> > wlans_ath0="wlan0" >>>> >> > ifconfig_wlan0="WPA DHCP" >>>> >> > >>>> >> > In wpa_supplicant I have: >>>> >> > >>>> >> > ctrl_interface=/var/run/wpa_supplicant >>>> >> > eapol_version=2 >>>> >> > ap_scan=1 >>>> >> > fast_reauth=1 >>>> >> > >>>> >> > network={ >>>> >> > ssid="access1" >>>> >> > psk="secret1" >>>> >> > priority=5 >>>> >> > } >>>> >> > network={ >>>> >> > ssid="access2" >>>> >> > psk="secret2" >>>> >> > priority=5 >>>> >> > } >>>> >> > >>>> >> > I searched the net for solution to my problem but I couldn't find >>>> one. >>>> >> > Can >>>> >> > you help me with this? >>>> >> > >>>> >> > >>>> >> > Regards, >>>> >> > >>>> >> > Lyubomir >>>> >> > _______________________________________________ >>>> >> > freebsd-mobile@freebsd.org mailing list >>>> >> > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile >>>> >> > To unsubscribe, send any mail to >>>> >> > "freebsd-mobile-unsubscribe@freebsd.org" >>>> > >>>> > >>>> >>> >>> >> > From owner-freebsd-mobile@FreeBSD.ORG Fri Jun 21 09:34:02 2013 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9472E848; Fri, 21 Jun 2013 09:34:02 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-x22e.google.com (mail-bk0-x22e.google.com [IPv6:2a00:1450:4008:c01::22e]) by mx1.freebsd.org (Postfix) with ESMTP id C42FB1682; Fri, 21 Jun 2013 09:34:01 +0000 (UTC) Received: by mail-bk0-f46.google.com with SMTP id na10so3271823bkb.5 for ; Fri, 21 Jun 2013 02:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AHjI4FLGmMomyh9OaHkm/tCfub4rxZO9DdacXUE175A=; b=ny6uPmHhDnimUpilXl43Gtq7FxtwgCh8IcGZRtiDrxGjDHpzNrkTgp8Uh4Q1FlqNvn eRATwUQVZJqaRMuXcb37e/nGzpOObMZi1uvS676DEF6Vu3igO/3QqFmssBZpNH1cSmPv Y+KTKnMwRQV3G/UvHrGYUQmTQBMpFC1TyIz42jxi4bwQjvW0YtlklAFttvwgQXD+MQ0s dR+ZmapFTZyNeleivo0VAlRzll8q813mlES+jGXzMwgjzizvg9gcIqNcbt7A8w+xvQSY NOpzooKkq6MPIXcmdDiKLpDycy/s8REb8pMFRkp9++fFbd2u8V7oWrxYvS4viy6KIIle nYJQ== X-Received: by 10.205.12.67 with SMTP id ph3mr1682652bkb.87.1371807240771; Fri, 21 Jun 2013 02:34:00 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPSA id fz10sm1270527bkc.9.2013.06.21.02.33.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 02:33:58 -0700 (PDT) Sender: Alexander Motin Message-ID: <51C41E03.6060205@FreeBSD.org> Date: Fri, 21 Jun 2013 12:33:55 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130616 Thunderbird/17.0.6 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: Atom N450 + C3 + HPET == bad timer behaviour References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current , freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2013 09:34:02 -0000 On 21.06.2013 04:02, Adrian Chadd wrote: > On 20 June 2013 16:45, Adrian Chadd wrote: >> Hi, >> >> I'm having issues with HPET + C3 state on this Atom N450 based >> netbook. This is (shocking, I know!) running -HEAD (r251605.) >> >> If I use C2, HPET is fine. >> >> If I use RTC, i8254, LAPIC, C3 is also fine. LAPIC use probably disables C3 usage automatically there. RTC and i8254 use only periodic modes and so system will wakeup with at least HZ rate, so it is hard to say whether C3 will be used. >> But C3 + HPET results in multi-second pauses where it should be 1 second. What timecounter are you using? Have you tried to check what is going on in that moment: timecounter stoped, eventttimer interrupt losd or system is completely stuck somehow? >> I've disabled powerd and verified that dev.cpu.0.freq=1667; so it's >> not CPU frequency related. >> >> Doug found this: apparently SMI + timer fondling doesn't quite work out? >> >> http://lkml.indiana.edu/hypermail/linux/kernel/1102.3/00842.html SMI is a black box that can give us any kind of unexpected surprises. Theoretically there could be number of scenarios: HPET counter or comparator values corrupted by SMI code (not sure we can protect), SMI code can open race window on HPET comparator programming (that should be handled now), SMI code can have own bugs triggered by some specific HPET usage pattern (not our area). > .. and the resolution: > > http://lkml.indiana.edu/hypermail/linux/kernel/1102.3/00957.html > > "clockevents: Prevent oneshot mode when broadcast device is periodic > > When the per cpu timer is marked CLOCK_EVT_FEAT_C3STOP, then we only > can switch into oneshot mode, when the backup broadcast device > supports oneshot mode as well. Otherwise we would try to switch the > broadcast device into an unsupported mode unconditionally. This went > unnoticed so far as the current available broadcast devices support > oneshot mode. Seth unearthed this problem while debugging and working > around an hpet related BIOS wreckage. > > Add the necessary check to tick_is_oneshot_available()." > > does that help? That looks more like workaround for Linux-specific issue. Linux can use different timers hardware when CPU is active and when in deep sleep, and, as I understand from description, it tried to improperly use one of devices. Our code doesn't have that magic. Also I think this fix fixes not the original problem, but different one they've found during debugging. HPET always has ONESHOT capability, so this check is irrelevant when it is used as a broadcast device. -- Alexander Motin