20 Apr, 2008

3 commits

  • Only allocate the FPU area when the application actually uses FPU, i.e., in the
    first lazy FPU trap. This could save memory for non-fpu using apps.

    for example: on my system after boot, there are around 300 processes, with
    only 17 using FPU.

    Signed-off-by: Suresh Siddha
    Cc: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Suresh Siddha
     
  • Split the FPU save area from the task struct. This allows easy migration
    of FPU context, and it's generally cleaner. It also allows the following
    two optimizations:

    1) only allocate when the application actually uses FPU, so in the first
    lazy FPU trap. This could save memory for non-fpu using apps. Next patch
    does this lazy allocation.

    2) allocate the right size for the actual cpu rather than 512 bytes always.
    Patches enabling xsave/xrstor support (coming shortly) will take advantage
    of this.

    Signed-off-by: Suresh Siddha
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Suresh Siddha
     
  • This patch implements the PR_GET_TSC and PR_SET_TSC prctl()
    commands on the x86 platform (both 32 and 64 bit.) These
    commands control the ability to read the timestamp counter
    from userspace (the RDTSC instruction.)

    While the RDTSC instuction is a useful profiling tool,
    it is also the source of some non-determinism in ring-3.
    For deterministic replay applications it is useful to be
    able to trap and emulate (and record the outcome of) this
    instruction.

    This patch uses code earlier used to disable the timestamp
    counter for the SECCOMP framework. A side-effect of this
    patch is that the SECCOMP environment will now also disable
    the timestamp counter on x86_64 due to the addition of the
    TIF_NOTSC define on this platform.

    The code which enables/disables the RDTSC instruction during
    context switches is in the __switch_to_xtra function, which
    already handles other unusual conditions, so normal
    performance should not have to suffer from this change.

    Signed-off-by: Erik Bosman
    Acked-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Erik Bosman
     

17 Apr, 2008

10 commits


19 Feb, 2008

2 commits

  • Signed-off-by: Mike Travis
    Cc: Christoph Lameter
    Cc: Jack Steiner
    Cc: linux-mm@kvack.org
    Cc: Andrew Morton
    Cc: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mike Travis
     
  • This patch removes the mca-pentium boot option that was a noop.

    besides the source code cleanup factor, this saves some text as well:

    arch/x86/kernel/cpu/bugs.o:
    text data bss dec hex filename
    651 77 4 732 2dc bugs.o.before
    631 53 4 688 2b0 bugs.o.after

    Signed-off-by: Adrian Bunk
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     

09 Feb, 2008

1 commit


30 Jan, 2008

24 commits

  • There are already various options to disable specific cpuid bits
    on the command line. They all use their own variable. Add a generic
    mask to make this easier in the future.

    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • Change the size of APICIDs from u8 to u16. This partially
    supports the new x2apic mode that will be present on future
    processor chips. (Chips actually support 32-bit APICIDs, but that
    change is more intrusive. Supporting 16-bit is sufficient for now).

    Signed-off-by: Jack Steiner

    I've included just the partial change from u8 to u16 apicids. The
    remaining x2apic changes will be in a separate patch.

    In addition, the fake_node_to_pxm_map[] and fake_apicid_to_node[]
    tables have been moved from local data to the __initdata section
    reducing stack pressure when MAX_NUMNODES and MAX_LOCAL_APIC are
    increased in size.

    Signed-off-by: Mike Travis
    Reviewed-by: Christoph Lameter
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    travis@sgi.com
     
  • Make sure pte_t, whatever its definition, has a pte element with type
    pteval_t. This allows common code to access it without needing to be
    specifically parameterised on what pagetable mode we're compiling for.
    For 32-bit, this means that pte_t becomes a union with "pte" and "{
    pte_low, pte_high }" (PAE) or just "pte_low" (non-PAE).

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jeremy Fitzhardinge
     
  • migration helpers for KVM.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Moving things out of processor.h is always a good thing.

    Also needed to avoid include loop in later patch.

    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • This patch adds paravirt hook for swapgs operation, which is a privileged
    operation in x86_64.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • What's left in processor_32.h and processor_64.h cannot be cleanly
    integrated. However, it's just a couple of definitions. They are moved
    to processor.h around ifdefs, and the original files are deleted. Note that
    there's much less headers included in the final version.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • The i387_fxsave_struct formats really have the same layout
    on 32 and 64, with only some slightly different use of a few
    fields. The i387_fsave_struct and i387_soft_struct formats
    are never used by 64-bit kernels, but it doesn't hurt to
    have the unused types in the union and cuts down on the
    amount of #ifdef hair required throughout the i387 code.

    Signed-off-by: Roland McGrath
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Roland McGrath
     
  • This patch moves i387 definitions from processor_32.h and processor_64.h
    to processor.h. They are different. Very different. And there's appearently
    nothing we can do about it, so they're enclosed inside ifdefs.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • There's only one difference between the NOPs used in asm code for i386 and x86_64:
    i386 has a lot more variants. The code is moved to processor.h, and adjusted
    accordingly.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves the prefetch[w]? functions to processor.h

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves definitions that are present in only one of the files
    (between processor_32.h and processor_64.h), to processor.h. They're mostly
    structures and function definitions.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves the mm_segment_t structure definition to processor.h
    This makes mmsegment.h file useless, and it is deleted.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • x86_cpuinfo is one more to the family of "not fundamentally different"
    structs. It's unified in processor.h, with very specific fields enclosed
    around ifdefs.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves the TASK_ALIGN constraints to common header.
    The base of it is the same for x86_64 and i386. The only difference
    is the presence of vSMP in x86_64. As it's not a worry in i386, we can
    safely use the same code for both.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • The thread_struct is not fundamentally different between architectures, and
    this patch puts it in the common header. What's really unique for each of
    them is enclosed in ifdefs.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • Paravirt guests need to inform the underlying hypervisor whenever the sp0
    tss field changes. i386 already has such a function, and we use it for
    x86_64 too. There's an unnecessary (for 64-bit) msr handling part in the original
    version, and it is placed around an ifdef. Making no more sense in
    processor_32.h, it is moved to the common header

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • Although slighly different, the tss_struct is very similar in x86_64 and
    i386. The really different part, which matchs the hardware vision of it, is
    now called x86_hw_tss, and each of the architectures provides yours.
    It's then used as a field in the outter tss_struct.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • current_text_addr() has a different implementation in x86_64 and
    i386, but it is not fundamentally different. I stick to the i386
    implementation, that seem to be a common base, and move it to processor.h

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves the pieces of processor_32.h and processor_64 that are
    equal to processor.h. Only what's exactly the same is moved around, the rest
    not being touched.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch moves the definition of set_iopl_mask to processor.h,
    instead of letting it at processor_32.h.
    For x86_64, nothing is done, as we don't really need such a function.
    However, having it on both arches saves us from putting an ifdef in the
    pv_cpu_ops struct.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • This patch unifies the paravirt pieces of processor.h
    The functionality present in 32 bit, but not (yet) in 64-bit,
    like load_sp0 is _not_ done here, and let to a different patch.

    With this unification, we get paravirt for free in x86_64 processor.h

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • There are currently two definitions of load_cr3, that essentially do the
    same thing. This patch moves them all to processor.h.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • There's no need for the *_MASK flags (TF_MASK, IF_MASK, etc), found in
    processor.h (both _32 and _64). They have a one-to-one mapping with the
    EFLAGS value. This patch removes the definitions, and use the already
    existent X86_EFLAGS_ version when applicable.

    [ roland@redhat.com: KVM build fixes. ]

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa