<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86_64, branch linux-2.6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-02-24T00:24:25Z</updated>
<entry>
<title>x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted</title>
<updated>2007-02-24T00:24:25Z</updated>
<author>
<name>Paolo 'Blaisorblade' Giarrusso</name>
</author>
<published>2007-02-15T02:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6a2637fe05e2ad8ff8f83e346e816b62af81252'/>
<id>urn:sha1:f6a2637fe05e2ad8ff8f83e346e816b62af81252</id>
<content type='text'>
Also PTRACE_OLDSETOPTIONS should be accepted, as done by kernel/ptrace.c and
forced by binary compatibility. UML/32bit breaks because of this - since it is wise
enough to use PTRACE_OLDSETOPTIONS to be binary compatible with 2.4 host
kernels.

Until 2.6.17 (commit f0f2d6536e3515b5b1b7ae97dc8f176860c8c2ce) we had:

       default:
                return sys_ptrace(request, pid, addr, data);

Instead here we have:
        case PTRACE_GET_THREAD_AREA:
	case ...:
                return sys_ptrace(request, pid, addr, data);

        default:
                return -EINVAL;

This change was a style change - when a case is added, it must be explicitly
tested this way. In this case, not enough testing was done.

Cc: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[PATCH] x86: Work around gcc 4.2 over aggressive optimizer</title>
<updated>2007-02-05T16:31:42Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2007-01-23T17:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=787db6107036ffd8f89903857ce1327f73beabb3'/>
<id>urn:sha1:787db6107036ffd8f89903857ce1327f73beabb3</id>
<content type='text'>
The new PDA code uses a dummy _proxy_pda variable to describe
memory references to the PDA. It is never referenced
in inline assembly, but exists as input/output arguments.
gcc 4.2 in some cases can CSE references to this which causes
unresolved symbols.  Define it to zero to avoid this.

Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sched: fix bad missed wakeups in the i386, x86_64, ia64, ACPI and APM idle code</title>
<updated>2007-01-10T19:05:19Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2006-12-21T12:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ba9b18addcee8b7be8877727738f59a9fd37b29'/>
<id>urn:sha1:9ba9b18addcee8b7be8877727738f59a9fd37b29</id>
<content type='text'>
Fernando Lopez-Lezcano reported frequent scheduling latencies and audio
xruns starting at the 2.6.18-rt kernel, and those problems persisted all
until current -rt kernels. The latencies were serious and unjustified by
system load, often in the milliseconds range.

