1. 05 Oct, 2016 8 commits
  2. 04 Oct, 2016 23 commits
  3. 03 Oct, 2016 9 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ef0a61a
      Linus Torvalds authored
      Pull x86 boot updates from Ingo Molnar:
       "The changes in this cycle were:
      
         - Save e820 table RAM footprint on larger kernel configurations.
           (Denys Vlasenko)
      
         - pmem related fixes (Dan Williams)
      
         - theoretical e820 boundary condition fix (Wei Yang)"
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation
        x86/e820: Use much less memory for e820/e820_saved, save up to 120k
        x86/e820: Prepare e280 code for switch to dynamic storage
        x86/e820: Mark some static functions __init
        x86/e820: Fix very large 'size' handling boundary condition
      3ef0a61a
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1a4a2bc4
      Linus Torvalds authored
      Pull low-level x86 updates from Ingo Molnar:
       "In this cycle this topic tree has become one of those 'super topics'
        that accumulated a lot of changes:
      
         - Add CONFIG_VMAP_STACK=y support to the core kernel and enable it on
           x86 - preceded by an array of changes. v4.8 saw preparatory changes
           in this area already - this is the rest of the work. Includes the
           thread stack caching performance optimization. (Andy Lutomirski)
      
         - switch_to() cleanups and all around enhancements. (Brian Gerst)
      
         - A large number of dumpstack infrastructure enhancements and an
           unwinder abstraction. The secret long term plan is safe(r) live
           patching plus maybe another attempt at debuginfo based unwinding -
           but all these current bits are standalone enhancements in a frame
           pointer based debug environment as well. (Josh Poimboeuf)
      
         - More __ro_after_init and const annotations. (Kees Cook)
      
         - Enable KASLR for the vmemmap memory region. (Thomas Garnier)"
      
      [ The virtually mapped stack changes are pretty fundamental, and not
        x86-specific per se, even if they are only used on x86 right now. ]
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
        x86/asm: Get rid of __read_cr4_safe()
        thread_info: Use unsigned long for flags
        x86/alternatives: Add stack frame dependency to alternative_call_2()
        x86/dumpstack: Fix show_stack() task pointer regression
        x86/dumpstack: Remove dump_trace() and related callbacks
        x86/dumpstack: Convert show_trace_log_lvl() to use the new unwinder
        oprofile/x86: Convert x86_backtrace() to use the new unwinder
        x86/stacktrace: Convert save_stack_trace_*() to use the new unwinder
        perf/x86: Convert perf_callchain_kernel() to use the new unwinder
        x86/unwind: Add new unwind interface and implementations
        x86/dumpstack: Remove NULL task pointer convention
        fork: Optimize task creation by caching two thread stacks per CPU if CONFIG_VMAP_STACK=y
        sched/core: Free the stack early if CONFIG_THREAD_INFO_IN_TASK
        lib/syscall: Pin the task stack in collect_syscall()
        x86/process: Pin the target stack in get_wchan()
        x86/dumpstack: Pin the target stack when dumping it
        kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function
        sched/core: Add try_get_task_stack() and put_task_stack()
        x86/entry/64: Fix a minor comment rebase error
        iommu/amd: Don't put completion-wait semaphore on stack
        ...
      1a4a2bc4
    • Andi Kleen's avatar
      perf tools: Support CPU id matching for x86 v2 · f33d1227
      Andi Kleen authored
      Implement the code to match CPU types to mapfile types for x86 based on
      CPUID. This extends an existing similar function, but changes it to use
      the x86 mapfile cpu description.  This allows to resolve event lists
      generated by jevents.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1473978296-20712-6-git-send-email-sukadev@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f33d1227
    • Sukadev Bhattiprolu's avatar
      perf powerpc: Support CPU ID matching for Powerpc · ce88f27c
      Sukadev Bhattiprolu authored
      Implement code that returns the generic CPU ID string for Powerpc.  This
      will be used to identify the specific table of PMU events to
      parse/compare user specified events against.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1473978296-20712-5-git-send-email-sukadev@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ce88f27c
    • Sukadev Bhattiprolu's avatar
      perf pmu: Use pmu_events table to create aliases · 933f82ff
      Sukadev Bhattiprolu authored
      At run time (when 'perf' is starting up), locate the specific table of
      PMU events that corresponds to the current CPU. Using that table, create
      aliases for the each of the PMU events in the CPU. The use these aliases
      to parse the user specified perf event.
      
      In short this would allow the user to specify events using their aliases
      rather than raw event codes.
      
      Based on input and some earlier patches from Andi Kleen, Jiri Olsa.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1473978296-20712-4-git-send-email-sukadev@linux.vnet.ibm.com
      [ Make pmu_add_cpu_aliases() return void, since it was returning just '0' and
        furthermore, even that was being discarded via an explicit (void) cast ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      933f82ff
    • Andi Kleen's avatar
      perf jevents: Program to convert JSON file · 80eeb67f
      Andi Kleen authored
      This is a modified version of an earlier patch by Andi Kleen.
      
      We expect architectures to create JSON files describing the performance
      monitoring (PMU) events that each CPU model/family of the architecture
      supports.
      
      Following is an example of the JSON file entry for an x86 event:
      
          	[
          	...
          	{
          	"EventCode": "0x00",
          	"UMask": "0x01",
          	"EventName": "INST_RETIRED.ANY",
          	"BriefDescription": "Instructions retired from execution.",
          	"PublicDescription": "Instructions retired from execution.",
          	"Counter": "Fixed counter 1",
          	"CounterHTOff": "Fixed counter 1",
          	"SampleAfterValue": "2000003",
          	"SampleAfterValue": "2000003",
          	"MSRIndex": "0",
          	"MSRValue": "0",
          	"TakenAlone": "0",
          	"CounterMask": "0",
          	"Invert": "0",
          	"AnyThread": "0",
          	"EdgeDetect": "0",
          	"PEBS": "0",
          	"PRECISE_STORE": "0",
          	"Errata": "null",
          	"Offcore": "0"
          	},
          	...
      
          	]
      
      All the PMU events supported by a CPU model/family must be grouped into
      "topics" such as "Pipelining", "Floating-point", "Virtual-memory" etc.
      
      All events belonging to a topic must be placed in a separate JSON file
      (eg: "Pipelining.json") and all the topic JSON files for a CPU model must
      be in a separate directory.
      
      	Eg: for the CPU model "Silvermont_core":
      
          	$ ls tools/perf/pmu-events/arch/x86/Silvermont_core
          	Floating-point.json
          	Memory.json
          	Other.json
          	Pipelining.json
          	Virtualmemory.json
      
      Finally, to allow multiple CPU models to share a single set of JSON files,
      architectures must provide a mapping between a model and its set of events:
      
          	$ grep Silvermont tools/perf/pmu-events/arch/x86/mapfile.csv
          	GenuineIntel-6-4D,V13,Silvermont_core,core
          	GenuineIntel-6-4C,V13,Silvermont_core,core
      
      which maps each CPU, identified by [vendor, family, model, version, type]
      to a directory of JSON files. Thus two (or more) CPU models support the
      set of PMU events listed in the directory.
      
          	tools/perf/pmu-events/arch/x86/Silvermont_core/
      
      Given this organization of files, the program, jevents:
      
      	- locates all JSON files for each CPU-model of the architecture,
      
      	- parses all JSON files for the CPU-model and generates a C-style
      	  "PMU-events table" (pmu-events.c) for the model
      
      	- locates a mapfile for the architecture
      
      	- builds a global table, mapping each model of CPU to the corresponding
      	  PMU-events table.
      
      The 'pmu-events.c' is generated when building perf and added to libperf.a.
      The global table pmu_events_map[] table in this pmu-events.c will be used
      in perf in a follow-on patch.
      
      If the architecture does not have any JSON files or there is an error in
      processing them, an empty mapping file is created. This would allow the
      build of perf to proceed even if we are not able to provide aliases for
      events.
      
      The parser for JSON files allows parsing Intel style JSON event files. This
      allows to use an Intel event list directly with perf. The Intel event lists
      can be quite large and are too big to store in unswappable kernel memory.
      
      The conversion from JSON to C-style is straight forward.  The parser knows
      (very little) Intel specific information, and can be easily extended to
      handle fields for other CPUs.
      
      The parser code is partially shared with an independent parsing library,
      which is 2-clause BSD licensed. To avoid any conflicts I marked those
      files as BSD licensed too. As part of perf they become GPLv2.
      
      Committer notes:
      
      Fixes:
      
      1) Limit maxfds to 512 to avoid nftd() segfaulting on alloca() with a
         big rlim_max, as in docker containers - acme
      
      2) Make jevents a hostprog, supporting cross compilation - jolsa
      
      3) Use HOSTCC for jevents final step - acme
      
      4) Define _GNU_SOURCE for asprintf, as we can't use CC's EXTRA_CFLAGS,
        that has to have --sysroot on the Android NDK 24 - acme
      
      5) Removed $(srctree)/tools/perf/pmu-events/pmu-events.c from the
         'clean' target, it is generated on $(OUTPUT)pmu-events/pmu-events.c,
         which is already taken care of in the original patch - acme
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lkml.kernel.org/r/1473978296-20712-3-git-send-email-sukadev@linux.vnet.ibm.com
      Link: http://lkml.kernel.org/r/20160927141846.GA6589@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      80eeb67f
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 110a9e42
      Linus Torvalds authored
      Pull x86 apic updates from Ingo Molnar:
       "The main changes are:
      
         - Persistent CPU/node numbering across CPU hotplug/unplug events.
           This is a pretty involved series of changes that first fetches all
           the information during bootup and then uses it for the various
           hotplug/unplug methods. (Gu Zheng, Dou Liyang)
      
         - IO-APIC hot-add/remove fixes and enhancements. (Rui Wang)
      
         - ... various fixes, cleanups and enhancements"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
        x86/apic: Fix silent & fatal merge conflict in __generic_processor_info()
        acpi: Fix broken error check in map_processor()
        acpi: Validate processor id when mapping the processor
        acpi: Provide mechanism to validate processors in the ACPI tables
        x86/acpi: Set persistent cpuid <-> nodeid mapping when booting
        x86/acpi: Enable MADT APIs to return disabled apicids
        x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping
        x86/acpi: Enable acpi to register all possible cpus at boot time
        x86/numa: Online memory-less nodes at boot time
        x86/apic: Get rid of apic_version[] array
        x86/apic: Order irq_enter/exit() calls correctly vs. ack_APIC_irq()
        x86/ioapic: Ignore root bridges without a companion ACPI device
        x86/apic: Update comment about disabling processor focus
        x86/smpboot: Check APIC ID before setting up default routing
        x86/ioapic: Fix IOAPIC failing to request resource
        x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd
        x86/ioapic: Fix setup_res() failing to get resource
        x86/ioapic: Support hot-removal of IOAPICs present during boot
        x86/ioapic: Change prototype of acpi_ioapic_add()
        x86/apic, ACPI: Fix incorrect assignment when handling apic/x2apic entries
        ...
      110a9e42
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · af79ad2b
      Linus Torvalds authored
      Pull scheduler changes from Ingo Molnar:
       "The main changes are:
      
         - irqtime accounting cleanups and enhancements. (Frederic Weisbecker)
      
         - schedstat debugging enhancements, make it more broadly runtime
           available. (Josh Poimboeuf)
      
         - More work on asymmetric topology/capacity scheduling. (Morten
           Rasmussen)
      
         - sched/wait fixes and cleanups. (Oleg Nesterov)
      
         - PELT (per entity load tracking) improvements. (Peter Zijlstra)
      
         - Rewrite and enhance select_idle_siblings(). (Peter Zijlstra)
      
         - sched/numa enhancements/fixes (Rik van Riel)
      
         - sched/cputime scalability improvements (Stanislaw Gruszka)
      
         - Load calculation arithmetics fixes. (Dietmar Eggemann)
      
         - sched/deadline enhancements (Tommaso Cucinotta)
      
         - Fix utilization accounting when switching to the SCHED_NORMAL
           policy. (Vincent Guittot)
      
         - ... plus misc cleanups and enhancements"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits)
        sched/irqtime: Consolidate irqtime flushing code
        sched/irqtime: Consolidate accounting synchronization with u64_stats API
        u64_stats: Introduce IRQs disabled helpers
        sched/irqtime: Remove needless IRQs disablement on kcpustat update
        sched/irqtime: No need for preempt-safe accessors
        sched/fair: Fix min_vruntime tracking
        sched/debug: Add SCHED_WARN_ON()
        sched/core: Fix set_user_nice()
        sched/fair: Introduce set_curr_task() helper
        sched/core, ia64: Rename set_curr_task()
        sched/core: Fix incorrect utilization accounting when switching to fair class
        sched/core: Optimize SCHED_SMT
        sched/core: Rewrite and improve select_idle_siblings()
        sched/core: Replace sd_busy/nr_busy_cpus with sched_domain_shared
        sched/core: Introduce 'struct sched_domain_shared'
        sched/core: Restructure destroy_sched_domain()
        sched/core: Remove unused @cpu argument from destroy_sched_domain*()
        sched/wait: Introduce init_wait_entry()
        sched/wait: Avoid abort_exclusive_wait() in __wait_on_bit_lock()
        sched/wait: Avoid abort_exclusive_wait() in ___wait_event()
        ...
      af79ad2b
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e606d81d
      Linus Torvalds authored
      Pull RAS updates from Ingo Molnar:
       "The main changes were:
      
         - Lots of enhancements for AMD SMCA (Scalable MCA
           features/extensions) systems: extract, decode and print more
           hardware error information and add matching support on the
           injection/testing side as well. (Yazn Ghannam)
      
         - Various MCE handling improvements on modern Intel Xeons. (Tony
           Luck)
      
         - Plus misc fixes and enhancements"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
        x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit
        x86/RAS/mce_amd_inj: Fix signed wrap around when decrementing index 'i'
        x86/RAS/mce_amd_inj: Fix some W= warnings
        x86/MCE/AMD, EDAC: Handle reserved bank 4 on Fam17h properly
        x86/mce/AMD: Extract the error address on SMCA systems
        x86/mce, EDAC/mce_amd: Print MCA_SYND and MCA_IPID during MCE on SMCA systems
        x86/mce/AMD: Save MCA_IPID in MCE struct on SMCA systems
        x86/mce/AMD: Ensure the deferred error interrupt is of type APIC on SMCA systems
        x86/mce/AMD: Update sysfs bank names for SMCA systems
        x86/mce/AMD, EDAC/mce_amd: Define and use tables for known SMCA IP types
        EDAC/mce_amd: Use SMCA prefix for error descriptions arrays
        EDAC/mce_amd: Add missing SMCA error descriptions
        x86/mce/AMD: Read MSRs on the CPU allocating the threshold blocks
        x86/RAS: Add syndrome support to mce_amd_inj
        EDAC/mce_amd: Print syndrome register value on SMCA systems
        x86/mce: Add support for new MCA_SYND register
        x86/mce/AMD: Use msr_ops.misc() in allocate_threshold_blocks()
        x86/mce: Drop X86_FEATURE_MCE_RECOVERY and the related model string test
        x86/mce: Improve memcpy_mcsafe()
        x86/mce: Add PCI quirks to identify Xeons with machine check recovery
        ...
      e606d81d