[...]
> We can see MADV_WILLNEED indeed causes a early
> faulting page in (as_faulta). Whereas MADV_DONTNEED
> will flag the page for async invalidate.
> 
> Haven't found any callers in the kernel calling into
> "memcntl" though. Any ideas?

I think you may be under a misapprehension.  memcntl(2) is a system call;
system calls are usually called by user or library code, rarely if ever by other
kernel code (although similar system calls may call the same underlying 
functions).

The madvise(3c) library routine simply calls memcntl(2) with the appropriate 
arguments:
int
madvise(caddr_t addr, size_t len, int advice)
{
        return (memcntl(addr, len, MC_ADVISE, (caddr_t)(intptr_t)advice, 0, 0));
}
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to