From owner-dev-commits-src-main@freebsd.org Wed Dec 30 22:58:10 2020 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFBF84D219B; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5msZ5KPqz4pGd; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A33128747; Wed, 30 Dec 2020 22:58:10 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id D980527C0054; Wed, 30 Dec 2020 17:58:09 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Wed, 30 Dec 2020 17:58:09 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder redtnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhephfdvgfettdeuvedujeeu gffhkeekjeefgfelkeelvedvfeeuhfelveefleeluddtnecuffhomhgrihhnpehfrhgvvg gsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepsggurhgrghhonhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqud dtgedvfeehkeeigedqudekuddtkeehuddqsggurhgrghhonheppefhrhgvvgeuufffrdho rhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 315EBC200A7; Wed, 30 Dec 2020 17:58:10 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <1aef0db2-d564-4ac0-8019-b0a49c9a4e2f@www.fastmail.com> In-Reply-To: <202012302245.0BUMjrlb032434@gitrepo.freebsd.org> References: <202012302245.0BUMjrlb032434@gitrepo.freebsd.org> Date: Wed, 30 Dec 2020 16:57:42 -0600 From: "Brandon Bergren" To: "Piotr Kubaj" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: adf79abc35ff - main - Radix dump updates Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the main branch of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 22:58:10 -0000 [PowerPC] Update crash dump page tracking in Radix MMU Due to incorrect bookkeeping, the wrong pages were being dumped in some cases. Update the dump tracking to match the actual page liveness. Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=adf79abc35ff807644c5e43c3d4856b5a29e15ab > > commit adf79abc35ff807644c5e43c3d4856b5a29e15ab > Author: Justin Hibbits > AuthorDate: 2020-05-27 03:31:17 +0000 > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:28 +0000 > > Radix dump updates > --- > sys/powerpc/aim/mmu_radix.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c > index 5833739a25df..2373425afd30 100644 > --- a/sys/powerpc/aim/mmu_radix.c > +++ b/sys/powerpc/aim/mmu_radix.c > @@ -1216,6 +1216,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0; > @@ -1490,6 +1491,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct > rwlock **lockp) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* Entire chunk is free; return it. */ > m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m_pc->phys_addr); > mtx_lock(&pv_chunks_mutex); > TAILQ_REMOVE(&pv_chunks, pc, pc_lru); > break; > @@ -1579,6 +1581,7 @@ free_pv_chunk(struct pv_chunk *pc) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* entire chunk is free, return it */ > m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m->phys_addr); > vm_page_unwire_noq(m); > vm_page_free(m); > } > @@ -1639,6 +1642,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ > @@ -2095,6 +2099,10 @@ mmu_radix_late_bootstrap(vm_offset_t start, > vm_offset_t end) > pa = allocpages(DPCPU_SIZE >> PAGE_SHIFT); > dpcpu = (void *)PHYS_TO_DMAP(pa); > dpcpu_init(dpcpu, curcpu); > + > + crashdumpmap = (caddr_t)virtual_avail; > + virtual_avail += MAXDUMPPGS * PAGE_SIZE; > + > /* > * Reserve some special page table entries/VA space for temporary > * mapping of pages. > -- Brandon Bergren bdragon@FreeBSD.org