Date: Wed, 20 Feb 2008 19:25:05 GMT From: Dominic Fandrey <kamikaze@bsdforen.de> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/120914: [patch] proposed fix to rc.shutdown to turn off the mixed buffer messages with an rc.conf tuneable Message-ID: <200802201925.m1KJP5DL055151@www.freebsd.org> Resent-Message-ID: <200802201930.m1KJU3bw053847@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 120914 >Category: misc >Synopsis: [patch] proposed fix to rc.shutdown to turn off the mixed buffer messages with an rc.conf tuneable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 20 19:30:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_7 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #3: Wed Feb 13 17:52:28 CET 2008 root@mobileKamikaze.norad:/usr/obj/HP6510b/amd64/usr/src/sys/HP6510b amd64 >Description: On multicore machines several buffers simultaneously write to the screen and produce unreadable output. >How-To-Repeat: Apply the patch and add shutdown_clean_enable="YES" to your /etc/rc.conf. >Fix: --- rc.shutdown 2008-02-20 19:28:45.000000000 +0100 +++ /etc/rc.shutdown 2008-02-20 19:59:03.000000000 +0100 @@ -43,10 +43,21 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin export HOME PATH +# The next three lines belong into /etc/defaults/rc.conf. +shutdown_clean_enable="NO" # Set to YES to stop all but the first CPU + # core to prevent mixed buffer output + # upon shutdown. + . /etc/rc.subr load_rc_config 'XXX' +# Fall back to single core mode to guarantee clean output. +if checkyesno shutdown_clean_enable; then + bitmask="$(jot -s '' -b1 $(expr $(sysctl -n hw.ncpu) - 1))0" + sysctl machdep.hlt_cpus=$bitmask +fi + # reverse_list list # print the list in reverse order # >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802201925.m1KJP5DL055151>