sched: Add CPU rate soft caps
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Peter Williams
3. Thanks to suggestions from Con Kolivas with respect to alternative methods to reduce the possibility of a task being starved of CPU while holding an important system resource, enforcement of caps is now quite strict. However, there will still be occasions where caps may be exceeded due to this mechanism vetoing enforcement.
Transcription bug here:
Review
Quoted 7 lines
int fastcall
__schedmutex_lock_interruptible(struct mutex *lock){(quoted diff) +2
-0+ int ret; + might_sleep(); return __mutex_fastpath_lock_retval (&lock->count, __mutex_lock_interruptible_slowpath);
should be ret =
Review
Quoted 7 lines
(quoted diff) +5
-0+ + if (!ret) + inc_mutex_count(); + + return ret; }
compare with here:
Quoted 16 lines
EXPORT_SYMBOL(mutex_lock_interruptible);(quoted diff) +6
-1@@ -366,8 +390,13 @@ static inline int __mutex_trylock_slowpa */ int fastcall __sched mutex_trylock(struct mutex *lock) { - return __mutex_fastpath_trylock(&lock->count, + int ret = __mutex_fastpath_trylock(&lock->count, __mutex_trylock_slowpath); + + if (!ret) + inc_mutex_count(); + + return ret; } EXPORT_SYMBOL(mutex_trylock);
Signature · 1 line
-ck
Quoted 9 lines · Con Kolivas
Quoted 5 lines · Peter Williams
3. Thanks to suggestions from Con Kolivas with respect to alternative methods to reduce the possibility of a task being starved of CPU while holding an important system resource, enforcement of caps is now quite strict. However, there will still be occasions where caps may be exceeded due to this mechanism vetoing enforcement.
Transcription bug here:
Quoted 9 lines
Review
Quoted 7 lines
int fastcall
__schedmutex_lock_interruptible(struct mutex *lock){(quoted diff) +2
-0+ int ret; + might_sleep(); return __mutex_fastpath_lock_retval (&lock->count, __mutex_lock_interruptible_slowpath);should be ret =
How embarrassing. I wonder why I didn't notice an "unreachable code" warning here?
Thanks
Peter
Signature · 4 lines
Peter Williams [email protected] "Learning, n. The kind of ignorance distinguishing the studious." -- Ambrose Bierce