Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\locktorture.c Create Date:2022-07-28 09:54:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Lock torture reader kthread. Repeatedly acquires and releases* the reader lock.

Proto:static int lock_torture_reader(void *arg)

Type:int

Parameter:

TypeParameterName
void *arg
657  lrsp = arg
658  static
660  VERBOSE_TOROUT_STRING("lock_torture_reader task started")
661  set_user_nice(current process, MAX_NICE)
663  Do
664  If (torture_random( & rand) & 0xfffff) == 0 Then schedule_timeout_uninterruptible(1)
667  readlock()
668  lock_is_read_held = 1
669  If WARN_ON_ONCE(lock_is_write_held) Then n_lock_fail++
672  n_lock_acquired++
673  read_delay( & rand)
674  lock_is_read_held = 0
675  readunlock()
677  Task stuttering, which forces load/no-load transitions.
678  When Not Is it time for the current torture test to stop? cycle
679  Each kthread must wait for kthread_should_stop() before returning from* its top-level function, otherwise segfaults ensue
680  Return 0