From owner-freebsd-hackers@freebsd.org Wed Nov 22 19:47:15 2017 Return-Path: Delivered-To: freebsd-hackers@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 4A300DF3CE2 for ; Wed, 22 Nov 2017 19:47:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2772566B78 for ; Wed, 22 Nov 2017 19:47:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3774110A8BC; Wed, 22 Nov 2017 14:47:14 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: hw.pci.realloc_bars Date: Tue, 21 Nov 2017 15:14:57 -0800 Message-ID: <1942153.DdtJSvPgjR@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 22 Nov 2017 14:47:14 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2017 19:47:15 -0000 On Thursday, October 26, 2017 02:20:23 PM Bob Bishop wrote: > Hi, >=20 > hw.pci.realloc_bars controls a mechanism that repositions a PCI memor= y resource if it can=E2=80=99t be successfully allocated at the default= place. >=20 > It=E2=80=99s disabled by default - anyone know why? >=20 > Seems to me that because it only comes into play in an error case it = would be harmless to have it enabled by default. That would have avoide= d a recent case where installation on the HPE Gen 10 microserver is tri= cky because its VGA suffers from this problem. >=20 > Thoughts? It is disabled by default because it is risky. A correct implementatio= n would first pre-reserve as many firmware/BIOS-assigned ranges as possib= le and only then fallback to allocating resources from scratch. Right now= it tries to realloc as soon as it fails which is before we've reserved firmware-assigned resources of other devices in the system. --=20 John Baldwin