Date: Tue, 20 Apr 2010 03:20:20 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r206884 - user/kmacy/head_page_lock_2/sys/amd64/amd64 Message-ID: <201004200320.o3K3KKKx098990@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Tue Apr 20 03:20:20 2010 New Revision: 206884 URL: http://svn.freebsd.org/changeset/base/206884 Log: in pmap_protect only call tryrelock if the page is managed and either the accessed or modified bit is set Modified: user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Modified: user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c ============================================================================== --- user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Tue Apr 20 03:02:54 2010 (r206883) +++ user/kmacy/head_page_lock_2/sys/amd64/amd64/pmap.c Tue Apr 20 03:20:20 2010 (r206884) @@ -3317,21 +3317,18 @@ retry: obits = pbits = *pte; if ((pbits & PG_V) == 0) continue; - if (pbits & PG_MANAGED) { - m = NULL; + if ((pbits & PG_MANAGED) && + (pbits & (PG_M | PG_A))) { if (pa_tryrelock(pmap, pbits & PG_FRAME, &pa)) goto restart; + + m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); if (pbits & PG_A) { - m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); vm_page_flag_set(m, PG_REFERENCED); pbits &= ~PG_A; } - if ((pbits & (PG_M | PG_RW)) == (PG_M | PG_RW)) { - if (m == NULL) - m = PHYS_TO_VM_PAGE(pbits & - PG_FRAME); + if ((pbits & (PG_M | PG_RW)) == (PG_M | PG_RW)) vm_page_dirty(m); - } } if ((prot & VM_PROT_WRITE) == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004200320.o3K3KKKx098990>