My mistake. As you both correctly pointed out, refcnt needs to be 1 for reclaim. It is initialized with 2. So some must be doing an unref()/put() to make it 1.
On 8/4/17, Daniel Gryniewicz <d...@redhat.com> wrote: > On 08/04/2017 01:14 PM, Pradeep wrote: >> Hello, >> >> I'm hitting a case where mdcache keeps growing well beyond the high >> water mark. Here is a snapshot of the lru_state: >> >> 1 = {entries_hiwat = 100000, entries_used = 2306063, chunks_hiwat = >> 100000, chunks_used = 16462, >> >> It has grown to 2.3 million entries and each entry is ~1.6K. >> >> I looked at the first entry in lane 0, L1 queue: >> >> (gdb) p LRU[0].L1 >> $9 = {q = {next = 0x7fad64256f00, prev = 0x7faf21a1bc00}, id = >> LRU_ENTRY_L1, size = 254628} >> (gdb) p (mdcache_entry_t *)(0x7fad64256f00-1024) >> $10 = (mdcache_entry_t *) 0x7fad64256b00 >> (gdb) p $10->lru >> $11 = {q = {next = 0x7fad65ea0f00, prev = 0x7d67c0 <LRU>}, qid = >> LRU_ENTRY_L1, refcnt = 2, flags = 0, lane = 0, cf = 0} >> (gdb) p $10->fh_hk.inavl >> $13 = true >> >> Lane 1: >> (gdb) p LRU[1].L1 >> $18 = {q = {next = 0x7fad625c0300, prev = 0x7faec08c5100}, id = >> LRU_ENTRY_L1, size = 253006} >> (gdb) p (mdcache_entry_t *)(0x7fad625c0300 - 1024) >> $21 = (mdcache_entry_t *) 0x7fad625bff00 >> (gdb) p $21->lru >> $22 = {q = {next = 0x7fad66fce600, prev = 0x7d68a0 <LRU+224>}, qid = >> LRU_ENTRY_L1, refcnt = 2, flags = 0, lane = 1, cf = 1} >> >> (gdb) p $21->fh_hk.inavl >> $24 = true >> >> As per LRU_ENTRY_RECLAIMABLE(), these entry should be reclaimable. Not >> sure why it is not able to claim it. Any ideas? >> > > refcnt == 2 is not reclaimable. Reclaimable is refcnt == 1. It checks > for 2 because it just took a ref. Unless you're actually processing > that lane, and so seeing the ref taken during that processing, refcnt > will be 3 when processing, and it won't be reclaimed. > > Daniel > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel