Lines Matching full:consumer
47 * The thread that is writing the hardware descriptors is the consumer and it
48 * runs with the consumer lock held. A producer becomes the consumer if there
49 * isn't one already. The consumer runs with the flags sets to BUSY and
52 * TOO_BUSY consumer will become the new consumer by setting flags to
53 * TAKING_OVER. The original consumer stops and sets the flags back to BUSY for
54 * the new consumer.
75 BUSY, /* consumer is running already, or will be shortly. */
76 TOO_BUSY, /* consumer is running and is beyond its budget */
77 TAKING_OVER, /* new consumer taking over from a TOO_BUSY consumer */
78 STALLED, /* consumer stopped due to lack of resources. */
111 * Consumer. Called with the consumer lock held and a guarantee that there is
284 for (i = 0; i < nitems(r->consumer); i++) { in mp_ring_alloc()
285 if ((r->consumer[i] = counter_u64_alloc(flags)) == NULL) in mp_ring_alloc()
318 for (i = 0; i < nitems(r->consumer); i++) { in mp_ring_free()
319 if (r->consumer[i] != NULL) in mp_ring_free()
320 counter_u64_free(r->consumer[i]); in mp_ring_free()
349 bool consumer; in mp_ring_enqueue() local
415 counter_u64_add(r->consumer[C_FAST], 1); in mp_ring_enqueue()
446 consumer = false; in mp_ring_enqueue()
452 consumer = true; in mp_ring_enqueue()
459 if (consumer) in mp_ring_enqueue()
466 MPASS(cons > C_FAST && cons < nitems(r->consumer)); in mp_ring_enqueue()
467 counter_u64_add(r->consumer[cons], 1); in mp_ring_enqueue()
508 for (i = 0; i < nitems(r->consumer); i++) in mp_ring_reset_stats()
509 counter_u64_zero(r->consumer[i]); in mp_ring_reset_stats()
548 CTLFLAG_RD, &r->consumer[C_FAST], in mp_ring_sysctls()
549 "# of times producer became consumer (fast)"); in mp_ring_sysctls()
551 CTLFLAG_RD, &r->consumer[C_2], in mp_ring_sysctls()
552 "# of times producer became consumer (2)"); in mp_ring_sysctls()
554 CTLFLAG_RD, &r->consumer[C_3], in mp_ring_sysctls()
555 "# of times producer became consumer (3)"); in mp_ring_sysctls()
557 CTLFLAG_RD, &r->consumer[C_TAKEOVER], in mp_ring_sysctls()
558 "# of times producer took over from another consumer."); in mp_ring_sysctls()
561 "# of times producer did not become consumer"); in mp_ring_sysctls()
563 CTLFLAG_RD, &r->abdications, "# of consumer abdications"); in mp_ring_sysctls()
565 CTLFLAG_RD, &r->stalls, "# of consumer stalls"); in mp_ring_sysctls()
568 "# of times consumer ran fully to completion"); in mp_ring_sysctls()
571 "# of times consumer idled when another enqueue was in progress"); in mp_ring_sysctls()