11 Dec, 2014

1 commit

  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

10 Oct, 2014

1 commit


09 Oct, 2014

1 commit

  • Pull timer fixes from Ingo Molnar:
    "Main changes:

    - Fix the deadlock reported by Dave Jones et al
    - Clean up and fix nohz_full interaction with arch abilities
    - nohz init code consolidation/cleanup"

    * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    nohz: nohz full depends on irq work self IPI support
    nohz: Consolidate nohz full init code
    arm64: Tell irq work about self IPI support
    arm: Tell irq work about self IPI support
    x86: Tell irq work about self IPI support
    irq_work: Force raised irq work to run on irq work interrupt
    irq_work: Introduce arch_irq_work_has_interrupt()
    nohz: Move nohz full init call to tick init

    Linus Torvalds
     

05 Oct, 2014

5 commits

  • The symbol is an orphan, get rid of it.

    Signed-off-by: Richard Weinberger
    Acked-by: Lennox Wu
    Cc: Paul Bolle
    [Guenter Roeck: Merge with 3.17-rc3; update headline]
    Signed-off-by: Guenter Roeck

    Richard Weinberger
     
  • The related error (with allmodconfig under score):

    CC [M] drivers/staging/speakup/speakup_acntpc.o
    In file included from drivers/staging/speakup/speakup_acntpc.c:33:0:
    drivers/staging/speakup/serialio.h:7:24: fatal error: asm/serial.h: No such file or directory
    #include
    ^
    compilation terminated.
    make[3]: *** [drivers/staging/speakup/speakup_acntpc.o] Error 1
    make[2]: *** [drivers/staging/speakup] Error 2
    make[1]: *** [drivers/staging] Error 2
    make: *** [drivers] Error 2

    Acked-by: Lennox Wu
    Signed-off-by: Chen Gang

    Chen Gang
     
  • This patch removes the use of the IRQF_DISABLED flag
    from arch/score/kernel/time.c

    It's a NOOP since 2.6.35 and it will be removed one day.

    Signed-off-by: Michael Opdenacker
    Acked-by: Lennox Wu

    Michael Opdenacker
     
  • The related error (with allmodconfig under score):

    MODPOST 1365 modules
    ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!

    Acked-by: Lennox Wu
    Signed-off-by: Chen Gang

    Chen Gang
     
  • 'csum_partial_copy_from_user' and 'flush_dcache_page' are also needed by
    outside modules, so need export them in the related files.

    The related error (with allmodconfig under score):

    MODPOST 1365 modules
    ERROR: "csum_partial_copy_from_user" [net/rxrpc/af-rxrpc.ko] undefined!
    ERROR: "flush_dcache_page" [net/sunrpc/sunrpc.ko] undefined!

    Acked-by: Lennox Wu
    Signed-off-by: Chen Gang

    Chen Gang
     

14 Sep, 2014

1 commit

  • The nohz full code needs irq work to trigger its own interrupt so that
    the subsystem can work even when the tick is stopped.

    Lets introduce arch_irq_work_has_interrupt() that archs can override to
    tell about their support for this ability.

    Signed-off-by: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Frederic Weisbecker

    Peter Zijlstra
     

10 Aug, 2014

1 commit

  • Pull arch signal handling cleanup from Richard Weinberger:
    "This patch series moves all remaining archs to the get_signal(),
    signal_setup_done() and sigsp() functions.

    Currently these archs use open coded variants of the said functions.
    Further, unused parameters get removed from get_signal_to_deliver(),
    tracehook_signal_handler() and signal_delivered().

    At the end of the day we save around 500 lines of code."

    * 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (43 commits)
    powerpc: Use sigsp()
    openrisc: Use sigsp()
    mn10300: Use sigsp()
    mips: Use sigsp()
    microblaze: Use sigsp()
    metag: Use sigsp()
    m68k: Use sigsp()
    m32r: Use sigsp()
    hexagon: Use sigsp()
    frv: Use sigsp()
    cris: Use sigsp()
    c6x: Use sigsp()
    blackfin: Use sigsp()
    avr32: Use sigsp()
    arm64: Use sigsp()
    arc: Use sigsp()
    sas_ss_flags: Remove nested ternary if
    Rip out get_signal_to_deliver()
    Clean up signal_delivered()
    tracehook_signal_handler: Remove sig, info, ka and regs
    ...

    Linus Torvalds
     

