Ingo Molnar wrote:
* Peter Williams <[email protected]> wrote:
===================================================================
--- MM-2.6.17-mm6.orig/kernel/mutex.c 2006-07-04 14:37:43.000000000 +1000
+++ MM-2.6.17-mm6/kernel/mutex.c 2006-07-04 14:38:12.000000000 +1000
@@ -51,6 +51,16 @@ __mutex_init(struct mutex *lock, const c
EXPORT_SYMBOL(__mutex_init);
+static inline void inc_mutex_count(void)
+{
+ current->mutexes_held++;
+}
+
+static inline void dec_mutex_count(void)
+{
+ current->mutexes_held--;
+}
+
NACK! This whole patch is way too intrusive for such a relatively small
gain.
also, if something doesnt hold a mutex, it might still be unsafe to
background it! For example if it holds a semaphore. Or an rwsem. Or any
other kernel resource that has exclusion semantics.
so unless this patch gets _much_ less complex and much less intrusive,
we'll have to stay with SCHED_BATCH and nice +19.
This means being less strict but (as you imply) that may be not much
better than nice +19. I'll have a look at it.
Of course, a comprehensive (as opposed to RT only) priority inheritance
mechanism would make the "safe/unsafe to background" problem go away and
make this patch very simple. Any plans in that direction?
Peter
--
Peter Williams [email protected]
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]