[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100414135905.47494958.sfr@canb.auug.org.au>
Date: Wed, 14 Apr 2010 13:59:05 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>
Subject: linux-next: manual merge of the tip tree with the limits tree
Hi all,
Today's linux-next merge of the tip tree got a conflict in
kernel/posix-cpu-timers.c between commit
0c1b5ce8de67c36bbf67db38240a91f358133bdd ("core: add task_struct to
update_rlimit_cpu") from the limits tree and commit
f55db609042faecd5e518ce372b87f846659b32e ("cpu-timers: Simplify
RLIMIT_CPU handling") from the tip tree.
I did the obvious fixup (see below) but it is probably not completely
correct. Jiri, did I see Linus ask for major revisions of the writable
limits work?
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc kernel/posix-cpu-timers.c
index 2807ef8,799f360..0000000
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@@ -11,19 -11,18 +11,18 @@@
#include <trace/events/timer.h>
/*
- * Called after updating RLIMIT_CPU to set timer expiration if necessary.
+ * Called after updating RLIMIT_CPU to run cpu timer and update
+ * tsk->signal->cputime_expires expiration cache if necessary. Needs
+ * siglock protection since other code may update expiration cache as
+ * well.
*/
-void update_rlimit_cpu(unsigned long rlim_new)
+void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new)
{
cputime_t cputime = secs_to_cputime(rlim_new);
- struct signal_struct *const sig = task->signal;
- if (cputime_eq(sig->it[CPUCLOCK_PROF].expires, cputime_zero) ||
- cputime_gt(sig->it[CPUCLOCK_PROF].expires, cputime)) {
- spin_lock_irq(&task->sighand->siglock);
- set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL);
- spin_unlock_irq(&task->sighand->siglock);
- }
- spin_lock_irq(¤t->sighand->siglock);
- set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
- spin_unlock_irq(¤t->sighand->siglock);
++ spin_lock_irq(&task->sighand->siglock);
++ set_process_cpu_timer(task, CPUCLOCK_PROF, &cputime, NULL);
++ spin_unlock_irq(&task->sighand->siglock);
}
static int check_clock(const clockid_t which_clock)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists