From owner-freebsd-arm@FreeBSD.ORG Fri Jul 10 08:27:07 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42B741065672; Fri, 10 Jul 2009 08:27:07 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id EF5AD8FC0A; Fri, 10 Jul 2009 08:27:06 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from [10.0.0.43] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 4BC4FC3BB0; Fri, 10 Jul 2009 10:23:54 +0200 (CEST) Message-ID: <4A56FB72.9040807@semihalf.com> Date: Fri, 10 Jul 2009 10:27:30 +0200 From: Michal Hajduk User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Mark Tinguely References: <200907081551.n68FpFeM073177@casselton.net> In-Reply-To: <200907081551.n68FpFeM073177@casselton.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-arm@freebsd.org Subject: Re: pmap problem in FreeBSD current X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 08:27:07 -0000 Hi Mark, We've diagnosed the problem and it was related to arm_nocache_remap(). When the page was remaped into non-cacheable virtual memory region there was no dcache write-back operation, so count of free items in slab had differ value then should had. This write-back operation should have been done in pmap_set_cache_entry() but PVF_REF flag was missing so this part of code was omitted. I think that we should enable PVF_REF flag in pmap_enter_pv(). ================================================ diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 3cdab65..133dc6d 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -1683,7 +1683,7 @@ pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, /* PMAP_ASSERT_LOCKED(pmap_kernel()); */ pve->pv_pmap = pmap_kernel(); pve->pv_va = pg->md.pv_kva; - pve->pv_flags = PVF_WRITE | PVF_UNMAN; + pve->pv_flags = PVF_WRITE | PVF_UNMAN | PVF_REF; pg->md.pv_kva = 0; TAILQ_INSERT_HEAD(&pg->md.pv_list, pve, pv_list); ================================================= With this patch I've had no panics. Many thanks, MichaƂ Hajduk