From owner-freebsd-current@FreeBSD.ORG Sat Nov 29 15:51:45 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1597C1065673 for ; Sat, 29 Nov 2008 15:51:45 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 78A4D8FC0A for ; Sat, 29 Nov 2008 15:51:44 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl164-98.kln.forthnet.gr [62.1.67.98]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mATFpXlk032639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 29 Nov 2008 17:51:39 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mATFpX3q026791; Sat, 29 Nov 2008 17:51:33 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mATFpVtq026682; Sat, 29 Nov 2008 17:51:31 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Peter Wemm" References: <87wseo731o.fsf@kobe.laptop> <87fxlcba7p.fsf@kobe.laptop> <87myfjma0k.fsf@kobe.laptop> Date: Sat, 29 Nov 2008 17:51:31 +0200 In-Reply-To: (Peter Wemm's message of "Fri, 28 Nov 2008 20:47:00 -0800") Message-ID: <87wsempm2k.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mATFpXlk032639 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.007, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.39, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-current@freebsd.org Subject: Re: tty problems in recent head? 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: Sat, 29 Nov 2008 15:51:45 -0000 On Fri, 28 Nov 2008 20:47:00 -0800, "Peter Wemm" wrote: > On Fri, Nov 28, 2008 at 8:27 PM, Giorgos Keramidas > wrote: >> Since this part of sched_ule.c hasn't changed in a while >> >> REV CHANGE AUTHOR >> --------------------------------------------------------------------------------------------------- >> 1848 171482 jeff cpu_switch(td, newtd, mtx); >> 1849 171482 jeff /* >> 1850 171482 jeff * We may return from cpu_switch on a different cpu. However, >> 1851 171482 jeff * we always return with td_lock pointing to the current cpu's >> 1852 171482 jeff * run queue lock. >> 1853 171482 jeff */ >> 1854 171482 jeff cpuid = PCPU_GET(cpuid); >> 1855 171482 jeff tdq = TDQ_CPU(cpuid); >> 1856 174629 jeff lock_profile_obtain_lock_success( >> 1857 174629 jeff &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__); >> 1858 145256 jkoshy #ifdef HWPMC_HOOKS >> 1859 145256 jkoshy if (PMC_PROC_IS_USING_PMCS(td->td_proc)) >> 1860 145256 jkoshy PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN); >> 1861 145256 jkoshy #endif >> >> any ideas why PCPU_GET() might spin like this? > > It isn't. The 'info' command is misleading you. It is merely the > next instruction after returning from cpu_switch(). Something is > effectively in a yield loop. Thanks. I went back to 2008-11-16 15:45 +0000 and I can still see xterm processes stuck after a while. Two potentially useful bits are: 1. My `/etc/make.conf' contained after the last restore from backups: : # Are these two really safe? : CFLAGS?= -O2 -fno-strict-aliasing -pipe : COPTFLAGS?= -O -pipe : : #NO_CPU_CFLAGS= # Don't add -march= to CFLAGS automatically : #NO_CPU_COPTFLAGS= # Don't add -march= to COPTFLAGS automatically I commented both out, to see if it changes things. If the same happens without -O2 optimizations, I'll keep going backwards to see if I can locate the commit that this started happening.