/kernel/linux/linux-5.10/lib/ |
D | sbitmap.c | 324 static unsigned int sbq_calc_wake_batch(struct sbitmap_queue *sbq, in sbq_calc_wake_batch() argument 346 shallow_depth = min(1U << sbq->sb.shift, sbq->min_shallow_depth); in sbq_calc_wake_batch() 347 depth = ((depth >> sbq->sb.shift) * shallow_depth + in sbq_calc_wake_batch() 348 min(depth & ((1U << sbq->sb.shift) - 1), shallow_depth)); in sbq_calc_wake_batch() 355 int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth, in sbitmap_queue_init_node() argument 361 ret = sbitmap_init_node(&sbq->sb, depth, shift, flags, node); in sbitmap_queue_init_node() 365 sbq->alloc_hint = alloc_percpu_gfp(unsigned int, flags); in sbitmap_queue_init_node() 366 if (!sbq->alloc_hint) { in sbitmap_queue_init_node() 367 sbitmap_free(&sbq->sb); in sbitmap_queue_init_node() 373 *per_cpu_ptr(sbq->alloc_hint, i) = prandom_u32() % depth; in sbitmap_queue_init_node() [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | sbitmap.h | 366 int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth, 374 static inline void sbitmap_queue_free(struct sbitmap_queue *sbq) in sbitmap_queue_free() argument 376 kfree(sbq->ws); in sbitmap_queue_free() 377 free_percpu(sbq->alloc_hint); in sbitmap_queue_free() 378 sbitmap_free(&sbq->sb); in sbitmap_queue_free() 390 void sbitmap_queue_resize(struct sbitmap_queue *sbq, unsigned int depth); 399 int __sbitmap_queue_get(struct sbitmap_queue *sbq); 414 int __sbitmap_queue_get_shallow(struct sbitmap_queue *sbq, 426 static inline int sbitmap_queue_get(struct sbitmap_queue *sbq, in sbitmap_queue_get() argument 432 nr = __sbitmap_queue_get(sbq); in sbitmap_queue_get() [all …]
|
/kernel/linux/linux-5.10/drivers/dma/idxd/ |
D | submit.c | 28 struct sbitmap_queue *sbq; in idxd_alloc_desc() local 33 sbq = &wq->sbq; in idxd_alloc_desc() 34 idx = sbitmap_queue_get(sbq, &cpu); in idxd_alloc_desc() 42 ws = &sbq->ws[0]; in idxd_alloc_desc() 44 sbitmap_prepare_to_wait(sbq, ws, &wait, TASK_INTERRUPTIBLE); in idxd_alloc_desc() 47 idx = sbitmap_queue_get(sbq, &cpu); in idxd_alloc_desc() 53 sbitmap_finish_wait(sbq, ws, &wait); in idxd_alloc_desc() 65 sbitmap_queue_clear(&wq->sbq, desc->id, cpu); in idxd_free_desc()
|
D | idxd.h | 123 struct sbitmap_queue sbq; member
|
D | device.c | 157 rc = sbitmap_queue_init_node(&wq->sbq, num_descs, -1, false, GFP_KERNEL, in idxd_wq_alloc_resources() 195 sbitmap_queue_free(&wq->sbq); in idxd_wq_free_resources()
|
/kernel/linux/linux-5.10/drivers/staging/qlge/ |
D | qlge_main.c | 1149 sbq_fail = !!qlge_refill_bq(&rx_ring->sbq, gfp); in ql_update_buffer_queues() 1158 if ((sbq_fail && QLGE_BQ_HW_OWNED(&rx_ring->sbq) < 2) || in ql_update_buffer_queues() 1559 struct qlge_bq_desc *sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); in ql_process_mac_rx_skb() 1694 sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); in ql_build_rx_skb() 1724 sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); in ql_build_rx_skb() 1734 sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); in ql_build_rx_skb() 1807 sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); in ql_build_rx_skb() 2756 struct qlge_bq_desc *sbq_desc = &rx_ring->sbq.queue[i]; in ql_free_sbq_buffers() 2785 if (rx_ring->sbq.queue) in ql_free_rx_buffers() 2836 if (rx_ring->sbq.base) { in ql_free_rx_resources() [all …]
|
D | qlge_dbg.c | 1775 netdev_err(qdev->ndev, "rx_ring->sbq.base = %p\n", rx_ring->sbq.base); in ql_dump_rx_ring() 1777 (unsigned long long)rx_ring->sbq.base_dma); in ql_dump_rx_ring() 1779 rx_ring->sbq.base_indirect); in ql_dump_rx_ring() 1781 (unsigned long long)rx_ring->sbq.base_indirect_dma); in ql_dump_rx_ring() 1782 netdev_err(qdev->ndev, "rx_ring->sbq = %p\n", rx_ring->sbq.queue); in ql_dump_rx_ring() 1784 rx_ring->sbq.prod_idx_db_reg); in ql_dump_rx_ring() 1785 netdev_err(qdev->ndev, "rx_ring->sbq.next_to_use = %d\n", rx_ring->sbq.next_to_use); in ql_dump_rx_ring() 1786 netdev_err(qdev->ndev, "rx_ring->sbq.next_to_clean = %d\n", rx_ring->sbq.next_to_clean); in ql_dump_rx_ring()
|
D | qlge.h | 1441 offsetof(struct rx_ring, sbq) : \ 1481 struct qlge_bq sbq; member
|
/kernel/linux/linux-5.10/drivers/target/iscsi/ |
D | iscsi_target_util.c | 147 struct sbitmap_queue *sbq; in iscsit_wait_for_tag() local 152 sbq = &se_sess->sess_tag_pool; in iscsit_wait_for_tag() 153 ws = &sbq->ws[0]; in iscsit_wait_for_tag() 155 sbitmap_prepare_to_wait(sbq, ws, &wait, state); in iscsit_wait_for_tag() 158 tag = sbitmap_queue_get(sbq, cpup); in iscsit_wait_for_tag() 164 sbitmap_finish_wait(sbq, ws, &wait); in iscsit_wait_for_tag()
|
/kernel/linux/linux-5.10/block/ |
D | blk-mq.c | 1146 struct sbitmap_queue *sbq; in blk_mq_dispatch_wake() local 1149 sbq = hctx->tags->bitmap_tags; in blk_mq_dispatch_wake() 1150 atomic_dec(&sbq->ws_active); in blk_mq_dispatch_wake() 1167 struct sbitmap_queue *sbq = hctx->tags->bitmap_tags; in blk_mq_mark_tag_wait() local 1190 wq = &bt_wait_ptr(sbq, hctx)->wait; in blk_mq_mark_tag_wait() 1200 atomic_inc(&sbq->ws_active); in blk_mq_mark_tag_wait() 1221 atomic_dec(&sbq->ws_active); in blk_mq_mark_tag_wait()
|
D | kyber-iosched.c | 490 khd->domain_wait[i].sbq = NULL; in kyber_init_hctx()
|