From peter@rulingia.com  Sun Oct 28 20:27:28 2012
Return-Path: <peter@rulingia.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3B035CA9
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Oct 2012 20:27:28 +0000 (UTC)
	(envelope-from peter@rulingia.com)
Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194])
	by mx1.freebsd.org (Postfix) with ESMTP id C1A718FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Oct 2012 20:27:27 +0000 (UTC)
Received: from server.rulingia.com (c220-239-241-202.belrs5.nsw.optusnet.com.au [220.239.241.202])
	by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q9SKRJm2097662
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Oct 2012 07:27:19 +1100 (EST)
	(envelope-from peter@rulingia.com)
Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1])
	by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q9SKRCT2061007
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 29 Oct 2012 07:27:13 +1100 (EST)
	(envelope-from peter@server.rulingia.com)
Received: (from peter@localhost)
	by server.rulingia.com (8.14.5/8.14.5/Submit) id q9SKRCiU060995;
	Mon, 29 Oct 2012 07:27:12 +1100 (EST)
	(envelope-from peter)
Message-Id: <201210282027.q9SKRCiU060995@server.rulingia.com>
Date: Mon, 29 Oct 2012 07:27:12 +1100 (EST)
From: Peter Jeremy <peter@rulingia.com>
Reply-To: Peter Jeremy <peter@rulingia.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: atrun(8) load monitoring does not handle SMP
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         173175
>Category:       bin
>Synopsis:       atrun(8) load monitoring does not handle SMP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mjg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 28 20:30:01 UTC 2012
>Closed-Date:    Tue Nov 13 19:23:06 UTC 2012
>Last-Modified:  Tue Nov 13 19:23:06 UTC 2012
>Originator:     Peter Jeremy
>Release:        FreeBSD 8.3-STABLE amd64
>Organization:
n/a
>Environment:
System: FreeBSD server.rulingia.com 8.3-STABLE FreeBSD 8.3-STABLE #18 r237444M: Sun Jul 8 10:47:08 EST 2012 root@server.rulingia.com:/var/obj/usr/src/sys/server amd64

>Description:
	By default, atrun(8) stops executing batch jobs if the 1-minute
	load average exceeds 1.5.  Whilst this may be reasonable on a
	UP host, it cuts in far too early on SMP hosts.

	Within the base system, only atrun(8), sendmail(8) and libgomp
	use the load average to control behaviour.  libgomp and sendmail
	already compensate for the number of CPUs but atrun has a fixed
	default limit.

>How-To-Repeat:
	Code inspection.

	Eg, on a 4-way SMP host, queue a batch(1) or at(1) job as well as
	2 CPU-bound processes.  Note that the batch/at job does not run
	even though the system is only 50% loaded.

>Fix:
	The simplest fix is to scale the 1.5 by the number of CPUs.



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mjg 
Responsible-Changed-By: mjg 
Responsible-Changed-When: Tue Oct 30 18:40:28 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173175 
State-Changed-From-To: open->patched 
State-Changed-By: mjg 
State-Changed-When: Tue Oct 30 19:50:45 UTC 2012 
State-Changed-Why:  
Patched in r242372, will MFC in 2 weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173175 
State-Changed-From-To: patched->closed 
State-Changed-By: mjg 
State-Changed-When: Tue Nov 13 19:23:04 UTC 2012 
State-Changed-Why:  
Merged to stable/8 and stable/9 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173175 
>Unformatted:
