linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v6 0/5] x86: Cleanup and simplify cpu-specific data
@ 2017-01-15 19:39 Borislav Petkov
       [not found] ` <CAELBVzCAU_nKrmXOzd6-bsxbY7tdq8mG4xnuwdiem_0wo1EwZw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2017-01-15 19:39 UTC (permalink / raw)
  To: Kevin Winchester
  Cc: hpa, Ingo Molnar, Thomas Gleixner, Randy Dunlap, Nick Bowler,
	linux-kernel

Sorry for top-posting but I'm reviving an old thread so I'm excused :-)

So looking at those in my mbox, they look like nice cleanup and are not
upstream. What's the story, was there a "we don't want them because ..."
argument somewhere or what's up?

If not, we probably should redo them and get them at least looked at in
detail.

Hmmm?

On Sun, Apr 29, 2012 at 08:33:25PM -0300, Kevin Winchester wrote:
> Various per-cpu fields are define in arch/x86/kernel/smpboot.c that are
> basically equivalent to the cpu-specific data in struct cpuinfo_x86.
> By moving these fields into the structure, a number of codepaths can be
> simplified since they no longer need to care about those fields not
> existing on !SMP builds.
> 
> The size effects on allno (UP) and allyes (MAX_SMP) kernels are as
> follows:
> 
>     text      data       bss        dec      hex  filename
>  1369227    181536   1399180    2949943   2d0337  vmlinux.i386.allno
>  1370216    181600   1399012    2950828   2d06ac  vmlinux.i386.allno.after
>  1608231    310968    505088    2424287   24fddf  vmlinux.x86_64.allno
>  1609232    311032    504896    2425160   250148  vmlinux.x86_64.allno.after
> 97643748   6891747  34668544  139204039  84c15c7  vmlinux.i386.allyes
> 97643582   6892011  34668544  139204137  84c1629  vmlinux.i386.allyes.after
> 85869519  13567071  44511232  143947822  894782e  vmlinux.x86_64.allyes
> 85869134  13568607  44511232  143948973  8947cad  vmlinux.x86_64.allyes.after
> 
> As can be seen, the kernels get slighly larger, but the code reduction/
> simplification should be enough to compensate for it.
> 
> Changes in v6:
> - Rebased series against mainline 3.4-rc5
> 
> Changes in v5:
> - Reduced the number of files affected in the patchset by keeping helper
> functions in arch/x86/include/asm/smp.h
> - Rebased to latest tip/master
> 
> Kevin Winchester (5):
>   x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86
>   x86: Move per cpu cpu_llc_id to a field in struct cpuinfo_x86
>   x86: Move per cpu cpu_sibling_map to a field in struct cpuinfo_x86
>   x86: Move per cpu cpu_core_map to a field in struct cpuinfo_x86
>   x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings
>     into common.c
> 
>  arch/x86/include/asm/perf_event_p4.h  |   14 +++---------
>  arch/x86/include/asm/processor.h      |   10 +++++++++
>  arch/x86/include/asm/smp.h            |   17 ++++----------
>  arch/x86/include/asm/topology.h       |    8 +++----
>  arch/x86/kernel/apic/apic_numachip.c  |    3 +--
>  arch/x86/kernel/cpu/amd.c             |   19 +++++-----------
>  arch/x86/kernel/cpu/common.c          |    5 +++++
>  arch/x86/kernel/cpu/intel_cacheinfo.c |   11 ++--------
>  arch/x86/kernel/cpu/mcheck/mce_amd.c  |    2 --
>  arch/x86/kernel/cpu/perf_event_p4.c   |    4 ++--
>  arch/x86/kernel/cpu/proc.c            |    5 ++---
>  arch/x86/kernel/process.c             |    5 ++---
>  arch/x86/kernel/smpboot.c             |   39 +++++++--------------------------
>  arch/x86/oprofile/nmi_int.c           |    6 -----
>  arch/x86/oprofile/op_model_p4.c       |   11 +---------
>  arch/x86/xen/smp.c                    |    6 -----
>  drivers/cpufreq/p4-clockmod.c         |    2 --
>  drivers/cpufreq/powernow-k8.c         |    7 ------
>  drivers/cpufreq/speedstep-ich.c       |    2 --
>  drivers/hwmon/coretemp.c              |    4 ----
>  20 files changed, 48 insertions(+), 132 deletions(-)
> 
> -- 
> 1.7.10
> 
> 

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v6 0/5] x86: Cleanup and simplify cpu-specific data
       [not found] ` <CAELBVzCAU_nKrmXOzd6-bsxbY7tdq8mG4xnuwdiem_0wo1EwZw@mail.gmail.com>
