21 Nov, 2011

1 commit


08 Nov, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
    forcedeth: fix a few sparse warnings (variable shadowing)
    forcedeth: Improve stats counters
    forcedeth: remove unneeded stats updates
    forcedeth: Acknowledge only interrupts that are being processed
    forcedeth: fix race when unloading module
    MAINTAINERS/rds: update maintainer
    wanrouter: Remove kernel_lock annotations
    usbnet: fix oops in usbnet_start_xmit
    ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined
    etherh: Add MAINTAINERS entry for etherh
    bonding: comparing a u8 with -1 is always false
    sky2: fix regression on Yukon Optima
    netlink: clarify attribute length check documentation
    netlink: validate NLA_MSECS length
    i825xx:xscale:8390:freescale: Fix Kconfig dependancies
    macvlan: receive multicast with local address
    tg3: Update version to 3.121
    tg3: Eliminate timer race with reset_task
    tg3: Schedule at most one tg3_reset_task run
    tg3: Obtain PCI function number from device
    ...

    Linus Torvalds
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

05 Nov, 2011

1 commit

  • L2TP for example uses NLA_MSECS like this:
    policy:
    [L2TP_ATTR_RECV_TIMEOUT] = { .type = NLA_MSECS, },
    code:
    if (info->attrs[L2TP_ATTR_RECV_TIMEOUT])
    cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]);

    As nla_get_msecs() is essentially nla_get_u64() plus the
    conversion to a HZ-based value, this will not properly
    reject attributes from userspace that aren't long enough
    and might overrun the message.

    Add NLA_MSECS to the attribute minlen array to check the
    size properly.

    Cc: Thomas Graf
    Cc: stable@vger.kernel.org
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

03 Nov, 2011

1 commit

  • It's often convenient to be able to release resource from IRQ context.
    Make ida_simple_*() use irqsave/restore spin ops so that they are IRQ
    safe.

    Signed-off-by: Tejun Heo
    Acked-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

01 Nov, 2011

