Linux-Next discussions
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Slaby <jirislaby@gmail.com>
Subject: linux-next: manual merge of the tip tree with the limits tree
Date: Wed, 14 Apr 2010 13:59:05 +1000	[thread overview]
Message-ID: <20100414135905.47494958.sfr@canb.auug.org.au> (raw)

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@canb.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(&current->sighand->siglock);
 -	set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
 -	spin_unlock_irq(&current->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)

             reply	other threads:[~2010-04-14  3:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  3:59 Stephen Rothwell [this message]
2010-04-14  6:41 ` linux-next: manual merge of the tip tree with the limits tree Jiri Slaby
2010-04-14  6:46   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2009-12-18 22:51 Stephen Rothwell
2009-12-04  7:55 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100414135905.47494958.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=hpa@zytor.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox