From owner-freebsd-current@freebsd.org Sun Jan 10 05:49:54 2016 Return-Path: Delivered-To: freebsd-current@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 1DE74A69ECC for ; Sun, 10 Jan 2016 05:49:54 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id BC4991437; Sun, 10 Jan 2016 05:49:53 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id I8spaY5pukK49I8srax2h4; Sat, 09 Jan 2016 22:49:46 -0700 X-Authority-Analysis: v=2.1 cv=AMkI9oPf c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=7aQ_Q-yQQ-AA:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=_y4AjJCIE2O5uPkej6EA:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D11BE13751; Sat, 9 Jan 2016 21:49:43 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u0A5nhuj002753; Sat, 9 Jan 2016 21:49:43 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201601100549.u0A5nhuj002753@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Alan Cox cc: Adrian Chadd , John Baldwin , freebsd-current , Cy Schubert , Jeremie Le Hen , Ryan Stone , =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= , "?Alan L. Cox" Subject: Re: Panic from vesa_configure() In-Reply-To: Message from Alan Cox of "Sat, 09 Jan 2016 15:36:09 -0600." <56917D49.1000707@rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 09 Jan 2016 21:49:43 -0800 X-CMAE-Envelope: MS4wfDhma48VDAt9wlpSd04Id2aKBF+N6YUd5GpiGFuTm1OhMswUgdyf49HofFMgifCj+TDopircLEQ8md1bDAnARw3do9CPVV3McU/PnsdTmaKC5KZp7ASc cvRtm7vmZUe/Po/IPmpqmoJ1jCWHzAD+ruhUe7nHzTJdPOgPGzMyD87rlLUyPJEAZL5iG93KDvnmL0i2HP9/AfieR0NCS0hBjaPfIJ2OA2x79E6HwqC7oeIc HLP4yqZe8lMnno10gTcJo4Nv+71yNhqfPKzA26sl4b7yZ2Wu7npU3ZWKqqdrBvKh3ntEIDdYrbLB/0m5brF7sk6KPajLMi1GR/5SfXjq5/lWjeinvkYLkMc0 6hpw6wzTF5RlddNQEOeHhuHzPaiO7A== X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 10 Jan 2016 05:49:54 -0000 In message <56917D49.1000707@rice.edu>, Alan Cox writes: > This is a multi-part message in MIME format. > --------------080104010900060709060805 > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: 7bit > > On 01/09/2016 14:05, Alan Cox wrote: > > On 01/09/2016 13:48, Adrian Chadd wrote: > >> On 9 January 2016 at 11:30, John Baldwin wrote: > >>> On Thursday, January 07, 2016 01:47:32 AM Cy Schubert wrote: > >>>> In message il.c > >>>> om> > >>>> , Jeremie Le Hen writes: > >>>>> On Mon, Dec 21, 2015 at 12:57 AM, Adrian Chadd > wrote > >>>>> : > >>>>>> can you copy/paste the file:line that each of those stackframes repres > ents? > >>>>>> > >>>>>> I may have an idea or two.. > >>>>> Sure here we go: > >>>>> > >>>>> (kgdb) list *vesa_configure+0x270 > >>>>> 0xffffffff80b25cd0 is in vesa_configure (/usr/src-svn/sys/dev/fb/vesa.c > :827). > >>>>> > >>>>> (kgdb) list *vga_init+0x65 > >>>>> 0xffffffff80b286e5 is in vga_init (/usr/src-svn/sys/dev/fb/vga.c:1402). > >>>>> > >>>>> (kgdb) list *isavga_attach+0x92 > >>>>> 0xffffffff80b9afd2 is in isavga_attach (/usr/src-svn/sys/isa/vga_isa.c: > 224). > >>>> Here is what I see. Only happens on real hardware (not VirtualBox VMs). > >>>> > >>>> uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 > >>>> uart0: console (9600,n,8,1) > >>>> acpi_alloc_wakeup_handler: can't alloc wake memory > >>> This is probably related to the same cause. Both this and the x86 BIOS s > tuff > >>> need "low" memory (memory below 1MB). > >>> > >>> x86bios_alloc() uses contigmalloc() as does acpi_alloc_wakeup_handler(). > >>> Perhaps the recent changes to contigmalloc() affect this? In particular, > >>> try reverting r292469 to see if that fixes the issue. > >> Can't we just keep a pool of those pages around and not give them out > >> unless someone specifically asks for low memory? > > vm_phys.c already implements a "soft segregation" under which these > > pages are only allocated as a last resort, unless > > kmem_alloc_{attr,contig}() or contigmalloc() is called. > > > > What happened is that r292469 changed the order in which we pull from > > the free lists for kmem_alloc_{attr,contig}() and contigmalloc() so that > > a bunch of, for example, contigmalloc(low=0, high=4GB) calls, could > > potentially exhaust physical memory in the range [0, 1MB). In other > > words, we're no longer getting the soft segregation among contigmalloc() > > calls. > > > > This patch should suffice to restore the soft segregation among > contigmalloc() calls. This fixes it. pcib2: at device 15.0 on pci0 pci2: on pcib2 vgapci0: mem 0xe8000000-0xefffffff,0xfddfe000-0xfdd fffff irq 16 at device 0.0 on pci2 vgapci0: Boot video device amdtemp0: on hostb3 acpi_tz0: on acpi0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (9600,n,8,1) orm0: at iomem 0xc0000-0xcc7ff on isa0 vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] powernow0: on cpu0 powernow1: on cpu1 -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.