View | Details | Raw Unified | Return to bug 241048 | Differences between
and this patch

Collapse All | Expand All

(-)sys/vm/uma_core.c (-1 / +5 lines)
Lines 521-526 zone_foreach_keg(uma_zone_t zone, void (*kegfn)(um Link Here
521
{
521
{
522
	uma_klink_t klink;
522
	uma_klink_t klink;
523
523
524
	if ((zone->uz_flags & UMA_ZFLAG_CACHE) != 0)
525
		return;
524
	LIST_FOREACH(klink, &zone->uz_kegs, kl_link)
526
	LIST_FOREACH(klink, &zone->uz_kegs, kl_link)
525
		kegfn(klink->kl_keg);
527
		kegfn(klink->kl_keg);
526
}
528
}
Lines 1978-1983 zone_foreach(void (*zfunc)(uma_zone_t)) Link Here
1978
		LIST_FOREACH(zone, &keg->uk_zones, uz_link)
1980
		LIST_FOREACH(zone, &keg->uk_zones, uz_link)
1979
			zfunc(zone);
1981
			zfunc(zone);
1980
	}
1982
	}
1983
	LIST_FOREACH(zone, &uma_cachezones, uz_link)
1984
		zfunc(zone);
1981
	rw_runlock(&uma_rwlock);
1985
	rw_runlock(&uma_rwlock);
1982
}
1986
}
1983
1987
Lines 2282-2288 uma_zcache_create(char *name, int size, uma_ctor c Link Here
2282
	args.release = zrelease;
2286
	args.release = zrelease;
2283
	args.arg = arg;
2287
	args.arg = arg;
2284
	args.align = 0;
2288
	args.align = 0;
2285
	args.flags = flags;
2289
	args.flags = flags | UMA_ZFLAG_CACHE;
2286
2290
2287
	return (zone_alloc_item(zones, &args, UMA_ANYDOMAIN, M_WAITOK));
2291
	return (zone_alloc_item(zones, &args, UMA_ANYDOMAIN, M_WAITOK));
2288
}
2292
}
(-)sys/vm/uma_int.h (+1 lines)
Lines 374-379 struct uma_zone { Link Here
374
/*
374
/*
375
 * These flags must not overlap with the UMA_ZONE flags specified in uma.h.
375
 * These flags must not overlap with the UMA_ZONE flags specified in uma.h.
376
 */
376
 */
377
#define	UMA_ZFLAG_CACHE		0x02000000	/* uma_zcache_create()d it */
377
#define	UMA_ZFLAG_MULTI		0x04000000	/* Multiple kegs in the zone. */
378
#define	UMA_ZFLAG_MULTI		0x04000000	/* Multiple kegs in the zone. */
378
#define	UMA_ZFLAG_DRAINING	0x08000000	/* Running zone_drain. */
379
#define	UMA_ZFLAG_DRAINING	0x08000000	/* Running zone_drain. */
379
#define	UMA_ZFLAG_BUCKET	0x10000000	/* Bucket zone. */
380
#define	UMA_ZFLAG_BUCKET	0x10000000	/* Bucket zone. */

Return to bug 241048