13 commits

  • As suggested by Andrew Morton in [1] there is better to have most
    significant part first in the function name.

    [1] https://lkml.org/lkml/2011/9/20/22

    There is no functional change.

    Signed-off-by: Andy Shevchenko
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Koichi Yasutake
    Cc: Jason Wessel
    Cc: Mimi Zohar
    Cc: James Morris
    Cc: OGAWA Hirofumi
    Cc: "John W. Linville"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     
  • Commit 84c95c9acf0 ("string: on strstrip(), first remove leading spaces
    before running over str") improved the performance of the strim()
    function.

    Unfortunately this changed the semantics of strim() and broke my code.
    Before the patch it was possible to use strim() without using the return
    value for removing trailing spaces from strings that had either only
    blanks or only trailing blanks.

    Now this does not work any longer for strings that *only* have blanks.

    Before patch: " " -> "" (empty string)
    After patch: " " -> " " (no change)

    I think we should remove your patch to restore the old behavior.

    The description (lib/string.c):

    * Note that the first trailing whitespace is replaced with a %NUL-terminator

    => The first trailing whitespace of a string that only has whitespace
    characters is the first whitespace

    The patch restores the old strim() semantics.

    Signed-off-by: Michael Holzheu
    Cc: Andre Goddard Rosa
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • Signed-off-by: Wang Sheng-Hui
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wang Sheng-Hui
     
  • These variables are only used when CONFIG_HOTPLUG_CPU is enabled, they are
    ifdef'ed everywhere else. So don't define them when CONFIG_HOTPLUG_CPU is
    not enabled.

    Signed-off-by: Glauber Costa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber Costa
     
  • __bitmap_parse() and __bitmap_parselist() both take a pointer to a kernel
    buffer as a parameter and then cast it to a pointer to user buffer for use
    in cases when the parameter is_user indicates that the buffer is actually
    located in user space. This casting, and the casts in the callers,
    results in sparse noise like the following:

    warning: incorrect type in initializer (different address spaces)
    expected char const [noderef] *ubuf
    got char const *buf
    warning: cast removes address space of expression

    Since these casts are intentional, use __force to quiet the noise.

    Signed-off-by: H Hartley Sweeten
    Cc: Len Brown
    Cc: Huang Ying
    Cc: Andy Shevchenko
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H Hartley Sweeten
     
  • When SPIN_BUG_ON is triggered, the lock owner information is reported.
    But it is omitted when spinlock lockup is detected.

    This information is useful especially on the architectures which don't
    implement trigger_all_cpu_backtrace() that is called just after detecting
    lockup. So report it and also avoid message format duplication.

    Signed-off-by: Akinobu Mita
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Currently termination logic (\0 or \n\0) is hardcoded in _kstrtoull(),
    avoid that for code reuse between kstrto*() and simple_strtoull().
    Essentially, make them different only in termination logic.

    simple_strtoull() (and scanf(), BTW) ignores integer overflow, that's a
    bug we currently don't have guts to fix, making KSTRTOX_OVERFLOW hack
    necessary.

    Almost forgot: patch shrinks code size by about ~80 bytes on x86_64.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Added missing _secs in the help message of config DEFAULT_HUNG_TASK_TIMEOUT.

    Signed-off-by: Jiaju Zhang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiaju Zhang
     
  • memchr_inv() is mainly used to check whether the whole buffer is filled
    with just a specified byte.

    The function name and prototype are stolen from logfs and the
    implementation is from SLUB.

    Signed-off-by: Akinobu Mita
    Acked-by: Christoph Lameter
    Acked-by: Pekka Enberg
    Cc: Matt Mackall
    Acked-by: Joern Engel
    Cc: Marcin Slusarz
    Cc: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • radix_tree_tag_get()'s BUG (when it sees a tag after saw_unset_tag) was
    unsafe and removed in 2.6.34, but the pointless saw_unset_tag left behind.

    Remove it now, and return 0 as soon as we see unset tag - we already rely
    upon the root tag to be correct, returning 0 immediately if it's not set.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • There are no modular calls here, so just the minimal header for
    the EXPORT_SYMBOL macro will suffice.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • These files were getting the defines for EXPORT_SYMBOL because
    device.h was including module.h. But we are going to put an
    end to that. So add the proper export.h include now.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • A pending cleanup will mean that module.h won't be implicitly
    everywhere anymore. Make sure the modular drivers in md dir
    are actually calling out for explicitly in advance.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

31 Oct, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (33 commits)
    iommu/core: Remove global iommu_ops and register_iommu
    iommu/msm: Use bus_set_iommu instead of register_iommu
    iommu/omap: Use bus_set_iommu instead of register_iommu
    iommu/vt-d: Use bus_set_iommu instead of register_iommu
    iommu/amd: Use bus_set_iommu instead of register_iommu
    iommu/core: Use bus->iommu_ops in the iommu-api
    iommu/core: Convert iommu_found to iommu_present
    iommu/core: Add bus_type parameter to iommu_domain_alloc
    Driver core: Add iommu_ops to bus_type
    iommu/core: Define iommu_ops and register_iommu only with CONFIG_IOMMU_API
    iommu/amd: Fix wrong shift direction
    iommu/omap: always provide iommu debug code
    iommu/core: let drivers know if an iommu fault handler isn't installed
    iommu/core: export iommu_set_fault_handler()
    iommu/omap: Fix build error with !IOMMU_SUPPORT
    iommu/omap: Migrate to the generic fault report mechanism
    iommu/core: Add fault reporting mechanism
    iommu/core: Use PAGE_SIZE instead of hard-coded value
    iommu/core: use the existing IS_ALIGNED macro
    iommu/msm: ->unmap() should return order of unmapped page
    ...

    Fixup trivial conflicts in drivers/iommu/Makefile: "move omap iommu to
    dedicated iommu folder" vs "Rename the DMAR and INTR_REMAP config
    options" just happened to touch lines next to each other.

    Linus Torvalds
     

29 Oct, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (83 commits)
    mmc: fix compile error when CONFIG_BLOCK is not enabled
    mmc: core: Cleanup eMMC4.5 conditionals
    mmc: omap_hsmmc: if multiblock reads are broken, disable them
    mmc: core: add workaround for controllers with broken multiblock reads
    mmc: core: Prevent too long response times for suspend
    mmc: recognise SDIO cards with SDIO_CCCR_REV 3.00
    mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode
    mmc: core: support HPI send command
    mmc: core: Add cache control for eMMC4.5 device
    mmc: core: Modify the timeout value for writing power class
    mmc: core: new discard feature support at eMMC v4.5
    mmc: core: mmc sanitize feature support for v4.5
    mmc: dw_mmc: modify DATA register offset
    mmc: sdhci-pci: add flag for devices that can support runtime PM
    mmc: omap_hsmmc: ensure pbias configuration is always done
    mmc: core: Add Power Off Notify Feature eMMC 4.5
    mmc: sdhci-s3c: fix potential NULL dereference
    mmc: replace printk with appropriate display macro
    mmc: core: Add default timeout value for CMD6
    mmc: sdhci-pci: add runtime pm support
    ...

    Linus Torvalds
     

27 Oct, 2011

4 commits

  • mmc_core module needs to use setup_fault_attr() in order
    to set fault injection attributes during module load time.

    Signed-off-by: Per Forlin
    Reviewed-by: Akinobu Mita
    Signed-off-by: Chris Ball

    Per Forlin
     
  • This adds support to inject data errors after a completed host transfer.
    The mmc core will return error even though the host transfer is successful.
    This simple fault injection proved to be very useful to test the
    non-blocking error handling in the mmc_blk_issue_rw_rq().
    Random faults can also test how the host driver handles pre_req()
    and post_req() in case of errors.

    Signed-off-by: Per Forlin
    Acked-by: Akinobu Mita
    Reviewed-by: Linus Walleij
    Signed-off-by: Chris Ball

    Per Forlin
     
  • Export symbols should_fail() and fault_create_debugfs_attr() in order
    to let modules utilize the fault injection framework.

    Signed-off-by: Per Forlin
    Acked-by: Akinobu Mita
    Signed-off-by: Chris Ball

    Per Forlin
     
  • * 'for-linus' of git://neil.brown.name/md: (34 commits)
    md: Fix some bugs in recovery_disabled handling.
    md/raid5: fix bug that could result in reads from a failed device.
    lib/raid6: Fix filename emitted in generated code
    md.c: trivial comment fix
    MD: Allow restarting an interrupted incremental recovery.
    md: clear In_sync bit on devices added to an active array.
    md: add proper write-congestion reporting to RAID1 and RAID10.
    md: rename "mdk_personality" to "md_personality"
    md/bitmap remove fault injection options.
    md/raid5: typedef removal: raid5_conf_t -> struct r5conf
    md/raid1: typedef removal: conf_t -> struct r1conf
    md/raid10: typedef removal: conf_t -> struct r10conf
    md/raid0: typedef removal: raid0_conf_t -> struct r0conf
    md/multipath: typedef removal: multipath_conf_t -> struct mpconf
    md/linear: typedef removal: linear_conf_t -> struct linear_conf
    md/faulty: remove typedef: conf_t -> struct faulty_conf
    md/linear: remove typedefs: dev_info_t -> struct dev_info
    md: remove typedefs: mirror_info_t -> struct mirror_info
    md: remove typedefs: r10bio_t -> struct r10bio and r1bio_t -> struct r1bio
    md: remove typedefs: mdk_thread_t -> struct md_thread
    ...

    Linus Torvalds
     

26 Oct, 2011

2 commits

  • * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
    llist: Add back llist_add_batch() and llist_del_first() prototypes
    sched: Don't use tasklist_lock for debug prints
    sched: Warn on rt throttling
    sched: Unify the ->cpus_allowed mask copy
    sched: Wrap scheduler p->cpus_allowed access
    sched: Request for idle balance during nohz idle load balance
    sched: Use resched IPI to kick off the nohz idle balance
    sched: Fix idle_cpu()
    llist: Remove cpu_relax() usage in cmpxchg loops
    sched: Convert to struct llist
    llist: Add llist_next()
    irq_work: Use llist in the struct irq_work logic
    llist: Return whether list is empty before adding in llist_add()
    llist: Move cpu_relax() to after the cmpxchg()
    llist: Remove the platform-dependent NMI checks
    llist: Make some llist functions inline
    sched, tracing: Show PREEMPT_ACTIVE state in trace_sched_switch
    sched: Remove redundant test in check_preempt_tick()
    sched: Add documentation for bandwidth control
    sched: Return unused runtime on group dequeue
    ...

    Linus Torvalds
     
  • * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
    rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock()
    lockdep: Comment all warnings
    lib: atomic64: Change the type of local lock to raw_spinlock_t
    locking, lib/atomic64: Annotate atomic64_lock::lock as raw
    locking, x86, iommu: Annotate qi->q_lock as raw
    locking, x86, iommu: Annotate irq_2_ir_lock as raw
    locking, x86, iommu: Annotate iommu->register_lock as raw
    locking, dma, ipu: Annotate bank_lock as raw
    locking, ARM: Annotate low level hw locks as raw
    locking, drivers/dca: Annotate dca_lock as raw
    locking, powerpc: Annotate uic->lock as raw
    locking, x86: mce: Annotate cmci_discover_lock as raw
    locking, ACPI: Annotate c3_lock as raw
    locking, oprofile: Annotate oprofilefs lock as raw
    locking, video: Annotate vga console lock as raw
    locking, latencytop: Annotate latency_lock as raw
    locking, timer_stats: Annotate table_lock as raw
    locking, rwsem: Annotate inner lock as raw
    locking, semaphores: Annotate inner lock as raw
    locking, sched: Annotate thread_group_cputimer as raw
    ...

    Fix up conflicts in kernel/posix-cpu-timers.c manually: making
    cputimer->cputime a raw lock conflicted with the ABBA fix in commit
    bcd5cff7216f ("cputimer: Cure lock inversion").

    Linus Torvalds
     

25 Oct, 2011

5 commits

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (38 commits)
    mm: memory hotplug: Check if pages are correctly reserved on a per-section basis
    Revert "memory hotplug: Correct page reservation checking"
    Update email address for stable patch submission
    dynamic_debug: fix undefined reference to `__netdev_printk'
    dynamic_debug: use a single printk() to emit messages
    dynamic_debug: remove num_enabled accounting
    dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions
    uio: Support physical addresses >32 bits on 32-bit systems
    sysfs: add unsigned long cast to prevent compile warning
    drivers: base: print rejected matches with DEBUG_DRIVER
    memory hotplug: Correct page reservation checking
    memory hotplug: Refuse to add unaligned memory regions
    remove the messy code file Documentation/zh_CN/SubmitChecklist
    ARM: mxc: convert device creation to use platform_device_register_full
    new helper to create platform devices with dma mask
    docs/driver-model: Update device class docs
    docs/driver-model: Document device.groups
    kobj_uevent: Ignore if some listeners cannot handle message
    dynamic_debug: make netif_dbg() call __netdev_printk()
    dynamic_debug: make netdev_dbg() call __netdev_printk()
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits)
    MAINTAINERS: linux-m32r is moderated for non-subscribers
    linux@lists.openrisc.net is moderated for non-subscribers
    Drop default from "DM365 codec select" choice
    parisc: Kconfig: cleanup Kernel page size default
    Kconfig: remove redundant CONFIG_ prefix on two symbols
    cris: remove arch/cris/arch-v32/lib/nand_init.S
    microblaze: add missing CONFIG_ prefixes
    h8300: drop puzzling Kconfig dependencies
    MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers
    tty: drop superfluous dependency in Kconfig
    ARM: mxc: fix Kconfig typo 'i.MX51'
    Fix file references in Kconfig files
    aic7xxx: fix Kconfig references to READMEs
    Fix file references in drivers/ide/
    thinkpad_acpi: Fix printk typo 'bluestooth'
    bcmring: drop commented out line in Kconfig
    btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888'
    doc: raw1394: Trivial typo fix
    CIFS: Don't free volume_info->UNC until we are entirely done with it.
    treewide: Correct spelling of successfully in comments
    ...

    Linus Torvalds
     
  • * 'for-linus' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (81 commits)
    ARM: 7133/1: SMP: fix per cpu timer setup before the cpu is marked online
    ARM: 7129/1: Add __arm_ioremap_exec for mapping external memory as MT_MEMORY
    ARM: 7136/1: pl330: Fix a race condition
    ARM: smp: fix clipping of number of CPUs
    ARM: 7137/1: Fix error upon adding LL debug
    ARM: Add a few machine types to mach-types
    ARM: 7130/1: dev_archdata: add private iommu extension
    ARM: 7125/1: Add unwinding annotations for 64bit division functions
    ARM: 7120/1: remove bashism in check for multiple zreladdrs
    ARM: 7118/1: rename temp variable in read*_relaxed()
    ARM: 6217/4: mach-realview: expose PB1176 ROM using physmap and map_rom
    ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage
    ARM: 7062/1: cache: detect PIPT I-cache using CTR
    ARM: platform fixups: remove mdesc argument to fixup function
    ARM: 7017/1: Use generic BUG() handler
    ARM: 7102/1: mach-integrator: update defconfig
    ARM: 7087/2: mach-integrator: get timer frequency from clock
    ARM: 7086/2: mach-integrator: modernize clock event registration
    ARM: 7085/2: mach-integrator: clockevent supports oneshot mode
    ARM: 7084/1: mach-integrator: retire some timer macros
    ...

    Linus Torvalds
     
  • * 'next' of git://selinuxproject.org/~jmorris/linux-security: (95 commits)
    TOMOYO: Fix incomplete read after seek.
    Smack: allow to access /smack/access as normal user
    TOMOYO: Fix unused kernel config option.
    Smack: fix: invalid length set for the result of /smack/access
    Smack: compilation fix
    Smack: fix for /smack/access output, use string instead of byte
    Smack: domain transition protections (v3)
    Smack: Provide information for UDS getsockopt(SO_PEERCRED)
    Smack: Clean up comments
    Smack: Repair processing of fcntl
    Smack: Rule list lookup performance
    Smack: check permissions from user space (v2)
    TOMOYO: Fix quota and garbage collector.
    TOMOYO: Remove redundant tasklist_lock.
    TOMOYO: Fix domain transition failure warning.
    TOMOYO: Remove tomoyo_policy_memory_lock spinlock.
    TOMOYO: Simplify garbage collector.
    TOMOYO: Fix make namespacecheck warnings.
    target: check hex2bin result
    encrypted-keys: check hex2bin result
    ...

    Linus Torvalds
     
  • …'pgt' (early part) and 'smp' into for-linus

    Russell King
     

21 Oct, 2011

1 commit


20 Oct, 2011

1 commit


19 Oct, 2011

3 commits

  • Dynamic debug recently added support for netdev_printk. It uses
    __netdev_printk() to support this functionality. However, when CONFIG_NET
    is not set, we get the following error:

    lib/built-in.o: In function `__dynamic_netdev_dbg':
    (.text+0x9fda): undefined reference to `__netdev_printk'

    Fix this by making the call to netdev_printk() contingent upon CONFIG_NET.
    We could have fixed this by defining netdev_printk() to a 'no-op' in the
    !CONFIG_NET case. However, this is not consistent with how the networking
    layer uses netdev_printk. For example, CONFIG_NET is not set,
    netdev_printk() does not have a 'no-op' definition defined.

    Signed-off-by: Jason Baron
    Acked-by: Randy Dunlap
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron
     
  • We were using KERN_CONT to combine messages with their prefix. However,
    KERN_CONT is not smp safe, in the sense that it can interleave messages.
    This interleaving can result in printks coming out at the wrong loglevel.
    With the high frequency of printks that dynamic debug can produce this is
    not desirable.

    So make dynamic_emit_prefix() fill a char buf[64] instead of doing a
    printk directly. If we enable printing out of function, module, line, or
    pid info, they are placed in this 64 byte buffer. In my testing 64 bytes
    was enough size to fulfill all requests. Even if it's not, we can match
    up the printk itself to see where it's from, so to me this is no big deal.

    [akpm@linux-foundation.org: convert dangerous macro to C]
    Signed-off-by: Jason Baron
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron
     
  • The num_enabled accounting isn't actually used anywhere - remove them.

    Signed-off-by: Jason Baron
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jason Baron
     

06 Oct, 2011

1 commit

  • This task is preparatory for the migrate_disable() implementation, but
    stands on its own and provides a cleanup.

    It currently only converts those sites required for task-placement.
    Kosaki-san once mentioned replacing cpus_allowed with a proper
    cpumask_t instead of the NR_CPUS sized array it currently is, that
    would also require something like this.

    Signed-off-by: Peter Zijlstra
    Acked-by: Thomas Gleixner
    Cc: KOSAKI Motohiro
    Link: http://lkml.kernel.org/n/tip-e42skvaddos99psip0vce41o@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

04 Oct, 2011

3 commits

  • Initial benchmarks show they're a net loss:

    $ for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do echo performance > $i; done
    $ echo 4096 32000 64 128 > /proc/sys/kernel/sem
    $ ./sembench -t 2048 -w 1900 -o 0

    Pre:

    run time 30 seconds 778936 worker burns per second
    run time 30 seconds 912190 worker burns per second
    run time 30 seconds 817506 worker burns per second
    run time 30 seconds 830870 worker burns per second
    run time 30 seconds 845056 worker burns per second

    Post:

    run time 30 seconds 905920 worker burns per second
    run time 30 seconds 849046 worker burns per second
    run time 30 seconds 886286 worker burns per second
    run time 30 seconds 822320 worker burns per second
    run time 30 seconds 900283 worker burns per second

    So about 4% faster. (!)

    cpu_relax() stalls the pipeline, therefore, when used in a tight loop
    it has the following benefits:

    - allows SMT siblings to have a go;
    - reduces pressure on the CPU interconnect.

    However, cmpxchg loops are unfair and thus have unbounded completion
    time, therefore we should avoid getting in such heavily contended
    situations where the above benefits make any difference.

    A typical cmpxchg loop should not go round more than a handfull of
    times at worst, therefore adding extra delays just slows things down.

    Since the llist primitives are new, there aren't any bad users yet,
    and we should avoid growing them. Heavily contended sites should
    generally be better off using the ticket locks for serialization since
    they provide bounded completion times (fifo-fair over the cpus).

    Signed-off-by: Peter Zijlstra
    Cc: Huang Ying
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1315836358.26517.43.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Extend the llist_add*() functions to return a success indicator, this
    allows us in the scheduler code to send an IPI if the queue was empty.

    ( There's no effect on existing users, because the list_add_xxx() functions
    are inline, thus this will be optimized out by the compiler if not used
    by callers. )

    Signed-off-by: Huang Ying
    Cc: Mathieu Desnoyers
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1315461646-1379-5-git-send-email-ying.huang@intel.com
    Signed-off-by: Ingo Molnar

    Huang Ying
     
  • If in llist_add()/etc. functions the first cmpxchg() call succeeds, it is
    not necessary to use cpu_relax() before the cmpxchg(). So cpu_relax() in
    a busy loop involving cmpxchg() should go after cmpxchg() instead of before
    that.

    This patch fixes this for all involved llist functions.

    Signed-off-by: Huang Ying
    Acked-by: Mathieu Desnoyers
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1315461646-1379-4-git-send-email-ying.huang@intel.com
    Signed-off-by: Ingo Molnar

    Huang Ying