Date: Thu, 14 May 2009 08:07:35 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-alpha@freebsd.org Cc: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= <des@des.no>, hackers@freebsd.org Subject: Re: PTE modified bit emulation trap Message-ID: <200905140807.35680.jhb@freebsd.org> In-Reply-To: <86tz3o4lb9.fsf@ds4.des.no> References: <86tz3o4lb9.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 13 May 2009 7:47:38 pm Dag-Erling Smørgrav wrote:
> Coverity complains about the lack of error checking in the following
> code in sys/kern/kern_sysctl.c, around line 1390:
>
> /*
> * Touch all the wired pages to avoid PTE modified
> * bit emulation traps on Alpha while holding locks
> * in the sysctl handler.
> */
> for (i = (wiredlen + PAGE_SIZE - 1) / PAGE_SIZE,
> cp = req->oldptr; i > 0; i--, cp += PAGE_SIZE) {
> copyin(cp, &dummy, 1);
> copyout(&dummy, cp, 1);
> }
>
> Since Alpha is dead, can we remove this, or is it still needed for other
> platforms?
I would check MIPS as it might have similar PTE bits as well (FOR, FOW) (many
Alpha things are similar to MIPS). I don't have my See MIPS Run handy or I
would check it myself. It might be better to replace the loop with a
vm_fault(..., VM_FAULT_DIRTY) though if that would have the same effect.
--
John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905140807.35680.jhb>
