1. 06 11月, 2013 1 次提交
    • H
      x86/cpu: Always print SMP information in /proc/cpuinfo · a477c859
      HATAYAMA Daisuke 提交于
      Currently show_cpuinfo_core() displays cpu core information only if
      the number of threads per a whole cores is 2 or larger.
      
      However, this condition doesn't care about the number of
      sockets. For example, this condition doesn't hold on systems
      with two logical cpus consisting of two sockets and a single
      core on each socket - yet the topology information would be
      interesting to see in that case as well.
      
      I don't know whether or not there are processors in real world
      by which such configurations are possible, but at least on
      vitual machine environments, such configuration can occur,
      typically when no explicit SMP information is provided in
      advance.
      
      For example, on qemu/KVM, SMP information is specified via -smp
      command-line option, more specifically, its syntax is:
      
        -smp n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]
      
      If this is not specified, qemu tells configuration with
      n-sockets, 1-core and 1-thread to the guest machine, on which
      guest, MP information is not displayed in /proc/cpuinfo.
      
      I saw this situation on VMWare guest environment, too.
      
      To fix this issue, this patch simply removes the condition
      because this information is useful even if there's only 1
      thread.
      Signed-off-by: NHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/5277D644.4090707@jp.fujitsu.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      a477c859
  2. 07 6月, 2013 1 次提交
  3. 03 4月, 2013 3 次提交
  4. 10 2月, 2013 1 次提交
    • L
      x86 idle: remove 32-bit-only "no-hlt" parameter, hlt_works_ok flag · 27be4570
      Len Brown 提交于
      Remove 32-bit x86 a cmdline param "no-hlt",
      and the cpuinfo_x86.hlt_works_ok that it sets.
      
      If a user wants to avoid HLT, then "idle=poll"
      is much more useful, as it avoids invocation of HLT
      in idle, while "no-hlt" failed to do so.
      
      Indeed, hlt_works_ok was consulted in only 3 places.
      
      First, in /proc/cpuinfo where "hlt_bug yes"
      would be printed if and only if the user booted
      the system with "no-hlt" -- as there was no other code
      to set that flag.
      
      Second, check_hlt() would not invoke halt() if "no-hlt"
      were on the cmdline.
      
      Third, it was consulted in stop_this_cpu(), which is invoked
      by native_machine_halt()/reboot_interrupt()/smp_stop_nmi_callback() --
      all cases where the machine is being shutdown/reset.
      The flag was not consulted in the more frequently invoked
      play_dead()/hlt_play_dead() used in processor offline and suspend.
      
      Since Linux-3.0 there has been a run-time notice upon "no-hlt" invocations
      indicating that it would be removed in 2012.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Cc: x86@kernel.org
      27be4570
  5. 18 12月, 2012 1 次提交
  6. 26 9月, 2012 1 次提交
  7. 21 12月, 2011 1 次提交
  8. 19 10月, 2011 1 次提交
  9. 14 10月, 2011 1 次提交
  10. 11 7月, 2009 1 次提交
  11. 14 6月, 2009 1 次提交
  12. 05 5月, 2009 1 次提交
    • A
      x86: show number of core_siblings instead of thread_siblings in /proc/cpuinfo · 35d11680
      Andreas Herrmann 提交于
      Commit 7ad728f9
      (cpumask: x86: convert cpu_sibling_map/cpu_core_map to cpumask_var_t)
      changed the output of /proc/cpuinfo for siblings:
      
      Example on an AMD Phenom:
      
        physical id   : 0
        siblings : 1
        core id	   : 3
        cpu cores  : 4
      
      Before that commit it was:
      
        physical id	: 0
        siblings : 4
        core id	   : 3
        cpu cores  : 4
      
      Instead of cpu_core_mask it now uses cpu_sibling_mask to count siblings.
      This is due to the following hunk of above commit:
      
      |  --- a/arch/x86/kernel/cpu/proc.c
      |  +++ b/arch/x86/kernel/cpu/proc.c
      |  @@ -14,7 +14,7 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinf
      |          if (c->x86_max_cores * smp_num_siblings > 1) {
      |                  seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
      |                  seq_printf(m, "siblings\t: %d\n",
      |  -                          cpus_weight(per_cpu(cpu_core_map, cpu)));
      |  +                          cpumask_weight(cpu_sibling_mask(cpu)));
      |                  seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id);
      |                  seq_printf(m, "cpu cores\t: %d\n", c->booted_cores);
      |                  seq_printf(m, "apicid\t\t: %d\n", c->apicid);
      
      This was a mistake, because the impact line shows that this side-effect
      was not anticipated:
      
         Impact: reduce per-cpu size for CONFIG_CPUMASK_OFFSTACK=y
      
      So revert the respective hunk to restore the old behavior.
      
      [ Impact: fix sibling-info regression in /proc/cpuinfo ]
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <20090504182859.GA29045@alberich.amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      35d11680
  13. 13 3月, 2009 2 次提交
  14. 01 3月, 2009 1 次提交
  15. 22 10月, 2008 1 次提交
    • L
      x86/proc: fix /proc/cpuinfo cpu offline bug · bc8bcc79
      Lai Jiangshan 提交于
      Impact: fix missing CPUs in /proc/cpuinfo after CPU hotunplug/hotreplug
      
      In my test, I found that if a cpu has been offline,
      the next cpus may not be shown in the /proc/cpuinfo.
      
      if one read() cannot consume the whole /proc/cpuinfo,
      c_start() will be called again in the next read() calls.
      And *pos has been increased by 1 by the caller(seq_read()).
      if this time the cpu#*pos is offline, c_start() will return
      NULL, and the next cpus can not be shown.
      
      this fix use next_cpu_nr(*pos - 1, cpu_online_map) to
      search the next unshown cpu.
      
      the most easy way to reproduce this bug:
      1) offline cpu#1             (cpu#0 is online)
      2) dd ibs=2 if=/proc/cpuinfo
         the result is that only cpu#0 is shown.
         cpu#2 and cpu#3 .... cannot be shown in /proc/cpuinfo
         it's bug.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bc8bcc79
  16. 20 7月, 2008 1 次提交
  17. 19 4月, 2008 1 次提交
  18. 17 4月, 2008 5 次提交
  19. 04 2月, 2008 1 次提交
  20. 30 1月, 2008 1 次提交
  21. 17 11月, 2007 1 次提交
    • A
      x86: show cpuinfo only for online CPUs · c0c52d28
      Andreas Herrmann 提交于
      Fix regressions introduced with 92cb7612.
      
      It can happen that cpuinfo is displayed for CPUs that are not online or
      even worse for CPUs not present at all. As an example, following was
      shown for a "second" CPU of a single core K8 variant:
      
          processor       : 0
          vendor_id       : unknown
          cpu family      : 0
          model           : 0
          model name      : unknown
          stepping        : 0
          cache size      : 0 KB
          fpu             : yes
          fpu_exception   : yes
          cpuid level     : 0
          wp              : yes
          flags           :
          bogomips        : 0.00
          clflush size    : 0
          cache_alignment : 0
          address sizes   : 0 bits physical, 0 bits virtual
          power management:
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      c0c52d28
  22. 30 10月, 2007 1 次提交
  23. 20 10月, 2007 1 次提交
    • M
      x86: convert cpuinfo_x86 array to a per_cpu array · 92cb7612
      Mike Travis 提交于
      cpu_data is currently an array defined using NR_CPUS.  This means that
      we overallocate since we will rarely really use maximum configured cpus.
      When NR_CPU count is raised to 4096 the size of cpu_data becomes
      3,145,728 bytes.
      
      These changes were adopted from the sparc64 (and ia64) code.  An
      additional field was added to cpuinfo_x86 to be a non-ambiguous cpu
      index.  This corresponds to the index into a cpumask_t as well as the
      per_cpu index.  It's used in various places like show_cpuinfo().
      
      cpu_data is defined to be the boot_cpu_data structure for the NON-SMP
      case.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Mark M. Hoffman <mhoffman@lightlink.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      92cb7612
  24. 17 10月, 2007 1 次提交
    • M
      x86: Convert cpu_core_map to be a per cpu variable · 08357611
      Mike Travis 提交于
      This is from an earlier message from 'Christoph Lameter':
      
          cpu_core_map is currently an array defined using NR_CPUS. This means that
          we overallocate since we will rarely really use maximum configured cpu.
      
          If we put the cpu_core_map into the per cpu area then it will be allocated
          for each processor as it comes online.
      
          This means that the core map cannot be accessed until the per cpu area
          has been allocated. Xen does a weird thing here looping over all processors
          and zeroing the masks that are not yet allocated and that will be zeroed
          when they are allocated. I commented the code out.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      08357611
  25. 11 10月, 2007 1 次提交
  26. 13 7月, 2007 2 次提交
  27. 03 5月, 2007 1 次提交
  28. 13 2月, 2007 1 次提交
  29. 07 12月, 2006 1 次提交
  30. 26 9月, 2006 1 次提交
  31. 28 6月, 2006 2 次提交