Re: [ckpatch][8/29] track_mutexes-1.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Con Kolivas writes:
 > Keep a record of how many mutexes are held by any task. This allows cpu
 > scheduler code to use this information in decision making for tasks that
 > hold contended resources.

Natural extension of this idea is to specify priority bump for every
mutex, with default mutex initializer setting this value to 1.

In fact, this looks like an old UNIX method of specifying priority value
as an argument to the call of sleeping function (sleep, tsleep,
etc.).

 > 
 > Signed-off-by: Con Kolivas <[email protected]>
 > 

[...]

 >  	void *journal_info;
 > Index: linux-ck-dev/kernel/fork.c
 > ===================================================================
 > --- linux-ck-dev.orig/kernel/fork.c	2006-06-18 15:20:14.000000000 +1000
 > +++ linux-ck-dev/kernel/fork.c	2006-06-18 15:23:44.000000000 +1000
 > @@ -1022,6 +1022,7 @@ static task_t *copy_process(unsigned lon
 >  	p->io_context = NULL;
 >  	p->io_wait = NULL;
 >  	p->audit_context = NULL;
 > +	p->mutexes_held = 0;

You may also add 

        BUG_ON(p->mutexes_held != 0);

check to do_exit().

Nikita.
-
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]
  Powered by Linux