svn commit: r307650 - head/sys/kern

Mateusz Guzik mjguzik at gmail.com
Thu Oct 20 11:50:41 UTC 2016


On Wed, Oct 19, 2016 at 03:09:42PM -0700, Gleb Smirnoff wrote:
> On Wed, Oct 19, 2016 at 06:29:52PM +0000, Mateusz Guzik wrote:
> M> Author: mjg
> M> Date: Wed Oct 19 18:29:52 2016
> M> New Revision: 307650
> M> URL: https://svnweb.freebsd.org/changeset/base/307650
> M> 
> M> Log:
> M>   cache: split negative entry LRU into multiple lists
> M>   
> M>   This splits the ncneg_mtx lock while preserving the hit ratio at least
> M>   during buildworld.
> M>   
> M>   Create N dedicated lists for new negative entries.
> M>   
> M>   Entries with at least one hit get promoted to the hot list, where they
> M>   get requeued every M hits.
> M>   
> M>   Shrinking demotes one hot entry and performs a round-robin shrinking of
> M>   regular lists.
> M>   
> M>   Reviewed by:	kib
> 
> This instapanics:
> 
> panic: Assertion ncp->nc_flag & NCF_NEGATIVE failed at /usr/src/head/sys/kern/vfs_cache.c:815
> 

It definitely works for me and I don't see how the condition can fail.

Given the 'instapanic' note, I assume you can easily reproduce. Is this
a stock head kernel?

Can you reproduce with;

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index a112808..a8bd5eb 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -812,6 +812,11 @@ cache_negative_zap_one(void)
                goto out;
        }
 
+       if (!(ncp->nc_flag & NCF_NEGATIVE)) {
+               panic("%s: ncp %p flag %x dvp %p vp %p\n", __func__, ncp,
+                   ncp->nc_flag, ncp->nc_dvp, ncp->nc_vp);
+       }
+
        MPASS(ncp->nc_flag & NCF_NEGATIVE);
        dvlp = VP2VNODELOCK(ncp->nc_dvp);
        blp = NCP2BUCKETLOCK(ncp);


-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-head mailing list