From owner-freebsd-stable@freebsd.org Sun Dec 27 05:30:32 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C061FA4D019 for ; Sun, 27 Dec 2015 05:30:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D9111158 for ; Sun, 27 Dec 2015 05:30:32 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id p187so229618446wmp.0 for ; Sat, 26 Dec 2015 21:30:32 -0800 (PST) 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=psj3GRXUIRHm+SR9crDb68cDOtIjpQGpeDqEOXajcSg=; b=g0MCiTnc9oXQFFkT3f8AsLfPaM9jq5aJ0LsiCxJIdrbomM5mL7aGh4Vy5FBXrTJ5t4 ZJPR4Uo8etoWp+YlFVmW0eRC0IiTBkFMkBsV/v2GJE9zowdLzUa4F5Hq2xLPfNiZb505 IvLwSkCGgwLLm6SpnIXjj+lbBKZA+q+/AjfTEd0RhIyikOV4AJBJWFQi/8Aosuv5A119 /6amYRm8Z1eF2h32ZD+NThcPl8MYJhZnpigtidjoAbnnNMGeIJ+TKUiDEbTT/vKmJWsH 0MAetRQjTbc/UIGESNCX45RFPCVuY8kgC8VJequ6DpZNYz2jBydtkf1a8XCGCIxLlnaK xR/A== X-Received: by 10.194.20.164 with SMTP id o4mr52861261wje.105.1451194229800; Sat, 26 Dec 2015 21:30:29 -0800 (PST) Received: from mavbook.mavhome.dp.ua (46-133-109-216.dialup.umc.net.ua. [46.133.109.216]) by smtp.googlemail.com with ESMTPSA id df10sm36829682wjb.44.2015.12.26.21.30.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Dec 2015 21:30:28 -0800 (PST) Sender: Alexander Motin Message-ID: <567F5E77.5060206@FreeBSD.org> Date: Sun, 27 Dec 2015 05:43:51 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ian Smith , Tom Evans CC: FreeBSD Stable , Jeremy Chadwick , Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: stable/10: high load average when box is idle References: <20151027050508.GA7612@icarus.home.lan> <20151104025748.F10372@sola.nimnet.asn.au> <20151106212735.U12989@sola.nimnet.asn.au> In-Reply-To: <20151106212735.U12989@sola.nimnet.asn.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Dec 2015 05:30:32 -0000 On 26.12.2015 17:09, Ian Smith wrote: > Current hypothesis: some variable/s are getting improperly initialised > at boot, but are (somehow?) getting properly re-initialised on changing > cpuset to 1 then back to 2 cpus - though I've no idea how, or by what. While this is interesting hypothesis, I see no real ground for it in the code. My own explanation here, same as before, is in area of events aliasing. HPET, due to its hardware limitations, more prone to different synchronization effects then LAPIC. And those limitations are specific to hardware configuration. On modern hardware HPET may provide (up 8) per-CPU MSI interrupts. This is the best case for everything with minimal chances for aliasing (unless you have more then 8 logical cores). On older hardware it is typical to have HPET sharing single interrupt line with some other device(s) and generating events for all CPUs from it. Interrupt line sharing tends to create load of 1.0 due to counting its own interrupt thread. I've partially workarounded that at some point, but aliasing possibilities are still there. Driving multiple CPUs from the same interrupt also creates aliasing, since different CPUs wakeup close to each other and may count each-others load. Different CPU wakeup times from different sleep states and other sources of jitter may generate quite complicated but not really useful behavior patterns. Happy holidays! -- Alexander Motin