raw_seqcount_try_begin(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the raw_seqcount_try_begin(9) page from the Kernel API Manual πŸ’…βœ¨. The main character here is raw_seqcount_try_begin β€” its whole job is beginning a seqcount_t read critical section w/o lockdep and w/o counter stabilization πŸŽ€. That's literally the name drop; no cap.

✨ SYNOPSIS ✨

the signature is giving exactly this:

raw_seqcount_try_begin (s , start );

πŸŽ€ ARGUMENTS πŸŽ€

  • s β€” Pointer to seqcount_t or any of the seqcount_LOCKNAME_t variants πŸ¦‹.
  • start β€” count to be passed to read_seqcount_retry πŸ’–.

πŸ’« DESCRIPTION πŸ’«

so it's similar to raw_seqcount_begin, except it enables eliding the critical section entirely if odd, instead of doing the speculation knowing it will fail πŸ˜­πŸ‘‘. that's the move.

it's useful when counter stabilization is more or less equivalent to taking the lock and there is a slowpath that does that 🌈. iykyk.

if true, start will be set to the (even) sequence count read ⭐. like, that's the little gift it hands you.

πŸ”₯ RETURN πŸ”₯

true when a read critical section is started πŸ’…βœ….

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/seqlock.h: seqcount_init(9), SEQCNT_ZERO(9), __read_seqcount_begin(9), raw_read_seqcount_begin(9), read_seqcount_begin(9), raw_read_seqcount(9), raw_seqcount_begin(9), __read_seqcount_retry(9), read_seqcount_retry(9), raw_write_seqcount_begin(9), raw_write_seqcount_end(9), write_seqcount_begin_nested(9), write_seqcount_begin(9), write_seqcount_end(9), raw_write_seqcount_barrier(9), write_seqcount_invalidate(9), SEQCNT_LATCH_ZERO(9), seqcount_latch_init(9), raw_read_seqcount_latch(9), read_seqcount_latch(9), raw_read_seqcount_latch_retry(9), read_seqcount_latch_retry(9), raw_write_seqcount_latch(9), write_seqcount_latch_begin(9), write_seqcount_latch(9), write_seqcount_latch_end(9), seqlock_init(9), DEFINE_SEQLOCK(9), read_seqbegin(9), read_seqretry(9), write_seqlock(9), write_sequnlock(9), write_seqlock_bh(9), write_sequnlock_bh(9), write_seqlock_irq(9), write_sequnlock_irq(9), write_seqlock_irqsave(9), write_sequnlock_irqrestore(9), read_seqlock_excl(9), read_sequnlock_excl(9), read_seqlock_excl_bh(9), read_sequnlock_excl_bh(9), read_seqlock_excl_irq(9), read_sequnlock_excl_irq(9), read_seqlock_excl_irqsave(9), read_sequnlock_excl_irqrestore(9), read_seqbegin_or_lock(9), need_seqretry(9), done_seqretry(9), read_seqbegin_or_lock_irqsave(9), done_seqretry_irqrestore(9), scoped_seqlock_read(9).


okay that's the whole page, bestie β€” cute little sign-off from the source/version ./include/linux, dated October 2026, for raw_seqcount_try_begin(9) πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from