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

Commit 2ff678b8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds
Browse files

[PATCH] hrtimer: switch itimers to hrtimer



switch itimers to a hrtimers-based implementation

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent df78488d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -632,10 +632,10 @@ static inline int de_thread(struct task_struct *tsk)
		 * synchronize with any firing (by calling del_timer_sync)
		 * before we can safely let the old group leader die.
		 */
		sig->real_timer.data = (unsigned long)current;
		sig->real_timer.data = current;
		spin_unlock_irq(lock);
		if (del_timer_sync(&sig->real_timer))
			add_timer(&sig->real_timer);
		if (hrtimer_cancel(&sig->real_timer))
			hrtimer_restart(&sig->real_timer);
		spin_lock_irq(lock);
	}
	while (atomic_read(&sig->count) > count) {
+3 −3
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
	unsigned long  min_flt = 0,  maj_flt = 0;
	cputime_t cutime, cstime, utime, stime;
	unsigned long rsslim = 0;
	unsigned long it_real_value = 0;
	DEFINE_KTIME(it_real_value);
	struct task_struct *t;
	char tcomm[sizeof(task->comm)];

@@ -386,7 +386,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
			utime = cputime_add(utime, task->signal->utime);
			stime = cputime_add(stime, task->signal->stime);
		}
		it_real_value = task->signal->it_real_value;
		it_real_value = task->signal->real_timer.expires;
	}
	ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0;
	read_unlock(&tasklist_lock);
@@ -435,7 +435,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole)
		priority,
		nice,
		num_threads,
		jiffies_to_clock_t(it_real_value),
		(long) ktime_to_clock_t(it_real_value),
		start_time,
		vsize,
		mm ? get_mm_rss(mm) : 0,
+3 −2
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ extern unsigned long nr_iowait(void);
#include <linux/param.h>
#include <linux/resource.h>
#include <linux/timer.h>
#include <linux/hrtimer.h>

#include <asm/processor.h>

@@ -398,8 +399,8 @@ struct signal_struct {
	struct list_head posix_timers;

	/* ITIMER_REAL timer for the process */
	struct timer_list real_timer;
	unsigned long it_real_value, it_real_incr;
	struct hrtimer real_timer;
	ktime_t it_real_incr;

	/* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */
	cputime_t it_prof_expires, it_virt_expires;
+1 −1
Original line number Diff line number Diff line
@@ -96,6 +96,6 @@ static inline void add_timer(struct timer_list *timer)

extern void init_timers(void);
extern void run_local_timers(void);
extern void it_real_fn(unsigned long);
extern int it_real_fn(void *);

#endif
+1 −1
Original line number Diff line number Diff line
@@ -842,7 +842,7 @@ fastcall NORET_TYPE void do_exit(long code)
	}
	group_dead = atomic_dec_and_test(&tsk->signal->live);
	if (group_dead) {
 		del_timer_sync(&tsk->signal->real_timer);
 		hrtimer_cancel(&tsk->signal->real_timer);
		exit_itimers(tsk->signal);
		acct_process(code);
	}
Loading