linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the cputime tree
@ 2008-11-25  9:21 Stephen Rothwell
  2008-11-25 10:06 ` Peter Zijlstra
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2008-11-25  9:21 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: linux-next, Oleg Nesterov, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

Hi Martin,

Today's linux-next merge of the cputime tree got a conflict in
kernel/sched.c between commit 74fcd524e808975dd546dac847119f1995a7c622
("account_steal_time: kill the unneeded account_group_system_time()")
from the tip-core tree and commit
b7f4776b7f575ed8f288c44b64befd241fd44458 ("[PATCH] idle cputime
accounting") from the cputime tree.

The latter removes the call to account_group_system_time() as a side
effect of further changes.  So the fixup is to just take the latter
change.  I can carry the merge fix.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* linux-next: manual merge of the cputime tree
@ 2008-11-11  6:56 Stephen Rothwell
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2008-11-11  6:56 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: linux-next, Thomas Gleixner, Ingo Molnar

Hi Martin,

Today's linux-next merge of the cputime tree got a conflict in
kernel/time/tick-sched.c between commit
26105f6432b27212ad5563c4d32826f7b778f0b8 ("tick: cleanup idle checks")
from the timers tree and commit 84dd5d04573c132ff107cf9d5d311d93c6ac6b61
("[PATCH] idle cputime accounting") from the cputime tree.

Just context.  I fixed it up (see below) and can carry it for now.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc kernel/time/tick-sched.c
index 35a775e,1bcbca6..0000000
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@@ -410,11 -412,13 +410,13 @@@ void tick_nohz_restart_sched_tick(void
  {
  	int cpu = smp_processor_id();
  	struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
+ #ifndef CONFIG_VIRT_CPU_ACCOUNTING
  	unsigned long ticks;
+ #endif
 -	ktime_t now;
 +	ktime_t now = ktime_get();
  
  	local_irq_disable();
 -	tick_nohz_stop_idle(cpu);
 +	tick_nohz_stop_idle(ts, now);
  
  	if (!ts->inidle || !ts->tick_stopped) {
  		ts->inidle = 0;

^ permalink raw reply	[flat|nested] 9+ messages in thread
* linux-next: manual merge of the cputime tree
@ 2008-11-10  6:09 Stephen Rothwell
  2008-11-10  8:45 ` Martin Schwidefsky
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2008-11-10  6:09 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: linux-next, Heiko Carstens

Hi Martin,

Today's linux-next merge of the cputime tree got a conflict in
arch/s390/kernel/process.c between commit
2933aa2758dc5e520f83a5f4c3f255aea297bd3f ("[S390] ftrace: disable tracing
on idle psw") from the s390 tree and commit
bbda3e73a200e966955b15a08a8be05a7c1d430e ("[PATCH] improve precision of
idle accounting") from the cputime tree.

I attempted a fix (see below) but please either provide me with a better
patch or fix this conflict in one or the other tree.  You could do this
by merging the s390 tree into the cputime tree (but you would need to be
careful to keep the consistent) and fixing this in the merge commit.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc arch/s390/kernel/process.c
index 04f8c67,9334ca3..0000000
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@@ -136,12 -133,42 +133,45 @@@ static void default_idle(void
  		return;
  	}
  	trace_hardirqs_on();
 +	/* Don't trace preempt off for idle. */
 +	stop_critical_timings();
+ 	vtime_stop_cpu_timer();
+ 
+ 	/*
+ 	 * The inline assembly is equivalent to
+ 	 * 	idle->idle_enter = get_clock();
+ 	 * 	__load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
+ 	 *			   PSW_MASK_IO | PSW_MASK_EXT);
+ 	 * The difference is that the inline assembly makes sure that
+ 	 * the stck instruction is right before the lpsw instruction.
+ 	 * This is done to increase the precision.
+ 	 */
+ 
  	/* Wait for external, I/O or machine check interrupt. */
- 	__load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
- 			PSW_MASK_IO | PSW_MASK_EXT);
+ 	psw.mask = psw_kernel_bits|PSW_MASK_WAIT|PSW_MASK_IO|PSW_MASK_EXT;
+ #ifndef __s390x__
+ 	asm volatile(
+ 		"	basr	%0,0\n"
+ 		"0:	ahi	%0,1f-0b\n"
+ 		"	st	%0,4(%2)\n"
+ 		"	stck	0(%3)\n"
+ 		"	lpsw	0(%2)\n"
+ 		"1:"
+ 		: "=&d" (addr), "=m" (idle->idle_enter)
+ 		: "a" (&psw), "a" (&idle->idle_enter), "m" (psw)
+ 		: "memory", "cc");
+ #else /* __s390x__ */
+ 	asm volatile(
+ 		"	larl	%0,1f\n"
+ 		"	stg	%0,8(%2)\n"
+ 		"	stck	0(%3)\n"
+ 		"	lpswe	0(%2)\n"
+ 		"1:"
+ 		: "=&d" (addr), "=m" (idle->idle_enter)
+ 		: "a" (&psw), "a" (&idle->idle_enter), "m" (psw)
+ 		: "memory", "cc");
+ #endif /* __s390x__ */
 +	start_critical_timings();
  }
  
  void cpu_idle(void)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-11-25 11:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25  9:21 linux-next: manual merge of the cputime tree Stephen Rothwell
2008-11-25 10:06 ` Peter Zijlstra
2008-11-25 10:15   ` Martin Schwidefsky
2008-11-25 10:28     ` Peter Zijlstra
2008-11-25 10:32       ` Paul Mackerras
2008-11-25 11:00       ` Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2008-11-11  6:56 Stephen Rothwell
2008-11-10  6:09 Stephen Rothwell
2008-11-10  8:45 ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).