09 Aug, 2014

1 commit

  • There's no need to have an architecture version of scatterlist.h if the
    only thing the file does is include asm-generic/scatterlist.h. Switch to
    the asm-generic versions directly.

    Acked-by: Jesper Nilsson
    Acked-by: David Howells
    Signed-off-by: Laura Abbott
    Cc: Lennox Wu
    Cc: Chen Liqin ,
    Cc: Koichi Yasutake
    Cc: Michal Simek
    Cc: Hirokazu Takata
    Cc: Mikael Starvik
    Cc: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laura Abbott
     

07 Aug, 2014

1 commit

  • 'COUNTER' and other same kind macros are too common to use, and easy to
    get conflict with other modules.

    At present, they are not used, so it is OK to simply remove them. And
    the related warning (allmodconfig with score):

    CC [M] drivers/md/raid1.o
    In file included from drivers/md/raid1.c:42:0:
    drivers/md/bitmap.h:93:0: warning: "COUNTER" redefined
    #define COUNTER(x) (((bitmap_counter_t) x) & COUNTER_MAX)
    ^
    In file included from ./arch/score/include/asm/ptrace.h:4:0,
    from include/linux/sched.h:31,
    from include/linux/blkdev.h:4,
    from drivers/md/raid1.c:36:
    ./arch/score/include/uapi/asm/ptrace.h:13:0: note: this is the location of the previous definition
    #define COUNTER 38

    Signed-off-by: Chen Gang
    Signed-off-by: David Rientjes
    Cc: Lennox Wu
    Cc: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     

06 Aug, 2014

1 commit


17 Jul, 2014

