<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/kernel/vtime.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-12-01T09:08:17Z</updated>
<entry>
<title>[S390] nohz/s390: fix arch_needs_cpu() return value on offline cpus</title>
<updated>2010-12-01T09:08:17Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2010-12-01T09:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=398812159e328478ae49b4bd01f0d71efea96c39'/>
<id>urn:sha1:398812159e328478ae49b4bd01f0d71efea96c39</id>
<content type='text'>
This fixes the same problem as described in the patch "nohz: fix
printk_needs_cpu() return value on offline cpus" for the arch_needs_cpu()
primitive:

arch_needs_cpu() may return 1 if called on offline cpus. When a cpu gets
offlined it schedules the idle process which, before killing its own cpu,
will call tick_nohz_stop_sched_tick().
That function in turn will call arch_needs_cpu() in order to check if the
local tick can be disabled. On offline cpus this function should naturally
return 0 since regardless if the tick gets disabled or not the cpu will be
dead short after. That is besides the fact that __cpu_disable() should already
have made sure that no interrupts on the offlined cpu will be delivered anyway.

In this case it prevents tick_nohz_stop_sched_tick() to call
select_nohz_load_balancer(). No idea if that really is a problem. However what
made me debug this is that on 2.6.32 the function get_nohz_load_balancer() is
used within __mod_timer() to select a cpu on which a timer gets enqueued.
If arch_needs_cpu() returns 1 then the nohz_load_balancer cpu doesn't get
updated when a cpu gets offlined. It may contain the cpu number of an offline
cpu. In turn timers get enqueued on an offline cpu and not very surprisingly
they never expire and cause system hangs.

This has been observed 2.6.32 kernels. On current kernels __mod_timer() uses
get_nohz_timer_target() which doesn't have that problem. However there might
be other problems because of the too early exit tick_nohz_stop_sched_tick()
in case a cpu goes offline.

This specific bug was indrocuded with 3c5d92a0 "nohz: Introduce
arch_needs_cpu".

In this case a cpu hotplug notifier is used to fix the issue in order to keep
the normal/fast path small. All we need to do is to clear the condition that
makes arch_needs_cpu() return 1 since it is just a performance improvement
which is supposed to keep the local tick running for a short period if a cpu
goes idle. Nothing special needs to be done except for clearing the condition.

Cc: stable@kernel.org
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] cleanup lowcore access from external interrupts</title>
<updated>2010-10-25T14:10:19Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2010-10-25T14:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6649a7e5a9ee99e9623878f4a5579cc2f6cdd51'/>
<id>urn:sha1:f6649a7e5a9ee99e9623878f4a5579cc2f6cdd51</id>
<content type='text'>
Read external interrupts parameters from the lowcore in the first
level interrupt handler in entry[64].S.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] idle time accounting vs. machine checks</title>
<updated>2010-05-17T08:00:15Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2010-05-17T08:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6377981faf1a4425b0531e577736ef03df97c8f6'/>
<id>urn:sha1:6377981faf1a4425b0531e577736ef03df97c8f6</id>
<content type='text'>
A machine check can interrupt the i/o and external interrupt handler
anytime. If the machine check occurs while the interrupt handler is
waking up from idle vtime_start_cpu can get executed a second time
and the int_clock / async_enter_timer values in the lowcore get
clobbered. This can confuse the cpu time accounting.
To fix this problem two changes are needed. First the machine check
handler has to use its own copies of int_clock and async_enter_timer,
named mcck_clock and mcck_enter_timer. Second the nested execution
of vtime_start_cpu has to be prevented. This is done in s390_idle_check
by checking the wait bit in the program status word.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>nohz: Introduce arch_needs_cpu</title>
<updated>2009-11-05T06:53:53Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-09-29T12:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c5d92a0cfb5103c0d5ab74d4ae6373d3af38148'/>
<id>urn:sha1:3c5d92a0cfb5103c0d5ab74d4ae6373d3af38148</id>
<content type='text'>
Allow the architecture to request a normal jiffy tick when the system
goes idle and tick_nohz_stop_sched_tick is called . On s390 the hook is
used to prevent the system going fully idle if there has been an
interrupt other than a clock comparator interrupt since the last wakeup.

On s390 the HiperSockets response time for 1 connection ping-pong goes
down from 42 to 34 microseconds. The CPU cost decreases by 27%.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
LKML-Reference: &lt;20090929122533.402715150@de.ibm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>[S390] lockless idle time accounting</title>
<updated>2009-06-22T10:08:23Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-06-22T10:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e98bbaafcd1c47d30f3245517fb585f1aaaca4db'/>
<id>urn:sha1:e98bbaafcd1c47d30f3245517fb585f1aaaca4db</id>
<content type='text'>
Replace the spinlock used in the idle time accounting with a sequence
counter mechanism analog to seqlock.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] time: convert from bootmem to slab</title>
<updated>2009-06-22T10:08:16Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2009-06-22T10:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7d1104fa40f66dbe50840f05b34268144f8a17a'/>
<id>urn:sha1:d7d1104fa40f66dbe50840f05b34268144f8a17a</id>
<content type='text'>
The slab allocator is earlier available so convert the
bootmem allocations to slab/gfp allocations.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] merge cpu.h into cputime.h</title>
<updated>2009-06-12T08:27:29Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-06-12T08:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76d4e00a05d06c1d1552adea24fcf6182c9d8999'/>
<id>urn:sha1:76d4e00a05d06c1d1552adea24fcf6182c9d8999</id>
<content type='text'>
All definition in cpu.h have to do with cputime accounting. Move
them to cputime.h and remove the header file.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] /proc/stat idle field for idle cpus</title>
<updated>2009-04-23T11:58:17Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-04-23T11:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1c805309d19c69d4ebeac38724076fa86feacdf'/>
<id>urn:sha1:e1c805309d19c69d4ebeac38724076fa86feacdf</id>
<content type='text'>
The cpu idle field in the output of /proc/stat is too small for cpus
that have been idle for more than a tick. Add the architecture hook
arch_idle_time that allows to add the not accounted idle time of a
sleeping cpu without waking the cpu.

The s390 implementation of arch_idle_time uses the already existing
s390_idle_data per_cpu variable to find the sleep time of a neighboring
idle cpu.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] boot cputime accounting</title>
<updated>2009-04-14T13:37:27Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-04-14T13:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab96e798cbd562a53edd802272e49a5100b29efb'/>
<id>urn:sha1:ab96e798cbd562a53edd802272e49a5100b29efb</id>
<content type='text'>
Start the cpu time accounting very early to catch the cpu time spent
for the initial kernel setup. To make the output of /proc/uptime
match the sum of all cpu accounting values of the boot cpu reset
xtime and wall_to_monotonic to sane values based on the TOD clock.
The values set by timekeeping_init are off by up to a second.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[S390] fix idle time accounting</title>
<updated>2009-04-14T13:37:26Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2009-04-14T13:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b86ccca49cd8f22086c1d135ab3051cf48fb1688'/>
<id>urn:sha1:b86ccca49cd8f22086c1d135ab3051cf48fb1688</id>
<content type='text'>
The steal time is calculated by subtracting the time the virtual cpu
has been running on a physical cpu from the wall clock time. To make
that work all wall time needs to be added to the steal time field first
before the virtual cpu time is subtracted.

The time between the last clock update and the load of the enabled wait
psw needs to be added to the steal_time field as well to make the sum
over all cpu accounting numbers match the wall clock.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
