Home
last modified time | relevance | path

Searched refs:rwb (Results 1 – 4 of 4) sorted by relevance

/linux-6.1.9/block/
Dblk-wbt.c78 static inline bool rwb_enabled(struct rq_wb *rwb) in rwb_enabled() argument
80 return rwb && rwb->enable_state != WBT_STATE_OFF_DEFAULT && in rwb_enabled()
81 rwb->wb_normal != 0; in rwb_enabled()
84 static void wb_timestamp(struct rq_wb *rwb, unsigned long *var) in wb_timestamp() argument
86 if (rwb_enabled(rwb)) { in wb_timestamp()
98 static bool wb_recent_wait(struct rq_wb *rwb) in wb_recent_wait() argument
100 struct bdi_writeback *wb = &rwb->rqos.q->disk->bdi->wb; in wb_recent_wait()
105 static inline struct rq_wait *get_rq_wait(struct rq_wb *rwb, in get_rq_wait() argument
109 return &rwb->rq_wait[WBT_RWQ_KSWAPD]; in get_rq_wait()
111 return &rwb->rq_wait[WBT_RWQ_DISCARD]; in get_rq_wait()
[all …]
Dblk-wbt.h78 static inline unsigned int wbt_inflight(struct rq_wb *rwb) in wbt_inflight() argument
83 ret += atomic_read(&rwb->rq_wait[i].inflight); in wbt_inflight()
/linux-6.1.9/kernel/locking/
Drwbase_rt.c53 static __always_inline int rwbase_read_trylock(struct rwbase_rt *rwb) in rwbase_read_trylock() argument
61 for (r = atomic_read(&rwb->readers); r < 0;) { in rwbase_read_trylock()
62 if (likely(atomic_try_cmpxchg_acquire(&rwb->readers, &r, r + 1))) in rwbase_read_trylock()
68 static int __sched __rwbase_read_lock(struct rwbase_rt *rwb, in __rwbase_read_lock() argument
71 struct rt_mutex_base *rtm = &rwb->rtmutex; in __rwbase_read_lock()
79 if (atomic_read(&rwb->readers) != WRITER_BIAS) { in __rwbase_read_lock()
80 atomic_inc(&rwb->readers); in __rwbase_read_lock()
115 trace_contention_begin(rwb, LCB_F_RT | LCB_F_READ); in __rwbase_read_lock()
131 atomic_inc(&rwb->readers); in __rwbase_read_lock()
136 trace_contention_end(rwb, ret); in __rwbase_read_lock()
[all …]
/linux-6.1.9/include/linux/
Drwbase_rt.h29 static __always_inline bool rw_base_is_locked(struct rwbase_rt *rwb) in rw_base_is_locked() argument
31 return atomic_read(&rwb->readers) != READER_BIAS; in rw_base_is_locked()
34 static __always_inline bool rw_base_is_contended(struct rwbase_rt *rwb) in rw_base_is_contended() argument
36 return atomic_read(&rwb->readers) > 0; in rw_base_is_contended()