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

Commit b8867164 authored by Zhaolei's avatar Zhaolei Committed by Frederic Weisbecker
Browse files

trace_workqueue: remove cpu_workqueue_stats->first_entry



cpu_workqueue_stats->first_entry is useless because we can retrieve the
header of a cpu workqueue using:
if (&cpu_workqueue_stats->list == workqueue_cpu_stat(cpu)->list.next)

[ Impact: cleanup ]

Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent 1fdfca9c
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -16,8 +16,6 @@
/* A cpu workqueue thread */
/* A cpu workqueue thread */
struct cpu_workqueue_stats {
struct cpu_workqueue_stats {
	struct list_head            list;
	struct list_head            list;
/* Useful to know if we print the cpu headers */
	bool		            first_entry;
	int		            cpu;
	int		            cpu;
	pid_t			    pid;
	pid_t			    pid;
/* Can be inserted from interrupt or user context, need to be atomic */
/* Can be inserted from interrupt or user context, need to be atomic */
@@ -103,8 +101,6 @@ static void probe_workqueue_creation(struct task_struct *wq_thread, int cpu)
	cws->pid = wq_thread->pid;
	cws->pid = wq_thread->pid;


	spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
	spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags);
	if (list_empty(&workqueue_cpu_stat(cpu)->list))
		cws->first_entry = true;
	list_add_tail(&cws->list, &workqueue_cpu_stat(cpu)->list);
	list_add_tail(&cws->list, &workqueue_cpu_stat(cpu)->list);
	spin_unlock_irqrestore(&workqueue_cpu_stat(cpu)->lock, flags);
	spin_unlock_irqrestore(&workqueue_cpu_stat(cpu)->lock, flags);
}
}