From owner-freebsd-stable@FreeBSD.ORG Mon Dec 23 17:14:31 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB3F898B for ; Mon, 23 Dec 2013 17:14:31 +0000 (UTC) Received: from nm37-vm8.bullet.mail.bf1.yahoo.com (nm37-vm8.bullet.mail.bf1.yahoo.com [72.30.238.220]) by mx1.freebsd.org (Postfix) with SMTP id 9A1E91E31 for ; Mon, 23 Dec 2013 17:14:31 +0000 (UTC) Received: from [98.139.212.153] by nm37.bullet.mail.bf1.yahoo.com with NNFMP; 23 Dec 2013 17:11:23 -0000 Received: from [98.139.211.163] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 23 Dec 2013 17:11:23 -0000 Received: from [127.0.0.1] by smtp220.mail.bf1.yahoo.com with NNFMP; 23 Dec 2013 17:11:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1387818683; bh=sU+MLPYexk9ig2Xx6ZMK7vU4PnrIBiK70m+q/KkIF6s=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=l64MtpdTje8dq0P627kpxr+z45qHibalXksCp7sGz8Y6DbIrHntOanWPo9S+39eNwLTCDGUA936nwd5PtDgFl9Qn/hzOPL6UMZXWK2upo/ARNSp3NiMAaWn151KXVY1/YO+ygwAVdfCSJQjXUIOkKrvzzma/Fl8hhatpOm20qD8= X-Yahoo-Newman-Id: 785597.71177.bm@smtp220.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XSNHJMwVM1m7Ok_enYo9mEa_KAaHRpevYzVgx0JxWNbBQsO Rnh7gTMX3tS1sL5H791s9mPjWnCRbfCeZ5NB7zOXZcc4129yuFt79pBPHnHb JR4Nxs5xeP.wM_efTtvY7iXRAgKxemvTYWj7u6FF3Xa0OyOunaO62KOpM63W R_aB6kpB1YAzCIR7tyIx8KxH6GbMajOZq9FPUKcQvFBZXUbzSSdSi_XF_I7U K3qrQIfwex8tSz6MfbqhN5cPXCS25gk6o6QMUP9n1wvyPV9I38f2kb2DrM5z DHlmy1wYs0A3cINQVMsygq1OPyghTCAj4XNl7yAOzjvCcRHkCV2Z0sYMaVIo M__UyPKi6JgqkEv403IxoEZYOmR4eZ8fyamQKMOXpmKT7Z3f6NREUKo322iW GRPMYQ8OPOqrEjuU46XTDJyYyX4wWGu3W6sHjVFTDUXUZDhWLsKxOuRMnraB CANSOfzmcgGOjzd2KeO6bZqh_1k.hD1yvWoUeMmjJ0zb5lsk6SLxqqcq1z3m 4w_fxsY_dGxtcUNQTLi3Vfv5p6UzgoSstR0bZzZ5MT0u5jwEG2MxgLhtqxVx xfA-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with plain [98.139.211.125]) by smtp220.mail.bf1.yahoo.com with SMTP; 23 Dec 2013 17:11:23 +0000 UTC Subject: Re: 10.0 BETA 3 with redports kernel panic From: Sean Bruno To: Konstantin Belousov In-Reply-To: <20131221145534.GY59496@kib.kiev.ua> References: <1387473915.2494.0.camel@powernoodle.corp.yahoo.com> <20131219180833.GN59496@kib.kiev.ua> <1387479064.2494.5.camel@powernoodle.corp.yahoo.com> <1387492541.27693.5.camel@powernoodle.corp.yahoo.com> <20131220094835.GR59496@kib.kiev.ua> <1387554355.1491.4.camel@powernoodle.corp.yahoo.com> <20131220162254.GT59496@kib.kiev.ua> <20131221145534.GY59496@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" Date: Mon, 23 Dec 2013 09:11:21 -0800 Message-ID: <1387818681.2431.0.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-stable@freebsd.org" , Peter Wemm X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 17:14:32 -0000 On Sat, 2013-12-21 at 16:55 +0200, Konstantin Belousov wrote: > > The reason why the dmaplimit change originally exploded was becase > > dmaplimit is set to zero for the duration of while we're running on > > the page tables given to us by the loader. I believe initializing > > dmaplimit to DMAP_MAX_ADDRESS rather than zero would have solved the > > original explosions. > The dmaplimit is initialized in > hammer_time->pmap_bootstrap->getmemsize-> > create_pagetable(). The backtrace above should be much later in the > boot sequence, note that mi_startup() was already running. > > I believe that my previous change just broke vsetslab()/vtoslab(). Currently running 2/4 machines with the following patch. No data for stability yet. Still waiting. > Index: amd64/amd64/mem.c > =================================================================== > --- amd64/amd64/mem.c (revision 258554) > +++ amd64/amd64/mem.c (working copy) > @@ -98,6 +98,10 @@ > kmemphys: > o = v & PAGE_MASK; > c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); > + v = PHYS_TO_DMAP(v); > + if (v < DMAP_MIN_ADDRESS || v >= dmaplimit || > + pmap_kextract(v) == 0) > + return (EFAULT); > error = uiomove((void *)PHYS_TO_DMAP(v), (int)c, uio); > continue; > } > Index: amd64/amd64/pmap.c > =================================================================== > --- amd64/amd64/pmap.c (revision 258554) > +++ amd64/amd64/pmap.c (working copy) > @@ -321,7 +321,7 @@ > "Number of kernel page table pages allocated on bootup"); > > static int ndmpdp; > -static vm_paddr_t dmaplimit; > +vm_paddr_t dmaplimit; > vm_offset_t kernel_vm_end = VM_MIN_KERNEL_ADDRESS; > pt_entry_t pg_nx; > > Index: amd64/include/pmap.h > =================================================================== > --- amd64/include/pmap.h (revision 258554) > +++ amd64/include/pmap.h (working copy) > @@ -368,6 +368,7 @@ > extern vm_paddr_t dump_avail[]; > extern vm_offset_t virtual_avail; > extern vm_offset_t virtual_end; > +extern vm_paddr_t dmaplimit; > > #define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) > #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0)