@ 2017-01-22 17:50   ` Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2017-01-22 17:50 UTC (permalink / raw)
  To: Kevin Winchester
  Cc: hpa, Ingo Molnar, Thomas Gleixner, Randy Dunlap, Nick Bowler,
	linux-kernel

On Sun, Jan 22, 2017 at 05:47:35PM +0000, Kevin Winchester wrote:
> I still think this was a reasonably nice clean up for some of the x86
> code, so if anyone else wants to take it on, I would be glad to see it
> eventually be accepted.

Yeah, same here. If no one beats me to it, I'd put it on the TODO as the
idea has some merit.

Thanks!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v6 0/5] x86: Cleanup and simplify cpu-specific data
  2012-04-26 21:21 [PATCH v5 " H. Peter Anvin
@ 2012-04-29 23:33 ` Kevin Winchester
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Winchester @ 2012-04-29 23:33 UTC (permalink / raw)
  To: hpa, Ingo Molnar
  Cc: Kevin Winchester, Thomas Gleixner, Borislav Petkov, Randy Dunlap,
	Nick Bowler, linux-kernel

Various per-cpu fields are define in arch/x86/kernel/smpboot.c that are
basically equivalent to the cpu-specific data in struct cpuinfo_x86.
By moving these fields into the structure, a number of codepaths can be
simplified since they no longer need to care about those fields not
existing on !SMP builds.

The size effects on allno (UP) and allyes (MAX_SMP) kernels are as
follows:

    text      data       bss        dec      hex  filename
 1369227    181536   1399180    2949943   2d0337  vmlinux.i386.allno
 1370216    181600   1399012    2950828   2d06ac  vmlinux.i386.allno.after
 1608231    310968    505088    2424287   24fddf  vmlinux.x86_64.allno
 1609232    311032    504896    2425160   250148  vmlinux.x86_64.allno.after
97643748   6891747  34668544  139204039  84c15c7  vmlinux.i386.allyes
97643582   6892011  34668544  139204137  84c1629  vmlinux.i386.allyes.after
85869519  13567071  44511232  143947822  894782e  vmlinux.x86_64.allyes
85869134  13568607  44511232  143948973  8947cad  vmlinux.x86_64.allyes.after

As can be seen, the kernels get slighly larger, but the code reduction/
simplification should be enough to compensate for it.

Changes in v6:
- Rebased series against mainline 3.4-rc5

Changes in v5:
- Reduced the number of files affected in the patchset by keeping helper
functions in arch/x86/include/asm/smp.h
- Rebased to latest tip/master

Kevin Winchester (5):
  x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_llc_id to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_sibling_map to a field in struct cpuinfo_x86
  x86: Move per cpu cpu_core_map to a field in struct cpuinfo_x86
  x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings
    into common.c

 arch/x86/include/asm/perf_event_p4.h  |   14 +++---------
 arch/x86/include/asm/processor.h      |   10 +++++++++
 arch/x86/include/asm/smp.h            |   17 ++++----------
 arch/x86/include/asm/topology.h       |    8 +++----
 arch/x86/kernel/apic/apic_numachip.c  |    3 +--
 arch/x86/kernel/cpu/amd.c             |   19 +++++-----------
 arch/x86/kernel/cpu/common.c          |    5 +++++
 arch/x86/kernel/cpu/intel_cacheinfo.c |   11 ++--------
 arch/x86/kernel/cpu/mcheck/mce_amd.c  |    2 --
 arch/x86/kernel/cpu/perf_event_p4.c   |    4 ++--
 arch/x86/kernel/cpu/proc.c            |    5 ++---
 arch/x86/kernel/process.c             |    5 ++---
 arch/x86/kernel/smpboot.c             |   39 +++++++--------------------------
 arch/x86/oprofile/nmi_int.c           |    6 -----
 arch/x86/oprofile/op_model_p4.c       |   11 +---------
 arch/x86/xen/smp.c                    |    6 -----
 drivers/cpufreq/p4-clockmod.c         |    2 --
 drivers/cpufreq/powernow-k8.c         |    7 ------
 drivers/cpufreq/speedstep-ich.c       |    2 --
 drivers/hwmon/coretemp.c              |    4 ----
 20 files changed, 48 insertions(+), 132 deletions(-)

-- 
1.7.10


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-22 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-15 19:39 [PATCH v6 0/5] x86: Cleanup and simplify cpu-specific data Borislav Petkov
     [not found] ` <CAELBVzCAU_nKrmXOzd6-bsxbY7tdq8mG4xnuwdiem_0wo1EwZw@mail.gmail.com>
2017-01-22 17:50   ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2012-04-26 21:21 [PATCH v5 " H. Peter Anvin
2012-04-29 23:33 ` [PATCH v6 " Kevin Winchester

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).