Lines Matching defs:bs
395 backing_store_t bs;
397 bs = (backing_store_t) kalloc(sizeof (struct backing_store));
398 if (bs == BACKING_STORE_NULL)
401 BS_LOCK_INIT(bs);
402 bs->bs_port = MACH_PORT_NULL;
403 bs->bs_priority = 0;
404 bs->bs_clsize = 0;
405 bs->bs_pages_total = 0;
406 bs->bs_pages_in = 0;
407 bs->bs_pages_in_fail = 0;
408 bs->bs_pages_out = 0;
409 bs->bs_pages_out_fail = 0;
411 return bs;
422 backing_store_t bs;
427 I see no reason for the test, the bs->port == port check below
436 queue_iterate(&backing_store_list.bsl_queue, bs, backing_store_t,
438 BS_LOCK(bs);
439 if (bs->bs_port == port) {
442 return bs;
444 BS_UNLOCK(bs);
454 __unused backing_store_t bs)
456 // MACH_PORT_FACE port = bs->bs_port;
552 backing_store_t bs;
560 bs = backing_store_alloc();
572 alias_struct->vs = (struct vstruct *)bs;
578 kfree(bs, sizeof (struct backing_store));
582 bs->bs_port = port;
589 bs->bs_priority = priority;
591 bs->bs_clsize = bs_get_global_clsize(atop_32(clsize));
594 queue_enter(&backing_store_list.bsl_queue, bs, backing_store_t,
598 backing_store_add(bs);
611 backing_store_t bs;
633 if ((bs = backing_store_lookup(backing_store)) == BACKING_STORE_NULL)
636 basic->bs_pages_total = bs->bs_pages_total;
638 bs->bs_pages_free = 0;
641 if (ps != PAGING_SEGMENT_NULL && ps->ps_bs == bs) {
643 bs->bs_pages_free += ps->ps_clcount << ps->ps_clshift;
648 basic->bs_pages_free = bs->bs_pages_free;
649 basic->bs_pages_in = bs->bs_pages_in;
650 basic->bs_pages_in_fail = bs->bs_pages_in_fail;
651 basic->bs_pages_out = bs->bs_pages_out;
652 basic->bs_pages_out_fail= bs->bs_pages_out_fail;
654 basic->bs_priority = bs->bs_priority;
655 basic->bs_clsize = ptoa_32(bs->bs_clsize); /* in bytes */
657 BS_UNLOCK(bs);
798 backing_store_t bs;
805 if ((bs = backing_store_lookup(backing_store)) == BACKING_STORE_NULL)
810 BS_UNLOCK(bs);
820 ps->ps_bs == bs &&
864 ps->ps_bs == bs &&
874 BS_UNLOCK(bs);
881 ps->ps_bs == bs) {
909 if((void *)bs->bs_port->alias != NULL)
910 kfree((void *) bs->bs_port->alias,
912 ipc_port_dealloc_kernel((ipc_port_t) (bs->bs_port));
913 bs->bs_port = MACH_PORT_NULL;
914 BS_UNLOCK(bs);
920 queue_remove(&backing_store_list.bsl_queue, bs, backing_store_t,
927 kfree(bs, sizeof *bs);
974 backing_store_t bs;
979 if ((bs = backing_store_lookup(backing_store))
996 BS_UNLOCK(bs);
1007 BS_UNLOCK(bs);
1019 ps->ps_clshift = local_log2(bs->bs_clsize);
1027 BS_UNLOCK(bs);
1035 ps->ps_bs = bs;
1040 BS_UNLOCK(bs);
1044 bs->bs_pages_free += ps->ps_clcount << ps->ps_clshift;
1045 bs->bs_pages_total += ps->ps_clcount << ps->ps_clshift;
1046 BS_UNLOCK(bs);
1073 MACH_PORT_FACE bs = MACH_PORT_NULL;
1092 &bs)) {
1093 if (!default_pager_add_segment(bs, device,
1097 ipc_port_release_receive(bs);
3715 backing_store_t bs;
3721 if ((bs = backing_store_lookup(backing_store))
3738 BS_UNLOCK(bs);
3749 BS_UNLOCK(bs);
3761 ps->ps_clshift = local_log2(bs->bs_clsize);
3769 BS_UNLOCK(bs);
3777 ps->ps_bs = bs;
3782 BS_UNLOCK(bs);
3786 bs->bs_pages_free += ps->ps_clcount << ps->ps_clshift;
3787 bs->bs_pages_total += ps->ps_clcount << ps->ps_clshift;
3792 BS_UNLOCK(bs);