After a patient and heroic multi-month effort of Fernando, where he
tested dozens of kernels, tried various configs, boot options,
test-patches of mine and provided latency traces of those incidents, the
following 'smoking gun' trace was captured by him:

                 _------=&gt; CPU#
                / _-----=&gt; irqs-off
               | / _----=&gt; need-resched
               || / _---=&gt; hardirq/softirq
               ||| / _--=&gt; preempt-depth
               |||| /
               |||||     delay
   cmd     pid ||||| time  |   caller
      \   /    |||||   \   |   /
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup &lt;&lt;...&gt;-5856&gt; (37 0)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (c01262ba 0 0)
  IRQ_19-1479  1D..1    0us : resched_task (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __spin_unlock_irqrestore (try_to_wake_up)
  ...
  &lt;idle&gt;-0     1...1   11us!: default_idle (cpu_idle)
  ...
  &lt;idle&gt;-0     0Dn.1  602us : smp_apic_timer_interrupt (c0103baf 1 0)
  ...
   &lt;...&gt;-5856  0D..2  618us : __switch_to (__schedule)
   &lt;...&gt;-5856  0D..2  618us : __schedule &lt;&lt;idle&gt;-0&gt; (20 162)
   &lt;...&gt;-5856  0D..2  619us : __spin_unlock_irq (__schedule)
   &lt;...&gt;-5856  0...1  619us : trace_stop_sched_switched (__schedule)
   &lt;...&gt;-5856  0D..1  619us : trace_stop_sched_switched &lt;&lt;...&gt;-5856&gt; (37 0)

what is visible in this trace is that CPU#1 ran try_to_wake_up() for
PID:5856, it placed PID:5856 on CPU#0's runqueue and ran resched_task()
for CPU#0. But it decided to not send an IPI that no CPU - due to
TS_POLLING. But CPU#0 never woke up after its NEED_RESCHED bit was set,
and only rescheduled to PID:5856 upon the next lapic timer IRQ. The
result was a 600+ usecs latency and a missed wakeup!

the bug turned out to be an idle-wakeup bug introduced into the mainline
kernel this summer via an optimization in the x86_64 tree:

    commit 495ab9c045e1b0e5c82951b762257fe1c9d81564
    Author: Andi Kleen &lt;ak@suse.de&gt;
    Date:   Mon Jun 26 13:59:11 2006 +0200

    [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status

    During some profiling I noticed that default_idle causes a lot of
    memory traffic. I think that is caused by the atomic operations
    to clear/set the polling flag in thread_info. There is actually
    no reason to make this atomic - only the idle thread does it
    to itself, other CPUs only read it. So I moved it into ti-&gt;status.

the problem is this type of change:

        if (!hlt_counter &amp;&amp; boot_cpu_data.hlt_works_ok) {
-               clear_thread_flag(TIF_POLLING_NRFLAG);
+               current_thread_info()-&gt;status &amp;= ~TS_POLLING;
                smp_mb__after_clear_bit();
                while (!need_resched()) {
                        local_irq_disable();

this changes clear_thread_flag() to an explicit clearing of TS_POLLING.
clear_thread_flag() is defined as:

        clear_bit(flag, &amp;ti-&gt;flags);

and clear_bit() is a LOCK-ed atomic instruction on all x86 platforms:

  static inline void clear_bit(int nr, volatile unsigned long * addr)
  {
          __asm__ __volatile__( LOCK_PREFIX
                  "btrl %1,%0"

hence smp_mb__after_clear_bit() is defined as a simple compile barrier:

  #define smp_mb__after_clear_bit()       barrier()

but the explicit TS_POLLING clearing introduced by the patch:

+               current_thread_info()-&gt;status &amp;= ~TS_POLLING;

is not an atomic op! So the clearing of the TS_POLLING bit is freely
reorderable with the reading of the NEED_RESCHED bit - and both now
reside in different memory addresses.

CPU idle wakeup very much depends on ordered memory ops, the clearing of
the TS_POLLING flag must always be done before we test need_resched()
and hit the idle instruction(s). [Symmetrically, the wakeup code needs
to set NEED_RESCHED before it tests the TS_POLLING flag, so memory
ordering is paramount.]

Fernando's dual-core Athlon64 system has a sufficiently advanced memory
ordering model so that it triggered this scenario very often.

( And it also turned out that the reason why these latencies never
  triggered on my testsystems is that i routinely use idle=poll, which
  was the only idle variant not affected by this bug. )

The fix is to change the smp_mb__after_clear_bit() to an smp_mb(), to
act as an absolute barrier between the TS_POLLING write and the
NEED_RESCHED read. This affects almost all idling methods (default,
ACPI, APM), on all 3 x86 architectures: i386, x86_64, ia64.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Tested-by: Fernando Lopez-Lezcano &lt;nando@ccrma.Stanford.EDU&gt;
[chrisw: backport to 2.6.19.1]
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86-64: Mark rdtsc as sync only for netburst, not for core2</title>
<updated>2007-01-10T19:05:17Z</updated>
<author>
<name>Arjan van de Ven</name>
</author>
<published>2006-12-11T20:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33e57a8e59504540ad5a6070dd1b70493cc68024'/>
<id>urn:sha1:33e57a8e59504540ad5a6070dd1b70493cc68024</id>
<content type='text'>
On the Core2 cpus, the rdtsc instruction is not serializing (as defined
in the architecture reference since rdtsc exists) and due to the deep
speculation of these cores, it's possible that you can observe time go
backwards between cores due to this speculation. Since the kernel
already deals with this with the SYNC_RDTSC flag, the solution is
simple, only assume that the instruction is serializing on family 15...

The price one pays for this is a slightly slower gettimeofday (by a
dozen or two cycles), but that increase is quite small to pay for a
really-going-forward tsc counter.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86: Fix boot hang due to nmi watchdog init code</title>
<updated>2006-12-11T19:32:40Z</updated>
<author>
<name>Ravikiran G Thirumalai</name>
</author>
<published>2006-12-09T20:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3667bf6de29ff04c42557e31e3e8cbbbb835732c'/>
<id>urn:sha1:3667bf6de29ff04c42557e31e3e8cbbbb835732c</id>
<content type='text'>
2.6.19  stopped booting (or booted based on build/config) on our x86_64
systems due to a bug introduced in 2.6.19.  check_nmi_watchdog schedules an
IPI on all cpus to  busy wait on a flag, but fails to set the busywait
flag if NMI functionality is disabled.  This causes the secondary cpus
to spin in an endless loop, causing the kernel bootup to hang.
Depending upon the build, the  busywait flag got overwritten (stack variable)
and caused  the kernel to bootup on certain builds.  Following patch fixes
the bug by setting the busywait flag before returning from check_nmi_watchdog.
I guess using a stack variable is not good here as the calling function could
potentially return while the busy wait loop is still spinning on the flag.

AK: I redid the patch significantly to be cleaner

Signed-off-by: Ravikiran Thirumalai &lt;kiran@scalex86.org&gt;
Signed-off-by: Shai Fultheim &lt;shai@scalex86.org&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6</title>
<updated>2006-11-29T01:28:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2006-11-29T01:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=707badb80b90d15d97f46155e6af432bd52789a3'/>
<id>urn:sha1:707badb80b90d15d97f46155e6af432bd52789a3</id>
<content type='text'>
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
  [PATCH] x86-64: Use stricter in process stack check for unwinder
  [PATCH] i386: Fix compilation with UP genericarch
  [PATCH] x86-64: Fix warning in io_apic.c
  [PATCH] x86-64: work around gcc4 issue with -Os in Dwarf2 stack unwind
  [PATCH] x86_64: Align data segment to PAGE_SIZE boundary
</content>
</entry>
<entry>
<title>[PATCH] x86-64: Use stricter in process stack check for unwinder</title>
<updated>2006-11-28T19:12:59Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2006-11-28T19:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c547c77ee4d0408907847f64c403df1bf2f9c7a0'/>
<id>urn:sha1:c547c77ee4d0408907847f64c403df1bf2f9c7a0</id>
<content type='text'>
Previously it would check for alignment only, which could break
if the stack pointer was unaligned. Now explicitely check if the
stack pointer is in the stack page of the current process.

Ported from i386.

Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86-64: Fix warning in io_apic.c</title>
<updated>2006-11-28T19:12:59Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2006-11-28T19:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7a23328a738b45124400d85eaf78a76939da726'/>
<id>urn:sha1:f7a23328a738b45124400d85eaf78a76939da726</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] x86_64: fix 'earlyprintk=...,keep' regression</title>
<updated>2006-11-28T18:58:21Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2006-11-28T08:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24d7bb3396c51ceb2285e0e7b0c1bd1865652c43'/>
<id>urn:sha1:24d7bb3396c51ceb2285e0e7b0c1bd1865652c43</id>
<content type='text'>
Commit 2c8c0e6b8d7700a990da8d24eff767f9ca223b96 ("[PATCH] Convert x86-64
to early param") broke the earlyprintk=...,keep feature.

This restores that functionality.  Tested on x86_64.  Must-have for
v2.6.19, no risk.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86_64: Align data segment to PAGE_SIZE boundary</title>
<updated>2006-11-21T09:31:21Z</updated>
<author>
<name>Vivek Goyal</name>
</author>
<published>2006-11-20T16:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3af9815328bba76e8d11d71d6dbbd6f38beafe58'/>
<id>urn:sha1:3af9815328bba76e8d11d71d6dbbd6f38beafe58</id>
<content type='text'>
o Explicitly align data segment to PAGE_SIZE boundary otherwise depending on
  config options and tool chain it might be placed on a non PAGE_SIZE aligned
  boundary and vmlinux loaders like kexec fail when they encounter a
  PT_LOAD type segment which is not aligned to PAGE_SIZE boundary.

Signed-off-by: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
</entry>
</feed>
