Searched refs:rwb (Results 1 – 3 of 3) sorted by relevance
145 static inline bool rwb_enabled(struct rq_wb *rwb) in rwb_enabled() argument147 return rwb && rwb->enable_state != WBT_STATE_OFF_DEFAULT && in rwb_enabled()148 rwb->enable_state != WBT_STATE_OFF_MANUAL; in rwb_enabled()151 static void wb_timestamp(struct rq_wb *rwb, unsigned long *var) in wb_timestamp() argument153 if (rwb_enabled(rwb)) { in wb_timestamp()165 static bool wb_recent_wait(struct rq_wb *rwb) in wb_recent_wait() argument167 struct backing_dev_info *bdi = rwb->rqos.disk->bdi; in wb_recent_wait()172 static inline struct rq_wait *get_rq_wait(struct rq_wb *rwb, in get_rq_wait() argument176 return &rwb->rq_wait[WBT_RWQ_SWAP]; in get_rq_wait()178 return &rwb->rq_wait[WBT_RWQ_DISCARD]; in get_rq_wait()[all …]
53 static __always_inline int rwbase_read_trylock(struct rwbase_rt *rwb) in rwbase_read_trylock() argument61 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() argument71 struct rt_mutex_base *rtm = &rwb->rtmutex; in __rwbase_read_lock()107 trace_contention_begin(rwb, LCB_F_RT | LCB_F_READ); in __rwbase_read_lock()123 atomic_inc(&rwb->readers); in __rwbase_read_lock()128 trace_contention_end(rwb, ret); in __rwbase_read_lock()133 static __always_inline int rwbase_read_lock(struct rwbase_rt *rwb, in rwbase_read_lock() argument138 if (rwbase_read_trylock(rwb)) in rwbase_read_lock()[all …]
29 static __always_inline bool rw_base_is_locked(const struct rwbase_rt *rwb) in rw_base_is_locked() argument31 return atomic_read(&rwb->readers) != READER_BIAS; in rw_base_is_locked()34 static __always_inline bool rw_base_is_write_locked(const struct rwbase_rt *rwb) in rw_base_is_write_locked() argument36 return atomic_read(&rwb->readers) == WRITER_BIAS; in rw_base_is_write_locked()39 static __always_inline bool rw_base_is_contended(const struct rwbase_rt *rwb) in rw_base_is_contended() argument41 return atomic_read(&rwb->readers) > 0; in rw_base_is_contended()