Lines Matching defs:queue
120 static buf_t getnewbuf(int slpflag, int slptimeo, int *queue);
1245 * were moved to the bclean queue but
1267 * this lock protects the queue manipulation
1298 * this lock protects the queue manipulation
1519 /* create a thread to do dynamic buffer queue balancing */
1744 * sure the buf is on the correct vnode queue. We have
1770 * make sure it's on the correct vnode queue. (async operatings
2057 * clean it up a bit and put it on the EMPTY queue
2103 * queue, so that it'll stick around for as long as possible.
2353 int queue = BQ_EMPTY; /* Start with no preference */
2364 if ((bp = getnewbuf(slpflag, slptimeo, &queue)) == NULL)
2390 * so that when buffer is released it will goto META queue
2531 int queue = BQ_EMPTY;
2535 while ((bp = getnewbuf(0, 0, &queue)) == 0)
2540 assert(queue == BQ_EMPTY);
2642 * Request for a queue is passes in. The queue from which the buffer was taken
2643 * from is returned. Out of range queue requests get BQ_EMPTY. Request for
2653 * Remove the buffer from the hash. Return the buffer and the queue
2661 getnewbuf(int slpflag, int slptimeo, int * queue)
2668 int req = *queue; /* save it for restarts */
2673 * invalid request gets empty queue
2675 if ((*queue >= BQUEUES) || (*queue < 0)
2676 || (*queue == BQ_LAUNDRY) || (*queue == BQ_LOCKED))
2677 *queue = BQ_EMPTY;
2680 if (*queue == BQ_EMPTY && (bp = bufqueues[*queue].tqh_first))
2695 /* Try for the requested queue first */
2696 bp = bufqueues[*queue].tqh_first;
2700 /* Unable to use requested queue */
2712 *queue = BQ_EMPTY;
2733 *queue = BQ_EMPTY;
2760 *queue = -1;
2765 *queue = BQ_LRU;
2768 *queue = BQ_AGE;
2776 *queue = BQ_AGE;
2784 *queue = BQ_LRU;
2787 *queue = BQ_AGE;
2794 *queue = BQ_META;
2804 bp_is_stale = (*queue == BQ_LRU) ?
2810 *queue = BQ_META;
2823 *queue = req;
2842 /* Remove from the queue */
2851 * it on the LAUNDRY queue, and return 1
3285 * Return a count of buffers on the "locked" queue.
3495 * Remove from the queue
3524 /* we never leave a busy page on the laundary queue */
3722 /* Per queue tunable limits */
3726 blsize_t bl_num; /* number of buffer headers on the queue */
3747 * Defining it blsize_t as long permits 2^31 buffer headers per queue.
3748 * Which can describe (2^31 * PAGE_SIZE) memory per queue.
3777 * the size of the LRU close to bl_target. Buffers on a queue would
3835 /* LOCKED queue */
3841 /* LRU queue */
3847 /* AGE queue */
3853 /* EMPTY queue */
3859 /* META queue */
3865 /* LAUNDRY queue */
3886 int q; /* buffer queue to process */
3904 /* Seed for the buffer queue balancing */
3908 /* Start with AGE queue */
3912 /* Pick next buffer queue to balance */
3934 /* LOCKED or LAUNDRY queue MUST not be balanced */
3940 /* If queue has less than target nothing more to do */
3949 /* EMPTY queue needs special handling */
3985 * reclaim upto 'n' struct buf from the empty queue.