1 commit

  • The arch_mutex_cpu_relax() function, introduced by 34b133f, is
    hacky and ugly. It was added a few years ago to address the fact
    that common cpu_relax() calls include yielding on s390, and thus
    impact the optimistic spinning functionality of mutexes. Nowadays
    we use this function well beyond mutexes: rwsem, qrwlock, mcs and
    lockref. Since the macro that defines the call is in the mutex header,
    any users must include mutex.h and the naming is misleading as well.

    This patch (i) renames the call to cpu_relax_lowlatency ("relax, but
    only if you can do it with very low latency") and (ii) defines it in
    each arch's asm/processor.h local header, just like for regular cpu_relax
    functions. On all archs, except s390, cpu_relax_lowlatency is simply cpu_relax,
    and thus we can take it out of mutex.h. While this can seem redundant,
    I believe it is a good choice as it allows us to move out arch specific
    logic from generic locking primitives and enables future(?) archs to
    transparently define it, similarly to System Z.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Anton Blanchard
    Cc: Aurelien Jacquiot
    Cc: Benjamin Herrenschmidt
    Cc: Bharat Bhushan
    Cc: Catalin Marinas
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Christian Borntraeger
    Cc: Chris Zankel
    Cc: David Howells
    Cc: David S. Miller
    Cc: Deepthi Dharwar
    Cc: Dominik Dingel
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Hirokazu Takata
    Cc: Ivan Kokshaysky
    Cc: James E.J. Bottomley
    Cc: James Hogan
    Cc: Jason Wang
    Cc: Jesper Nilsson
    Cc: Joe Perches
    Cc: Jonas Bonn
    Cc: Joseph Myers
    Cc: Kees Cook
    Cc: Koichi Yasutake
    Cc: Lennox Wu
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Neuling
    Cc: Michal Simek
    Cc: Mikael Starvik
    Cc: Nicolas Pitre
    Cc: Paolo Bonzini
    Cc: Paul Burton
    Cc: Paul E. McKenney
    Cc: Paul Gortmaker
    Cc: Paul Mackerras
    Cc: Qais Yousef
    Cc: Qiaowei Ren
    Cc: Rafael Wysocki
    Cc: Ralf Baechle
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Russell King
    Cc: Steven Miao
    Cc: Steven Rostedt
    Cc: Stratos Karafotis
    Cc: Tim Chen
    Cc: Tony Luck
    Cc: Vasily Kulikov
    Cc: Vineet Gupta
    Cc: Vineet Gupta
    Cc: Waiman Long
    Cc: Will Deacon
    Cc: Wolfram Sang
    Cc: adi-buildroot-devel@lists.sourceforge.net
    Cc: linux390@de.ibm.com
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-am33-list@redhat.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: linux-cris-kernel@axis.com
    Cc: linux-hexagon@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux@lists.openrisc.net
    Cc: linux-m32r-ja@ml.linux-m32r.org
    Cc: linux-m32r@ml.linux-m32r.org
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: linux-metag@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: sparclinux@vger.kernel.org
    Link: http://lkml.kernel.org/r/1404079773.2619.4.camel@buesod1.americas.hpqcorp.net
    Signed-off-by: Ingo Molnar

    Davidlohr Bueso
     

18 Apr, 2014

1 commit

  • score fully relies on asm-generic/barrier.h, so it can use its default
    implementation.

    Signed-off-by: Peter Zijlstra
    Acked-by: Paul E. McKenney
    Acked-by: Lennox Wu
    Link: http://lkml.kernel.org/n/tip-4mv9svf28lnotjpfuza8urh8@git.kernel.org
    Cc: Chen Liqin
    Cc: Linus Torvalds
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

04 Apr, 2014

1 commit


13 Mar, 2014

1 commit

  • Many architectures have a stub cputime.h that only include the default
    cputime.h

    Lets remove the useless headers, we only need to mention that we want
    the default headers on the Kbuild files.

    Cc: Archs
    Cc: Ingo Molnar
    Cc: Marcelo Tosatti
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Acked-by: Rik van Riel
    Signed-off-by: Frederic Weisbecker

    Frederic Weisbecker
     

10 Feb, 2014

2 commits

  • This patch allows each architecture to add its specific assembly optimized
    arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for
    MCS lock and unlock functions.

    Signed-off-by: Tim Chen
    Cc: Scott J Norton
    Cc: Raghavendra K T
    Cc: AswinChandramouleeswaran
    Cc: George Spelvin
    Cc: Rik vanRiel
    Cc: Andrea Arcangeli
    Cc: MichelLespinasse
    Cc: Peter Hurley
    Cc: Andi Kleen
    Cc: Alex Shi
    Cc: Dave Hansen
    Cc: Tim Chen
    Cc: Arnd Bergmann
    Cc: "Figo.zhang"
    Cc: "Paul E.McKenney"
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Waiman Long
    Cc: Ingo Molnar
    Cc: Will Deacon
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Matthew R Wilcox
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESK
    Signed-off-by: Ingo Molnar

    Tim Chen
     
  • We perform a clean up of the Kbuid files in each architecture.
    We order the files in each Kbuild in alphabetical order
    by running the below script.

    for i in arch/*/include/asm/Kbuild
    do
    cat $i | gawk '/^generic-y/ {
    i = 3;
    do {
    for (; i ${i}.sorted;
    mv ${i}.sorted $i;
    done

    Signed-off-by: Tim Chen
    Cc: Arnd Bergmann
    Cc: Matthew R Wilcox
    Cc: AswinChandramouleeswaran
    Cc: Dave Hansen
    Cc: "Paul E.McKenney"
    Cc: Scott J Norton
    Cc: Will Deacon
    Cc: "Figo.zhang"
    Cc: Linus Torvalds
    Cc: Rik van Riel
    Cc: Waiman Long
    Cc: Peter Hurley
    Cc: Andrea Arcangeli
    Cc: Tim Chen
    Cc: Alex Shi
    Cc: Raghavendra K T
    Cc: Andi Kleen
    Cc: George Spelvin
    Cc: MichelLespinasse
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Andrew Morton
    Signed-off-by: Peter Zijlstra
    [ Fixed build bug. ]
    Signed-off-by: Ingo Molnar

    Tim Chen
     

01 Feb, 2014

1 commit

  • Pull media updates from Mauro Carvalho Chehab:
    - a new jpeg codec driver for Samsung Exynos (jpeg-hw-exynos4)
    - a new dvb frontend for ds2103 chipset (m88ds2103)
    - a new sensor driver for Samsung S5K5BAF UXGA (s5k5baf)
    - new drivers for R-Car VSP1
    - a new radio driver: radio-raremono
    - a new tuner driver for ts2022 chipset (m88ts2022)
    - the analog part of em28xx is now a separate module that only
    load/runs if the device is not a pure digital TV device
    - added a staging driver for bcm2048 radio devices
    - the omap 2 video driver (omap24xx) was moved to staging. This driver
    is for an old hardware and uses a deprecated Kernel internal API. If
    nobody cares enough to fix it, it would be removed on a couple Kernel
    releases
    - the sn9c102 driver was moved to staging. This driver was replaced by
    gspca, and disabled on some distros, as almost all devices are known
    to work properly with gspca. It should be removed from kernel on a
    couple Kernel releases
    - lots of driver fixes, improvements and cleanups

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (421 commits)
    [media] media: v4l2-dev: fix video device index assignment
    [media] rc-core: reuse device numbers
    [media] em28xx-cards: properly initialize the device bitmap
    [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
    [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
    [media] Staging: media: Fix quoted string split across line in as102_fe.c
    [media] media: st-rc: Add reset support
    [media] m2m-deinterlace: fix allocated struct type
    [media] radio-usb-si4713: fix sparse non static symbol warnings
    [media] em28xx-audio: remove needless check before usb_free_coherent()
    [media] au0828: Fix sparse non static symbol warning
    Revert "[media] go7007-usb: only use go->dev after allocated"
    [media] em28xx-audio: provide an error code when URB submit fails
    [media] em28xx: fix check for audio only usb interfaces when changing the usb alternate setting
    [media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0
    [media] em28xx: make 'em28xx_ctrl_ops' static
    em28xx-alsa: Fix error patch for init/fini
    [media] em28xx-audio: flush work at .fini
    [media] drxk: remove the option to load firmware asynchronously
    [media] em28xx: adjust period size at runtime
    ...

    Linus Torvalds
     

26 Jan, 2014

1 commit

  • Pull networking updates from David Miller:

    1) BPF debugger and asm tool by Daniel Borkmann.

    2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.

    3) Correct reciprocal_divide and update users, from Hannes Frederic
    Sowa and Daniel Borkmann.

    4) Currently we only have a "set" operation for the hw timestamp socket
    ioctl, add a "get" operation to match. From Ben Hutchings.

    5) Add better trace events for debugging driver datapath problems, also
    from Ben Hutchings.

    6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
    have a small send and a previous packet is already in the qdisc or
    device queue, defer until TX completion or we get more data.

    7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.

    8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
    Borkmann.

    9) Share IP header compression code between Bluetooth and IEEE802154
    layers, from Jukka Rissanen.

    10) Fix ipv6 router reachability probing, from Jiri Benc.

    11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.

    12) Support tunneling in GRO layer, from Jerry Chu.

    13) Allow bonding to be configured fully using netlink, from Scott
    Feldman.

    14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
    already get the TCI. From Atzm Watanabe.

    15) New "Heavy Hitter" qdisc, from Terry Lam.

    16) Significantly improve the IPSEC support in pktgen, from Fan Du.

    17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
    Herbert.

    18) Add Proportional Integral Enhanced packet scheduler, from Vijay
    Subramanian.

    19) Allow openvswitch to mmap'd netlink, from Thomas Graf.

    20) Key TCP metrics blobs also by source address, not just destination
    address. From Christoph Paasch.

    21) Support 10G in generic phylib. From Andy Fleming.

    22) Try to short-circuit GRO flow compares using device provided RX
    hash, if provided. From Tom Herbert.

    The wireless and netfilter folks have been busy little bees too.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
    net/cxgb4: Fix referencing freed adapter
    ipv6: reallocate addrconf router for ipv6 address when lo device up
    fib_frontend: fix possible NULL pointer dereference
    rtnetlink: remove IFLA_BOND_SLAVE definition
    rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
    qlcnic: update version to 5.3.55
    qlcnic: Enhance logic to calculate msix vectors.
    qlcnic: Refactor interrupt coalescing code for all adapters.
    qlcnic: Update poll controller code path
    qlcnic: Interrupt code cleanup
    qlcnic: Enhance Tx timeout debugging.
    qlcnic: Use bool for rx_mac_learn.
    bonding: fix u64 division
    rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
    sfc: Use the correct maximum TX DMA ring size for SFC9100
    Add Shradha Shah as the sfc driver maintainer.
    net/vxlan: Share RX skb de-marking and checksum checks with ovs
    tulip: cleanup by using ARRAY_SIZE()
    ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
    net/cxgb4: Don't retrieve stats during recovery
    ...

    Linus Torvalds
     

22 Jan, 2014

1 commit

  • Commit 5fbbf8a1a934 ("Score: The commit is for compiling successfully.")
    re-introduced "select HAVE_GENERIC_HARDIRQS" in v3.12-rc4, which had
    just been removed in v3.12-rc1 by 0244ad004a5 ("Remove GENERIC_HARDIRQ
    config option").

    Signed-off-by: Geert Uytterhoeven
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

14 Jan, 2014

2 commits


12 Jan, 2014

1 commit

  • We're going to be adding a few new barrier primitives, and in order to
    avoid endless duplication make more agressive use of
    asm-generic/barrier.h.

    Change the asm-generic/barrier.h such that it allows partial barrier
    definitions and fills out the rest with defaults.

    There are a few architectures (m32r, m68k) that could probably
    do away with their barrier.h file entirely but are kept for now due to
    their unconventional nop() implementation.

    Suggested-by: Geert Uytterhoeven
    Reviewed-by: "Paul E. McKenney"
    Reviewed-by: Mathieu Desnoyers
    Signed-off-by: Peter Zijlstra
    Cc: Michael Ellerman
    Cc: Michael Neuling
    Cc: Russell King
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Victor Kaplansky
    Cc: Tony Luck
    Cc: Oleg Nesterov
    Cc: Benjamin Herrenschmidt
    Cc: Frederic Weisbecker
    Link: http://lkml.kernel.org/r/20131213150640.846368594@infradead.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

18 Dec, 2013

1 commit


11 Dec, 2013

1 commit


20 Nov, 2013

1 commit

  • Pull irq cleanups from Ingo Molnar:
    "This is a multi-arch cleanup series from Thomas Gleixner, which we
    kept to near the end of the merge window, to not interfere with
    architecture updates.

    This series (motivated by the -rt kernel) unifies more aspects of IRQ
    handling and generalizes PREEMPT_ACTIVE"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    preempt: Make PREEMPT_ACTIVE generic
    sparc: Use preempt_schedule_irq
    ia64: Use preempt_schedule_irq
    m32r: Use preempt_schedule_irq
    hardirq: Make hardirq bits generic
    m68k: Simplify low level interrupt handling code
    genirq: Prevent spurious detection for unconditionally polled interrupts

    Linus Torvalds
     

15 Nov, 2013

1 commit


14 Nov, 2013

1 commit


09 Oct, 2013

1 commit


26 Sep, 2013

3 commits


25 Sep, 2013

1 commit

  • In order to prepare to per-arch implementations of preempt_count move
    the required bits into an asm-generic header and use this for all
    archs.

    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-h5j0c1r3e3fk015m30h8f1zx@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

13 Sep, 2013

3 commits

  • After the last architecture switched to generic hard irqs the config
    options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
    for !CONFIG_GENERIC_HARDIRQS can be removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Unlike global OOM handling, memory cgroup code will invoke the OOM killer
    in any OOM situation because it has no way of telling faults occuring in
    kernel context - which could be handled more gracefully - from
    user-triggered faults.

    Pass a flag that identifies faults originating in user space from the
    architecture-specific fault handlers to generic code so that memcg OOM
    handling can be improved.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • The memcg code can trap tasks in the context of the failing allocation
    until an OOM situation is resolved. They can hold all kinds of locks
    (fs, mm) at this point, which makes it prone to deadlocking.

    This series converts memcg OOM handling into a two step process that is
    started in the charge context, but any waiting is done after the fault
    stack is fully unwound.

    Patches 1-4 prepare architecture handlers to support the new memcg
    requirements, but in doing so they also remove old cruft and unify
    out-of-memory behavior across architectures.

    Patch 5 disables the memcg OOM handling for syscalls, readahead, kernel
    faults, because they can gracefully unwind the stack with -ENOMEM. OOM
    handling is restricted to user triggered faults that have no other
    option.

    Patch 6 reworks memcg's hierarchical OOM locking to make it a little
    more obvious wth is going on in there: reduce locked regions, rename
    locking functions, reorder and document.

    Patch 7 implements the two-part OOM handling such that tasks are never
    trapped with the full charge stack in an OOM situation.

    This patch:

    Back before smart OOM killing, when faulting tasks were killed directly on
    allocation failures, the arch-specific fault handlers needed special
    protection for the init process.

    Now that all fault handlers call into the generic OOM killer (see commit
    609838cfed97: "mm: invoke oom-killer from remaining unconverted page
    fault handlers"), which already provides init protection, the
    arch-specific leftovers can be removed.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Acked-by: KOSAKI Motohiro
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Acked-by: Vineet Gupta [arch/arc bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

14 Aug, 2013

1 commit

  • All architectures include "kernel/Kconfig.freezer" except three left, so
    let them include it too, or 'allmodconfig' will report error.

    The related errors: (with allmodconfig for openrisc):

    CC kernel/cgroup_freezer.o
    kernel/cgroup_freezer.c: In function 'freezer_css_online':
    kernel/cgroup_freezer.c:133:15: error: 'system_freezing_cnt' undeclared (first use in this function)
    kernel/cgroup_freezer.c:133:15: note: each undeclared identifier is reported only once for each function it appears in
    kernel/cgroup_freezer.c: In function 'freezer_css_offline':
    kernel/cgroup_freezer.c:157:15: error: 'system_freezing_cnt' undeclared (first use in this function)
    kernel/cgroup_freezer.c: In function 'freezer_attach':
    kernel/cgroup_freezer.c:200:4: error: implicit declaration of function 'freeze_task'
    kernel/cgroup_freezer.c: In function 'freezer_apply_state':
    kernel/cgroup_freezer.c:371:16: error: 'system_freezing_cnt' undeclared (first use in this function)

    Signed-off-by: Chen Gang
    Cc: Richard Kuo
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     

15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    Note that some harmless section mismatch warnings may result, since
    notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
    are flagged as __cpuinit -- so if we remove the __cpuinit from
    arch specific callers, we will also get section mismatch warnings.
    As an intermediate step, we intend to turn the linux/init.h cpuinit
    content into no-ops as early as possible, since that will get rid
    of these warnings. In any case, they are temporary and harmless.

    This removes all the arch/score uses of the __cpuinit macros from
    all C files. Currently score does not have any __CPUINIT used in
    assembly files.

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: Chen Liqin
    Cc: Lennox Wu
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker