linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET core/percpu] percpu: convert most archs to dynamic percpu
@ 2009-05-20  7:37 Tejun Heo
  2009-05-20  7:37 ` [PATCH 1/7] percpu: use dynamic percpu allocator as the default percpu allocator Tejun Heo
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Tejun Heo @ 2009-05-20  7:37 UTC (permalink / raw)
  To: mingo, linux-kernel, x86, ink, rth, linux, hskinnemoen, cooloney,
	starvik, jesper.nilsson, dhowells, ysato, tony.luck, takata,
	geert, monstr, ralf, kyle, benh, paulus, schwidefsky,
	heiko.carstens, lethal, davem, jdike, chris, rusty

Hello,

Please do NOT pull before maintainers of alpha and s390 ack.  Upon
ack, please pull from the following git tree.

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-percpu

This patchset is combination of the last patch of
percpu-use-dynamic-percpu-allocator-as-default patchset[1] and patches
inspired by alpha conversion patch[2] posted by Ivan Kokshaysky.

  0001-percpu-use-dynamic-percpu-allocator-as-the-default.patch
  0002-linker-script-throw-away-.discard-section.patch
  0003-percpu-clean-up-percpu-variable-definitions.patch
  0004-percpu-enforce-global-uniqueness-and-disallow-in-fu.patch
  0005-alpha-kill-unnecessary-__used-attribute-in-PER_CPU_.patch
  0006-alpha-switch-to-dynamic-percpu-allocator.patch
  0007-s390-switch-to-dynamic-percpu-allocator.patch

0001 is mostly unchanged except for added Acked-by's.

0002-0003 prepare for percpu variable definition update - .discard is
thrown away on all archs when linking kernel and modules, static
percpu variables in functions are moved outside of the function and
all static percpu variables are given unique names.

0004 updates percpu variable definition such that all percpu variables
in the same link unit have unique names regardless of its scope
(static or global) and disallow in-function static definitions.  The
new definition uses dummy variables in .discard to enforce the
declaration/definition semantics and always defines percpu variables
as globals.  This allows archs to add 'weak' attribute if necessary.

0005-0006 converts alpha to use 'weak' attribute instead of inline
assembly to generate GOT based reference when referencing percpu
variables from modules, which in turn allows conversion to dynamic
percpu allocator.

0007 does the same for s390.

The new DECLARE/DEFINE macros implement the following behaviors.

a. DECLARE + static DEFINE -> compile error

b. multiple non-static DEFINEs with the same name -> compile error

c. multiple static/global DEFINEs with the same name -> compile error

d. in function static DEFINEs -> compile error

#a and #b are expected behaviors on DECLARE/DEFINE macros in general.
#c and #d are necessary to allow 'weak' attribute on certain archs.
Please note that the rules are applied consistently whether 'weak'
attribute is specified or not.  This eases catching mistakes and makes
things less confusing.

Test config boots and works fine on x86_64.  alpha and s390 are
compile tested and verified to generate necessary code for external
references but I don't have any way to actually verify them, so please
test them.  :-)

all-yes-config on x86_64 is building now.  Ergggh... I want more
memory.  Okay, completed successfully.

This patchset is on top of

the last #tj-percpu (e1b9aa3f47242e757c776a3771bb6613e675bf9c)
+ linus#master (279e677faa775ad16e75c32e1bf4a37f8158bc61)

and contains the following changes.

 Makefile                               |    2 
 arch/alpha/include/asm/percpu.h        |  101 ++-------------------------------
 arch/alpha/include/asm/tlbflush.h      |    1 
 arch/alpha/kernel/vmlinux.lds.S        |    1 
 arch/arm/kernel/vmlinux.lds.S          |    1 
 arch/avr32/kernel/vmlinux.lds.S        |    1 
 arch/blackfin/kernel/vmlinux.lds.S     |    1 
 arch/cris/include/asm/mmu_context.h    |    2 
 arch/cris/kernel/vmlinux.lds.S         |    1 
 arch/frv/kernel/vmlinux.lds.S          |    2 
 arch/h8300/kernel/vmlinux.lds.S        |    1 
 arch/ia64/Kconfig                      |    3 
 arch/ia64/kernel/vmlinux.lds.S         |    1 
 arch/m32r/kernel/vmlinux.lds.S         |    1 
 arch/m68k/kernel/vmlinux-std.lds       |    1 
 arch/m68k/kernel/vmlinux-sun3.lds      |    1 
 arch/m68knommu/kernel/vmlinux.lds.S    |    1 
 arch/microblaze/kernel/vmlinux.lds.S   |    2 
 arch/mips/kernel/vmlinux.lds.S         |    1 
 arch/mn10300/kernel/vmlinux.lds.S      |    1 
 arch/parisc/kernel/vmlinux.lds.S       |    1 
 arch/powerpc/Kconfig                   |    3 
 arch/powerpc/kernel/vmlinux.lds.S      |    1 
 arch/s390/include/asm/percpu.h         |   32 ++--------
 arch/s390/kernel/vmlinux.lds.S         |    1 
 arch/sh/kernel/vmlinux_32.lds.S        |    1 
 arch/sh/kernel/vmlinux_64.lds.S        |    1 
 arch/sparc/Kconfig                     |    3 
 arch/sparc/kernel/vmlinux.lds.S        |    1 
 arch/um/kernel/dyn.lds.S               |    2 
 arch/um/kernel/uml.lds.S               |    2 
 arch/x86/Kconfig                       |    3 
 arch/xtensa/kernel/vmlinux.lds.S       |    1 
 block/as-iosched.c                     |   10 +--
 block/cfq-iosched.c                    |   10 +--
 drivers/cpufreq/cpufreq_conservative.c |   12 +--
 drivers/cpufreq/cpufreq_ondemand.c     |   15 ++--
 drivers/xen/events.c                   |    9 +-
 include/linux/percpu-defs.h            |   34 ++++++++---
 include/linux/percpu.h                 |   12 ++-
 init/main.c                            |   24 -------
 kernel/module.c                        |    6 -
 mm/Makefile                            |    2 
 mm/allocpercpu.c                       |   28 +++++++++
 mm/page-writeback.c                    |    5 -
 mm/percpu.c                            |   40 ++++++++++++-
 net/ipv4/syncookies.c                  |    4 -
 net/ipv6/syncookies.c                  |    4 -
 scripts/module-common.lds              |    8 ++
 49 files changed, 206 insertions(+), 195 deletions(-)

Thanks.

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/804631/focus=804627
[2] http://thread.gmane.org/gmane.linux.kernel/820849/focus=820926

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [GIT PATCH core/percpu] percpu: convert most archs to dynamic percpu, take#2
@ 2009-06-01  8:58 Tejun Heo
  2009-06-01  8:58 ` [PATCH 5/7] alpha: kill unnecessary __used attribute in PER_CPU_ATTRIBUTES Tejun Heo
  0 siblings, 1 reply; 19+ messages in thread
From: Tejun Heo @ 2009-06-01  8:58 UTC (permalink / raw)
  To: JBeulich, andi, mingo, hpa, tglx, linux-kernel, x86, ink, rth,
	linux, hskinnemoen, cooloney, starvik, jesper.nilsson, dhowells,
	ysato, tony.luck, takata, geert, monstr, ralf, kyle, benh, paulus,
	schwidefsky, heiko.carstens, lethal, davem, jdike, chris, rusty

Hello,

Upon ack, please pull from the following git tree.

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-percpu

This is the second take of percpu-convert-most-archs-to-dynamic-percpu
patchset.  Changes from the last take[L] are

* Rebased on top of tj-percpu-fix-remap.

* As suggested by Rusty Russell, complex percpu definition macros
  which used dummy variables to guarantee scope and uniqueness have
  been dropped.  Instead, now all percpu variables are required to be
  global.  No statics allowed.  All in-kernel users are converted by
  this patchset.

* Linker script .discard section handling patch no longer necessary
  and dropped.

This patchset contains the following seven patches.

  0001-percpu-use-dynamic-percpu-allocator-as-the-default.patch
  0002-percpu-cleanup-percpu-array-definitions.patch
  0003-percpu-clean-up-percpu-variable-definitions.patch
  0004-percpu-enforce-global-definition.patch
  0005-alpha-kill-unnecessary-__used-attribute-in-PER_CPU_.patch
  0006-alpha-switch-to-dynamic-percpu-allocator.patch
  0007-s390-switch-to-dynamic-percpu-allocator.patch

0001 converts archs which are easy to convert and make dynamic percpu
allocator the default.  0002-0003 prepares for percpu variable
definition change.  0004 enforces global definitions.  0005-0007
convert alpha and s390 to dynamic percpu variable using the weak
attribute.

This patchset is on top of

core/percpu (e1b9aa3f47242e757c776a3771bb6613e675bf9c)
+ linus-2.6#master (3218911f839b6c85acbf872ad264ea69aa4d89ad)
+ x86-percpu-fix-pageattr patchset, take#3 [1]

and contains the following changes.

 arch/alpha/include/asm/percpu.h                  |  101 ++---------------------
 arch/alpha/include/asm/tlbflush.h                |    1 
 arch/arm/kernel/smp.c                            |    2 
 arch/arm/mach-realview/localtimer.c              |    2 
 arch/avr32/kernel/cpu.c                          |    2 
 arch/blackfin/mach-common/smp.c                  |    2 
 arch/blackfin/mm/sram-alloc.c                    |   22 ++---
 arch/cris/include/asm/mmu_context.h              |    2 
 arch/ia64/Kconfig                                |    3 
 arch/ia64/kernel/crash.c                         |    2 
 arch/ia64/kernel/smp.c                           |    4 
 arch/ia64/kernel/traps.c                         |    2 
 arch/ia64/kvm/kvm-ia64.c                         |    2 
 arch/ia64/sn/kernel/setup.c                      |    2 
 arch/ia64/xen/irq_xen.c                          |   24 ++---
 arch/mips/kernel/cevt-bcm1480.c                  |    6 -
 arch/mips/kernel/cevt-sb1250.c                   |    6 -
 arch/mips/kernel/topology.c                      |    2 
 arch/mips/sgi-ip27/ip27-timer.c                  |    4 
 arch/parisc/kernel/irq.c                         |    2 
 arch/parisc/kernel/topology.c                    |    2 
 arch/powerpc/Kconfig                             |    3 
 arch/powerpc/kernel/cacheinfo.c                  |    2 
 arch/powerpc/kernel/process.c                    |    2 
 arch/powerpc/kernel/sysfs.c                      |    4 
 arch/powerpc/kernel/time.c                       |    6 -
 arch/powerpc/mm/pgtable.c                        |    2 
 arch/powerpc/mm/stab.c                           |    4 
 arch/powerpc/oprofile/op_model_cell.c            |    2 
 arch/powerpc/platforms/cell/cpufreq_spudemand.c  |    2 
 arch/powerpc/platforms/cell/interrupt.c          |    2 
 arch/powerpc/platforms/ps3/interrupt.c           |    2 
 arch/powerpc/platforms/ps3/smp.c                 |    2 
 arch/powerpc/platforms/pseries/dtl.c             |    2 
 arch/powerpc/platforms/pseries/iommu.c           |    2 
 arch/s390/appldata/appldata_base.c               |    2 
 arch/s390/include/asm/percpu.h                   |   32 +------
 arch/s390/kernel/nmi.c                           |    2 
 arch/s390/kernel/smp.c                           |    2 
 arch/s390/kernel/time.c                          |    4 
 arch/s390/kernel/vtime.c                         |    2 
 arch/sh/kernel/timers/timer-broadcast.c          |    2 
 arch/sh/kernel/topology.c                        |    2 
 arch/sparc/Kconfig                               |    3 
 arch/sparc/kernel/nmi.c                          |    6 -
 arch/sparc/kernel/pci_sun4v.c                    |    2 
 arch/sparc/kernel/sysfs.c                        |    4 
 arch/sparc/kernel/time_64.c                      |    4 
 arch/x86/Kconfig                                 |    3 
 arch/x86/kernel/apic/apic.c                      |    2 
 arch/x86/kernel/apic/nmi.c                       |    8 -
 arch/x86/kernel/cpu/common.c                     |    2 
 arch/x86/kernel/cpu/cpu_debug.c                  |   10 +-
 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c       |    4 
 arch/x86/kernel/cpu/cpufreq/powernow-k8.c        |    2 
 arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c |    4 
 arch/x86/kernel/cpu/intel_cacheinfo.c            |    6 -
 arch/x86/kernel/cpu/mcheck/mce_64.c              |    4 
 arch/x86/kernel/cpu/mcheck/mce_amd_64.c          |    4 
 arch/x86/kernel/cpu/mcheck/mce_intel_64.c        |    2 
 arch/x86/kernel/cpu/mcheck/therm_throt.c         |    4 
 arch/x86/kernel/cpu/perfctr-watchdog.c           |    2 
 arch/x86/kernel/ds.c                             |    4 
 arch/x86/kernel/hpet.c                           |    2 
 arch/x86/kernel/irq_32.c                         |    8 -
 arch/x86/kernel/kvm.c                            |    2 
 arch/x86/kernel/kvmclock.c                       |    2 
 arch/x86/kernel/paravirt.c                       |    2 
 arch/x86/kernel/process_64.c                     |    2 
 arch/x86/kernel/smpboot.c                        |    2 
 arch/x86/kernel/tlb_uv.c                         |    6 -
 arch/x86/kernel/topology.c                       |    2 
 arch/x86/kernel/uv_time.c                        |    2 
 arch/x86/kernel/vmiclock_32.c                    |    2 
 arch/x86/kvm/svm.c                               |    2 
 arch/x86/kvm/vmx.c                               |    6 -
 arch/x86/kvm/x86.c                               |    2 
 arch/x86/mm/kmmio.c                              |    2 
 arch/x86/mm/mmio-mod.c                           |    4 
 arch/x86/oprofile/nmi_int.c                      |    4 
 arch/x86/xen/enlighten.c                         |    2 
 arch/x86/xen/multicalls.c                        |    2 
 arch/x86/xen/smp.c                               |    8 -
 arch/x86/xen/spinlock.c                          |    4 
 arch/x86/xen/time.c                              |   10 +-
 block/as-iosched.c                               |   10 +-
 block/blk-softirq.c                              |    2 
 block/cfq-iosched.c                              |   10 +-
 crypto/sha512_generic.c                          |    2 
 drivers/acpi/processor_core.c                    |    2 
 drivers/acpi/processor_thermal.c                 |    2 
 drivers/base/cpu.c                               |    2 
 drivers/char/random.c                            |    2 
 drivers/connector/cn_proc.c                      |    2 
 drivers/cpufreq/cpufreq.c                        |    8 -
 drivers/cpufreq/cpufreq_conservative.c           |   12 +-
 drivers/cpufreq/cpufreq_ondemand.c               |   15 +--
 drivers/cpufreq/cpufreq_stats.c                  |    2 
 drivers/cpufreq/cpufreq_userspace.c              |   11 +-
 drivers/cpufreq/freq_table.c                     |    2 
 drivers/cpuidle/governors/ladder.c               |    2 
 drivers/cpuidle/governors/menu.c                 |    2 
 drivers/crypto/padlock-aes.c                     |    2 
 drivers/lguest/page_tables.c                     |    2 
 drivers/lguest/x86/core.c                        |    2 
 drivers/xen/events.c                             |   13 +-
 fs/buffer.c                                      |    4 
 fs/file.c                                        |    2 
 fs/namespace.c                                   |    2 
 include/linux/percpu-defs.h                      |   10 +-
 include/linux/percpu.h                           |   12 ++
 init/main.c                                      |   24 -----
 kernel/kprobes.c                                 |    2 
 kernel/lockdep.c                                 |    2 
 kernel/module.c                                  |    6 -
 kernel/printk.c                                  |    2 
 kernel/profile.c                                 |    4 
 kernel/rcuclassic.c                              |    4 
 kernel/rcupdate.c                                |    2 
 kernel/rcupreempt.c                              |   10 +-
 kernel/rcutorture.c                              |    4 
 kernel/sched.c                                   |   30 +++---
 kernel/sched_clock.c                             |    2 
 kernel/sched_rt.c                                |    2 
 kernel/smp.c                                     |    6 -
 kernel/softirq.c                                 |    6 -
 kernel/softlockup.c                              |    6 -
 kernel/taskstats.c                               |    4 
 kernel/time/tick-sched.c                         |    2 
 kernel/time/timer_stats.c                        |    2 
 kernel/timer.c                                   |    2 
 kernel/trace/ring_buffer.c                       |    2 
 kernel/trace/trace.c                             |    6 -
 kernel/trace/trace_hw_branches.c                 |    4 
 kernel/trace/trace_irqsoff.c                     |    2 
 kernel/trace/trace_stack.c                       |    2 
 kernel/trace/trace_sysprof.c                     |    2 
 kernel/trace/trace_workqueue.c                   |    2 
 lib/radix-tree.c                                 |    2 
 lib/random32.c                                   |    2 
 mm/Makefile                                      |    2 
 mm/allocpercpu.c                                 |   28 ++++++
 mm/page-writeback.c                              |    5 -
 mm/percpu.c                                      |   40 ++++++++-
 mm/quicklist.c                                   |    2 
 mm/slab.c                                        |    4 
 mm/slub.c                                        |    6 -
 mm/swap.c                                        |    4 
 mm/vmalloc.c                                     |    2 
 mm/vmstat.c                                      |    2 
 net/core/drop_monitor.c                          |    2 
 net/core/flow.c                                  |    6 -
 net/core/sock.c                                  |    2 
 net/ipv4/route.c                                 |    2 
 net/ipv4/syncookies.c                            |    4 
 net/ipv6/syncookies.c                            |    4 
 net/socket.c                                     |    2 
 157 files changed, 399 insertions(+), 439 deletions(-)

Thanks.

--
tejun

[L] http://thread.gmane.org/gmane.linux.kernel/839059
[1] http://thread.gmane.org/gmane.linux.kernel/844298

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

end of thread, other threads:[~2009-06-01  9:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20  7:37 [PATCHSET core/percpu] percpu: convert most archs to dynamic percpu Tejun Heo
2009-05-20  7:37 ` [PATCH 1/7] percpu: use dynamic percpu allocator as the default percpu allocator Tejun Heo
2009-05-20  7:37 ` [PATCH 2/7] linker script: throw away .discard section Tejun Heo
2009-05-20  7:59   ` Mike Frysinger
2009-05-20  8:06     ` Tejun Heo
2009-05-20  8:18       ` Tejun Heo
2009-05-20  8:28         ` Mike Frysinger
2009-05-20  7:37 ` [PATCH 3/7] percpu: clean up percpu variable definitions Tejun Heo
2009-05-20  9:17   ` Jens Axboe
2009-05-25  6:07   ` Rusty Russell
2009-05-25 16:07     ` Tejun Heo
2009-05-20  7:37 ` [PATCH 4/7] percpu: enforce global uniqueness and disallow in-function statics Tejun Heo
2009-05-20  7:37 ` [PATCH 5/7] alpha: kill unnecessary __used attribute in PER_CPU_ATTRIBUTES Tejun Heo
2009-05-20  7:37 ` [PATCH 6/7] alpha: switch to dynamic percpu allocator Tejun Heo
2009-05-20  7:37 ` [PATCH 7/7] s390: " Tejun Heo
2009-05-20  8:41 ` [PATCHSET core/percpu] percpu: convert most archs to dynamic percpu Martin Schwidefsky
2009-05-20 13:49 ` Ivan Kokshaysky
2009-05-21  1:21 ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2009-06-01  8:58 [GIT PATCH core/percpu] percpu: convert most archs to dynamic percpu, take#2 Tejun Heo
2009-06-01  8:58 ` [PATCH 5/7] alpha: kill unnecessary __used attribute in PER_CPU_ATTRIBUTES Tejun Heo

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).