Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2012 14:18:39 -0500
From:      Mark Tinguely <marktinguely@gmail.com>
To:        vasanth rao naik sabavat <vasanth.raonaik@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: question about amd64 pagetable page allocation.
Message-ID:  <CAP%2BM-_F5GPO25CURVYV_V1nX1Ua=O2A_%2B0Th%2BtDZXC8wVjr76g@mail.gmail.com>
In-Reply-To: <CAAuizBgAPu9n=gAubVZXxdyboaH1BT_sxQu-jAJB1QSpbn%2BO4g@mail.gmail.com>
References:  <CAAuizBhUuWvbYjZewO5LgHPuGfi37mW0sJFAKs-YN-G1ZbNAUQ@mail.gmail.com> <CAP%2BM-_Es5A3a0%2BcM6K=qi_kbk0ftnHHmZoazuerhg3TxrVr6SA@mail.gmail.com> <CAAuizBh0M_wpUvWU%2B0-CMC9XveqQNXOqtB92NhABnGGUVuq4DQ@mail.gmail.com> <CAP%2BM-_E%2BwsDRPd6JiO4M-MEsYERnGcA-oR-ckWAeEE7kWwrfmw@mail.gmail.com> <CAAuizBgAPu9n=gAubVZXxdyboaH1BT_sxQu-jAJB1QSpbn%2BO4g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 3, 2012 at 1:52 PM, vasanth rao naik sabavat
<vasanth.raonaik@gmail.com> wrote:
> Hello Mark,
>
> I think pmap_remove_pages() is executed only for the current process.
>
> =A0=A0 2549 #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY
> =A0=A0 2550 =A0=A0=A0 if (pmap !=3D vmspace_pmap(curthread->td_proc->p_vm=
space)) {
> =A0=A0 2551 =A0=A0=A0 =A0=A0=A0 printf("warning: pmap_remove_pages called=
 with non-current
> pmap\n");
> =A0=A0 2552 =A0=A0=A0 =A0=A0=A0 return;
> =A0=A0 2553 =A0=A0=A0 }
> =A0=A0 2554 #endif
>
> I dont still get it why this was removed?
>
> Thanks,
> Vasanth


That is pretty old code. Newer code does not make that assumption.

Without the assumption that the pages are from the current map, then you
have to use the direct physical -> virtual mapping:

2547 	#ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY
2548 	pte =3D vtopte(pv->pv_va);
2549 	#else
2550 	pte =3D pmap_pte(pmap, pv->pv_va);
2551 	#endif

--Mark Tinguely.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP%2BM-_F5GPO25CURVYV_V1nX1Ua=O2A_%2B0Th%2BtDZXC8wVjr76g>