Date: Mon, 23 Dec 2013 09:11:21 -0800 From: Sean Bruno <sean_bruno@yahoo.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, Peter Wemm <peter@wemm.org> Subject: Re: 10.0 BETA 3 with redports kernel panic Message-ID: <1387818681.2431.0.camel@powernoodle.corp.yahoo.com> 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> <CAGE5yCqhmRSM6oyw=FRZq59LniLsYaN%2BEog=GEPn3-ruuQk9EQ@mail.gmail.com> <CAGE5yCp9msPAy4HZ4TGRXws%2BxjLQ8iChbPQGj539qHJKhq2UJQ@mail.gmail.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> <CAGE5yCos5xGu7w24A6QSRDEPbfRNsjmHSvnpUE2Dvr1PUW2T8w@mail.gmail.com> <20131221145534.GY59496@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1387818681.2431.0.camel>