geom_io.c (ac03832ef3afa26cc8e23bf5cfeaa32501b21c3e) geom_io.c (61322a0a8affb0c41dcf441ea331f041e15879ff)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 2002 Poul-Henning Kamp
5 * Copyright (c) 2002 Networks Associates Technology, Inc.
6 * Copyright (c) 2013 The FreeBSD Foundation
7 * All rights reserved.
8 *

--- 69 unchanged lines hidden (view full) ---

78 * Pace is a hint that we've had some trouble recently allocating
79 * bios, so we should back off trying to send I/O down the stack
80 * a bit to let the problem resolve. When pacing, we also turn
81 * off direct dispatch to also reduce memory pressure from I/Os
82 * there, at the expxense of some added latency while the memory
83 * pressures exist. See g_io_schedule_down() for more details
84 * and limitations.
85 */
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 2002 Poul-Henning Kamp
5 * Copyright (c) 2002 Networks Associates Technology, Inc.
6 * Copyright (c) 2013 The FreeBSD Foundation
7 * All rights reserved.
8 *

--- 69 unchanged lines hidden (view full) ---

78 * Pace is a hint that we've had some trouble recently allocating
79 * bios, so we should back off trying to send I/O down the stack
80 * a bit to let the problem resolve. When pacing, we also turn
81 * off direct dispatch to also reduce memory pressure from I/Os
82 * there, at the expxense of some added latency while the memory
83 * pressures exist. See g_io_schedule_down() for more details
84 * and limitations.
85 */
86static volatile u_int pace;
86static volatile u_int __read_mostly pace;
87
87
88static uma_zone_t biozone;
88static uma_zone_t __read_mostly biozone;
89
90/*
91 * The head of the list of classifiers used in g_io_request.
92 * Use g_register_classifier() and g_unregister_classifier()
93 * to add/remove entries to the list.
94 * Classifiers are invoked in registration order.
95 */
89
90/*
91 * The head of the list of classifiers used in g_io_request.
92 * Use g_register_classifier() and g_unregister_classifier()
93 * to add/remove entries to the list.
94 * Classifiers are invoked in registration order.
95 */
96static TAILQ_HEAD(g_classifier_tailq, g_classifier_hook)
97 g_classifier_tailq = TAILQ_HEAD_INITIALIZER(g_classifier_tailq);
96static TAILQ_HEAD(, g_classifier_hook) g_classifier_tailq __read_mostly =
97 TAILQ_HEAD_INITIALIZER(g_classifier_tailq);
98
99#include <machine/atomic.h>
100
101static void
102g_bioq_lock(struct g_bioq *bq)
103{
104
105 mtx_lock(&bq->bio_queue_lock);

--- 1022 unchanged lines hidden ---
98
99#include <machine/atomic.h>
100
101static void
102g_bioq_lock(struct g_bioq *bq)
103{
104
105 mtx_lock(&bq->bio_queue_lock);

--- 1022 unchanged lines hidden ---