A couple of follow-up questions:
1. Tracing fop_getpage() shows that the return value from
*(vp)->v_op->vop_getpage is usually 0 which indicates success. However, many
times I see 4096 which doesn't seem to correspond to an ERRxxx type value. What
is this telling me? Should I only investigate the dirty bit on a 0 return value?
2. When calls to fop_getpage() has a non-zero plarr parameter can I use this
list of page_t's to do my dirty-bit checking?
3. When calls does specify a null plarr parameter the addr parameter may be a
dummy value (e.g. a call from vpm_map_pages()), how do I determine the
corresponding page_t value that represents the page just read in? (For
non-dummy values then len/PAGESIZE calls to page_find using addr should get me
the value(s) I'm after.)
Also, I've noticed that in the pageout_scanner thread there is a situation when
it starts up at boot time and there is no pressure on the memory system, it
will do 4 sampling passes which ends up invoking checkpage() up to 1024 times
each pass. It's possible that in these 4096 pages one or more will be dirty and
it will attempt to swap them out. What I'm seeing that occasionally such pages
are found and that a putpage() request is being schedule for the pageout
thread. The I/O ends up being directed at the root device which may not have
been remounted r/w at this point in time. The consequence is a panic. Why is
the swap I/O being directed to / when I've defined no swap area on this device
anyway? The relevant portions of code appear to be:
if (pageout_sample_cnt < pageout_sample_lim) {
nscan_limit = total_pages;
:
:
while (nscan < nscan_limit && (freemem < lotsfree + needfree ||
pageout_sample_cnt < pageout_sample_lim)) {
:
:
if ((rvfront = checkpage(fronthand, FRONT)) == 1)
count = 0;
if ((rvback = checkpage(backhand, BACK)) == 1)
count = 0;
:
:
Note that if checkpage does return –1 then we don’t up the nscan value so we
will look until we find non-free pages
/*
* Don't include ineligible pages in the number scanned.
*/
if (rvfront != -1 || rvback != -1)
nscan++;
}
If the purpose of these passes is just to get some sampling data then couldn't
the pageout request be bypassed? (i.e. If (freemem >= lotsfree + needfree) then
we don’t bother queuing the page request.)
Neale
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code