From owner-freebsd-current@FreeBSD.ORG Mon Feb 27 22:39:13 2012 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 7564E106566B; Mon, 27 Feb 2012 22:39:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 841F88FC12; Mon, 27 Feb 2012 22:39:12 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA14542; Tue, 28 Feb 2012 00:38:58 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1S29De-0002a3-6T; Tue, 28 Feb 2012 00:38:58 +0200 Message-ID: <4F4C0600.2000903@FreeBSD.org> Date: Tue, 28 Feb 2012 00:38:56 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Scott Long References: <4F26CC5A.2070501@FreeBSD.org> <4F4B5ED3.5090508@FreeBSD.org> <65B1891F-9079-4948-BF37-8A50B4E85071@samsco.org> In-Reply-To: <65B1891F-9079-4948-BF37-8A50B4E85071@samsco.org> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, John Baldwin Subject: Re: revisiting tunables under Safe Mode menu option 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: Mon, 27 Feb 2012 22:39:13 -0000 on 27/02/2012 21:03 Scott Long said the following: > > On Feb 27, 2012, at 3:45 AM, Andriy Gapon wrote: > >> on 30/01/2012 18:59 Andriy Gapon said the following: >>> >>> First, I think that this proposal/discussion could have been more useful >>> before the 9.0. Maybe the RE would be interested in adding another item >>> to their pre-release checklist: ask developers about what could be >>> dropped and what should be added to the Safe Mode settings in a new (.0) >>> release. Probably the developers should keep the Safe Mode in mind too >>> when adding new features or making other drastic changes, but the >>> reminder should be welcome. >> [snip] >>> o Since we have a separate ACPI option and because ACPI now is almost a >>> mandatory thing (and not a significant source of boot troubles), maybe we >>> could remove the code that automatically disables ACPI in Safe Mode? >>> >>> o hint.apic.0.disabled - APIC code doesn't seem to be a significant >>> source of boot troubles, like ACPI it has become almost a mandatory >>> thing. So maybe we should remove this setting? > > Turning off the APIC turns off SMP in a very efficient, clean manner. I > added this not to isolate the APIC code, but to turn off SMP. That's why > it's there, and I'd like the ability to turn off SMP to stay there in some > form. I think that this is a good idea. > If there's a better way to disable SMP that doesn't get into problems > with interrupt delivery, then please propose it. I think that kern.smp.disabled should be it. > As for it being mandatory, > it's really only mandatory for MSI these days, though it used to be required > for more complex PCIX topologies. > >> [dropped proposals snipped] >>> o hw.eisa_slot - Looks like something from ancient times. Probably just >>> irrelevant for most systems. >>> > > This turns off probes in the ISA ioport space that used to cause problems. > Why get rid of it? Just cleaning up what looked like cruft... I don't believe I heard of any problem reports like that lately. But probably you are right and this shouldn't be removed until eisa is dropped from i386 GENERIC. Is it time already? OTOH, it seems that the eisa probe code should not get executed on a non-legacy system (ACPI present and enabled) unless it has an actual PCI-EISA bridge. So I am deferring this decision to you. Please let me know your preference. > Is its presence causing you problems? No, no problems (maybe because I never had device eisa in my kernels). >>> o hint.kbdmux.0.disabled - I do not recall any recent problems with >>> kbdmux. In fact disabling it may produce a surprising behavior for a >>> user if there are multiple keyboards actually attached. >>> > > Fair enough, if we're all happy that the kbdmux code has progressed beyond > this being useful, then get rid of it. But what's the surprising behavior? Having two keyboards and one of them not working because it is not an active one. >>> Just so that the Safe Mode doesn't turn into a NOP I propose to add the >>> following tunables: >>> >>> o kern.eventtimer.periodic=1 - Use periodic timer to drive clocks just in >>> case a system has any problems with the default mode. Example: PR >>> 164457. >>> >>> o kern.geom.part.check_integrity=0 - Let GPART code be more permissive, >>> could be useful during upgrades from earlier versions of FreeBSD or when >>> multi-booting with other OSes. >>> >>> o More? >>> > > I suggested before that maybe it's time to expand this "Safe Mode" topic into > a sub-menu that allows selection of some/all/none of the options. I completely agree with this suggestion (always did), but unfortunately my forth and menu.rc skills are weak and my FreeBSD time is short. Here is an updated patch (with the eisa_slots decision pending): diff --git a/sys/boot/forth/menu-commands.4th b/sys/boot/forth/menu-commands.4th index 828a148..416cb85 100644 --- a/sys/boot/forth/menu-commands.4th +++ b/sys/boot/forth/menu-commands.4th @@ -62,30 +62,21 @@ marker task-menu-commands.4th -rot 2dup 12 + c! rot \ replace 'N' with ASCII numeral evaluate 0= if - s" hint.apic.0.disabled" unsetenv + s" kern.smp.disabled" unsetenv s" hw.ata.ata_dma" unsetenv s" hw.ata.atapi_dma" unsetenv s" hw.ata.wc" unsetenv s" hw.eisa_slots" unsetenv - s" hint.kbdmux.0.disabled" unsetenv + s" kern.eventtimer.periodic" unsetenv + s" kern.geom.part.check_integrity" unsetenv else - \ - \ Toggle ACPI elements if necessary - \ - acpipresent? if acpienabled? if - menuacpi @ dup 0<> if - toggle_menuitem ( N -- N ) - then - drop - acpi_disable - then then - - s" set hint.apic.0.disabled=1" evaluate + s" set kern.smp.disabled=1" evaluate s" set hw.ata.ata_dma=0" evaluate s" set hw.ata.atapi_dma=0" evaluate s" set hw.ata.wc=0" evaluate s" set hw.eisa_slots=0" evaluate - s" set hint.kbdmux.0.disabled=1" evaluate + s" set kern.eventtimer.periodic=1" unsetenv + s" set kern.geom.part.check_integrity=0" unsetenv then menu-redraw -- Andriy Gapon