Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/miscfs/genfs



yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
> > See your point now. I think the window is very small (cf. the case when
> > mapout is left for aiodone) and this has a positive effect for glock.
> > 
> > Do you think such window has any relevant effect to the pager map?
> 
> you changed the code from:
> 
>       pagermapout
>       GOP_ALLOC
>       unlock glock
> 
> to:
> 
>       GOP_ALLOC
>       unlock glock
>       pagermapout
> 
> note that GOP_ALLOC is likely far more expensive than pagermapout.
> while your change makes the glock be released a little earlier,
> it makes pager map kept while doing potentially very expensive GOP_ALLOC.
> 
> so my guess is different from yours; a nagative effect is bigger.

Reasonable point. Check the attached patch, please.

-- 
Best regards,
Mindaugas
Index: genfs_io.c
===================================================================
RCS file: /cvsroot/src/sys/miscfs/genfs/genfs_io.c,v
retrieving revision 1.18
diff -u -p -r1.18 genfs_io.c
--- genfs_io.c  4 Feb 2009 20:32:19 -0000       1.18
+++ genfs_io.c  16 Feb 2009 13:57:55 -0000
@@ -574,6 +574,9 @@ loopdone:
                error = biowait(mbp);
        }
 
+       /* Remove the mapping (make KVA available as soon as possible) */
+       uvm_pagermapout(kva, npages);
+
        /*
         * if this we encountered a hole then we have to do a little more work.
         * for read faults, we marked the page PG_RDONLY so that future
@@ -615,7 +618,6 @@ loopdone:
        rw_exit(&gp->g_glock);
 
        putiobuf(mbp);
-       uvm_pagermapout(kva, npages);
 
        mutex_enter(&uobj->vmobjlock);
 


Home | Main Index | Thread Index | Old Index