X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=mm%2Fslab_vs.h;fp=mm%2Fslab_vs.h;h=d1d674f8bc0687b850218c047bb13c538a32cac0;hb=76828883507a47dae78837ab5dec5a5b4513c667;hp=0000000000000000000000000000000000000000;hpb=64ba3f394c830ec48a1c31b53dcae312c56f1604;p=linux-2.6.git diff --git a/mm/slab_vs.h b/mm/slab_vs.h new file mode 100644 index 000000000..d1d674f8b --- /dev/null +++ b/mm/slab_vs.h @@ -0,0 +1,27 @@ + +#include + +#include + +static inline +void vx_slab_alloc(struct kmem_cache *cachep, gfp_t flags) +{ + int what = gfp_zone(cachep->gfpflags); + + if (!current->vx_info) + return; + + atomic_add(cachep->buffer_size, ¤t->vx_info->cacct.slab[what]); +} + +static inline +void vx_slab_free(struct kmem_cache *cachep) +{ + int what = gfp_zone(cachep->gfpflags); + + if (!current->vx_info) + return; + + atomic_sub(cachep->buffer_size, ¤t->vx_info->cacct.slab[what]); +} +