Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 625f2a37 authored by Jonathan Corbet's avatar Jonathan Corbet Committed by Ingo Molnar
Browse files

sched: Get rid of lock_depth



Neil Brown pointed out that lock_depth somehow escaped the BKL
removal work.  Let's get rid of it now.

Note that the perf scripting utilities still have a bunch of
code for dealing with common_lock_depth in tracepoints; I have
left that in place in case anybody wants to use that code with
older kernels.

Suggested-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20110422111910.456c0e84@bike.lwn.net


Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d3bf52e9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ format:
        field:unsigned char common_flags;       offset:2;       size:1; signed:0;
        field:unsigned char common_preempt_count;       offset:3; size:1;signed:0;
        field:int common_pid;   offset:4;       size:4; signed:1;
        field:int common_lock_depth;    offset:8;       size:4; signed:1;

        field:unsigned long __probe_ip; offset:12;      size:4; signed:0;
        field:int __probe_nargs;        offset:16;      size:4; signed:1;
+0 −1
Original line number Diff line number Diff line
@@ -134,7 +134,6 @@ extern struct cred init_cred;
	.stack		= &init_thread_info,				\
	.usage		= ATOMIC_INIT(2),				\
	.flags		= PF_KTHREAD,					\
	.lock_depth	= -1,						\
	.prio		= MAX_PRIO-20,					\
	.static_prio	= MAX_PRIO-20,					\
	.normal_prio	= MAX_PRIO-20,					\
+0 −6
Original line number Diff line number Diff line
@@ -731,10 +731,6 @@ struct sched_info {
	/* timestamps */
	unsigned long long last_arrival,/* when we last ran on a cpu */
			   last_queued;	/* when we were last queued to run */
#ifdef CONFIG_SCHEDSTATS
	/* BKL stats */
	unsigned int bkl_count;
#endif
};
#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */

@@ -1190,8 +1186,6 @@ struct task_struct {
	unsigned int flags;	/* per process flags, defined below */
	unsigned int ptrace;

	int lock_depth;		/* BKL lock depth */

#ifdef CONFIG_SMP
	struct task_struct *wake_entry;
	int on_cpu;
+0 −1
Original line number Diff line number Diff line
@@ -1103,7 +1103,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,

	posix_cpu_timers_init(p);

	p->lock_depth = -1;		/* -1 = no lock */
	do_posix_clock_monotonic_gettime(&p->start_time);
	p->real_start_time = p->start_time;
	monotonic_to_bootbased(&p->real_start_time);
+0 −7
Original line number Diff line number Diff line
@@ -162,13 +162,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
	for (;;) {
		struct task_struct *owner;

		/*
		 * If we own the BKL, then don't spin. The owner of
		 * the mutex might be waiting on us to release the BKL.
		 */
		if (unlikely(current->lock_depth >= 0))
			break;

		/*
		 * If there's an owner, wait for it to either
		 * release the lock or go to sleep.
Loading