if (shrinker->nr < 0) shrinker->nr = LONG_MAX;	/* It wrapped! */ 
if (shrinker->nr < 0) { printk(KERN_ERR "%s: nr=%ld\n", __FUNCTION__, shrinker->nr); shrinker->nr = max_pass; }  /* * Avoid risking looping forever due to too large nr value: * never try to free more than twice the estimate number of * freeable entries. */ if (shrinker->nr > max_pass * 2) shrinker->nr = max_pass * 2; 
static int shrink_slab(unsigned long scanned, gfp_t gfp_mask,			unsigned long lru_pages){	struct shrinker *shrinker;	int ret = 0;	if (scanned == 0)		scanned = SWAP_CLUSTER_MAX;	if (!down_read_trylock(&shrinker_rwsem))		return 1;	/* Assume we'll be able to shrink next time */	list_for_each_entry(shrinker, &shrinker_list, list) {		unsigned long long delta;		unsigned long total_scan;		delta = (4 * scanned) / shrinker->seeks;		delta *= (*shrinker->shrinker)(0, gfp_mask);		do_div(delta, lru_pages + 1);		shrinker->nr += delta;		if (shrinker->nr < 0)			shrinker->nr = LONG_MAX;	/* It wrapped! */		total_scan = shrinker->nr;		shrinker->nr = 0;		while (total_scan >= SHRINK_BATCH) {			long this_scan = SHRINK_BATCH;			int shrink_ret;			int nr_before;			nr_before = (*shrinker->shrinker)(0, gfp_mask);			shrink_ret = (*shrinker->shrinker)(this_scan, gfp_mask);			if (shrink_ret == -1)				break;			if (shrink_ret < nr_before)				ret += nr_before - shrink_ret;			mod_page_state(slabs_scanned, this_scan);			total_scan -= this_scan;			cond_resched();		}		shrinker->nr += total_scan;	}	up_read(&shrinker_rwsem);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ea164d73a7a0b2b2be3a1d8c2a8a4dab8999fa9c/vmscan.c/clean/mm/vmscan.c