Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/uma.h
Show First 20 Lines • Show All 229 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Definitions for uma_zcreate flags | * Definitions for uma_zcreate flags | ||||
* | * | ||||
* These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to | * These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to | ||||
* overlap when adding new features. | * overlap when adding new features. | ||||
*/ | */ | ||||
#define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */ | #define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */ | ||||
#define UMA_ZONE_CONTIG 0x0004 /* | |||||
jeff: I think this could be phrased better as a constraint than a statement of fact.
"Objects must… | |||||
Done Inline ActionsYeah, I'm having trouble phrasing this concisely with the right sense. I think your suggestion is okay. Here's another idea: "Each object must be internally physically contiguous." rlibby: Yeah, I'm having trouble phrasing this concisely with the right sense. I think your suggestion… | |||||
Done Inline ActionsYour proposed phrasing, specifically "Each object", is less likely to be misinterpreted. No description that fits in one line will be unambiguous, If you are willing to use two lines, I would suggest: "Physical memory underlying an object must be contiguous" alc: Your proposed phrasing, specifically "Each object", is less likely to be misinterpreted.
No… | |||||
Done Inline ActionsThanks, I'll use that. rlibby: Thanks, I'll use that. | |||||
* Physical memory underlying an object | |||||
* must be contiguous. | |||||
*/ | |||||
#define UMA_ZONE_NOTOUCH 0x0008 /* UMA may not access the memory */ | #define UMA_ZONE_NOTOUCH 0x0008 /* UMA may not access the memory */ | ||||
#define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */ | #define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */ | ||||
#define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */ | #define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */ | ||||
#define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */ | #define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */ | ||||
#define UMA_ZONE_VM 0x0080 /* | #define UMA_ZONE_VM 0x0080 /* | ||||
* Used for internal vm datastructures | * Used for internal vm datastructures | ||||
* only. | * only. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | |||||
void uma_zone_set_freef(uma_zone_t zone, uma_free freef); | void uma_zone_set_freef(uma_zone_t zone, uma_free freef); | ||||
/* | /* | ||||
* These flags are setable in the allocf and visible in the freef. | * These flags are setable in the allocf and visible in the freef. | ||||
*/ | */ | ||||
#define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ | #define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */ | ||||
#define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ | #define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kmem */ | ||||
#define UMA_SLAB_PRIV 0x08 /* Slab alloced from priv allocator */ | #define UMA_SLAB_PRIV 0x08 /* Slab alloced from priv allocator */ | ||||
#define UMA_SLAB_OFFP 0x10 /* Slab is managed separately */ | /* 0x02, 0x10, 0x40, and 0x80 are available */ | ||||
/* 0x02, 0x40, and 0x80 are available */ | |||||
Done Inline ActionsThis is gratuitous, but maybe related enough to sneak in here. rlibby: This is gratuitous, but maybe related enough to sneak in here. | |||||
Not Done Inline ActionsI don't mind. We could almost get rid of this field now. jeff: I don't mind.
We could almost get rid of this field now. | |||||
/* | /* | ||||
* Used to pre-fill a zone with some number of items | * Used to pre-fill a zone with some number of items | ||||
* | * | ||||
* Arguments: | * Arguments: | ||||
* zone The zone to fill | * zone The zone to fill | ||||
* itemcnt The number of items to reserve | * itemcnt The number of items to reserve | ||||
* | * | ||||
* Returns: | * Returns: | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
I think this could be phrased better as a constraint than a statement of fact.
"Objects must be physically contiguous"
Although that still seems to imply that somehow multiple objects are contiguous. We really want to express that a single object will be.