@@ -29,7 +29,7 @@ typedef struct {
2929 uint64_t expired_unfetched ;
3030 uint64_t evicted_unfetched ;
3131 uint64_t crawler_reclaimed ;
32- uint64_t reflocked ;
32+ uint64_t lrutail_reflocked ;
3333} itemstats_t ;
3434
3535static item * heads [LARGEST_ID ];
@@ -107,7 +107,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags,
107107 /* do a quick check if we have any expired items in the tail.. */
108108 int tries = 5 ;
109109 /* Avoid hangs if a slab has nothing but refcounted stuff in it. */
110- int tries_reflocked = 1000 ;
110+ int tries_lrutail_reflocked = 1000 ;
111111 int tried_alloc = 0 ;
112112 item * search ;
113113 item * next_it ;
@@ -136,10 +136,10 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags,
136136 if (refcount_incr (& search -> refcount ) != 2 ) {
137137 /* Avoid pathological case with ref'ed items in tail */
138138 do_item_update_nolock (search );
139- tries_reflocked -- ;
139+ tries_lrutail_reflocked -- ;
140140 tries ++ ;
141141 refcount_decr (& search -> refcount );
142- itemstats [id ].reflocked ++ ;
142+ itemstats [id ].lrutail_reflocked ++ ;
143143 /* Old rare bug could cause a refcount leak. We haven't seen
144144 * it in years, but we leave this code in to prevent failures
145145 * just in case */
@@ -152,7 +152,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags,
152152 if (hold_lock )
153153 item_trylock_unlock (hold_lock );
154154
155- if (tries_reflocked < 1 )
155+ if (tries_lrutail_reflocked < 1 )
156156 break ;
157157
158158 continue ;
@@ -477,7 +477,7 @@ void do_item_stats_totals(ADD_STAT add_stats, void *c) {
477477 totals .evicted += itemstats [i ].evicted ;
478478 totals .reclaimed += itemstats [i ].reclaimed ;
479479 totals .crawler_reclaimed += itemstats [i ].crawler_reclaimed ;
480- totals .reflocked += itemstats [i ].reflocked ;
480+ totals .lrutail_reflocked += itemstats [i ].lrutail_reflocked ;
481481 }
482482 APPEND_STAT ("expired_unfetched" , "%llu" ,
483483 (unsigned long long )totals .expired_unfetched );
@@ -489,8 +489,8 @@ void do_item_stats_totals(ADD_STAT add_stats, void *c) {
489489 (unsigned long long )totals .reclaimed );
490490 APPEND_STAT ("crawler_reclaimed" , "%llu" ,
491491 (unsigned long long )totals .crawler_reclaimed );
492- APPEND_STAT ("reflocked " , "%llu" ,
493- (unsigned long long )totals .reflocked );
492+ APPEND_STAT ("lrutail_reflocked " , "%llu" ,
493+ (unsigned long long )totals .lrutail_reflocked );
494494}
495495
496496void do_item_stats (ADD_STAT add_stats , void * c ) {
@@ -525,8 +525,8 @@ void do_item_stats(ADD_STAT add_stats, void *c) {
525525 "%llu" , (unsigned long long )itemstats [i ].evicted_unfetched );
526526 APPEND_NUM_FMT_STAT (fmt , i , "crawler_reclaimed" ,
527527 "%llu" , (unsigned long long )itemstats [i ].crawler_reclaimed );
528- APPEND_NUM_FMT_STAT (fmt , i , "reflocked " ,
529- "%llu" , (unsigned long long )itemstats [i ].reflocked );
528+ APPEND_NUM_FMT_STAT (fmt , i , "lrutail_reflocked " ,
529+ "%llu" , (unsigned long long )itemstats [i ].lrutail_reflocked );
530530 }
531531 }
532532
0 commit comments