12 Nov, 2008

4 commits

  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: release buddies on yield
    fix for account_group_exec_runtime(), make sure ->signal can't be freed under rq->lock
    sched: clean up debug info

    Linus Torvalds
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/i915: Move legacy breadcrumb out of the reserved status page area
    drm/i915: Filter pci devices based on PCI_CLASS_DISPLAY_VGA
    drm/radeon: map registers at load time
    drm: Remove infrastructure for supporting i915's vblank swapping.
    i915: Remove racy delayed vblank swap ioctl.
    i915: Don't whine when pci_enable_msi() fails.
    i915: Don't attempt to short-circuit object_wait_rendering by checking domains.
    i915: Clean up sarea pointers on leavevt
    i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    dsa: fix master interface allmulti/promisc handling
    dsa: fix skb->pkt_type when mac address of slave interface differs
    net: fix setting of skb->tail in skb_recycle_check()
    net: fix /proc/net/snmp as memory corruptor
    mac80211: fix a buffer overrun in station debug code
    netfilter: payload_len is be16, add size of struct rather than size of pointer
    ipv6: fix ip6_mr_init error path
    [4/4] dca: fixup initialization dependency
    [3/4] I/OAT: fix async_tx.callback checking
    [2/4] I/OAT: fix dma_pin_iovec_pages() error handling
    [1/4] I/OAT: fix channel resources free for not allocated channels
    ssb: Fix DMA-API compilation for non-PCI systems
    SSB: hide empty sub menu
    vlan: Fix typos in proc output string
    [netdrvr] usb/hso: Cleanup rfkill error handling
    sfc: Correct address of gPXE boot configuration in EEPROM
    el3_common_init() should be __devinit, not __init
    hso: rfkill type should be WWAN
    mlx4_en: Start port error flow bug fix
    af_key: mark policy as dead before destroying

    Linus Torvalds
     

11 Nov, 2008

7 commits

  • This fixes hangs on 855-class hardware by avoiding double attachment of the
    driver due to the stub second head device having the same pci id as the real
    device.

    Other DRM drivers probably want this treatment as well, but I'm applying it
    just to this one for safety. But we should clean up the drm_pciids.h mess
    now so that each driver has its own pci id list header in its own directory.
    Lets do that in the next release.

    Signed-off-by: Eric Anholt
    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • It's not used in any other drivers, and doesn't look like it will be from
    drm.git master.

    Signed-off-by: Eric Anholt
    Signed-off-by: Dave Airlie

    Eric Anholt
     
  • Impact: fix hang/crash on ia64 under high load

    This is ugly, but the simplest patch by far.

    Unlike other similar routines, account_group_exec_runtime() could be
    called "implicitly" from within scheduler after exit_notify(). This
    means we can race with the parent doing release_task(), we can't just
    check ->signal != NULL.

    Change __exit_signal() to do spin_unlock_wait(&task_rq(tsk)->lock)
    before __cleanup_signal() to make sure ->signal can't be freed under
    task_rq(tsk)->lock. Note that task_rq_unlock_wait() doesn't care
    about the case when tsk changes cpu/rq under us, this should be OK.

    Thanks to Ingo who nacked my previous buggy patch.

    Signed-off-by: Oleg Nesterov
    Acked-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Reported-by: Doug Chapman

    Oleg Nesterov
     
  • This fixes compilation of the SSB DMA-API code on non-PCI platforms.

    Signed-off-by: Michael Buesch
    Signed-off-by: David S. Miller

    Michael Buesch
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
    ALSA: gusextreme: Fix build errors
    ALSA: hdsp: check for iobox and upload firmware during ioctl
    ALSA: HDSP: check for io box before uploading firmware
    ALSA: hda - Add another HP model (6730s) for AD1884A
    alsa: fix snd_BUG_on() and friends
    ALSA: hda - Add a quirk for MEDION MD96630
    ALSA: hda - Limit the number of GPIOs show in proc

    Linus Torvalds
     
  • Takashi Iwai
     
  • This patch reverts the following three commits which convert libata to
    use block layer tagging.

    43a49cbdf31e812c0d8f553d433b09b421f5d52c
    e013e13bf605b9e6b702adffbe2853cfc60e7806
    2fca5ccf97d2c28bcfce44f5b07d85e74e3cd18e

    Although using block layer tagging is the right direction, due to the
    tight coupling among tag number, data structure allocation and
    hardware command slot allocation, libata doesn't work correctly with
    the current conversion.

    The biggest problem is guaranteeing that tag 0 is always used for
    non-NCQ commands. Due to the way blk-tag is implemented and how SCSI
    starts and finishes requests, such guarantee can't be made. I'm not
    sure whether this would actually break any low level driver but it
    doesn't look like a good idea to break such assumption given the
    frailty of ATA controllers.

    So, for the time being, keep using the old dumb in-libata qc
    allocation.

    Signed-off-by: Tejun Heo
    Cc: Jens Axobe
    Cc: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

10 Nov, 2008

4 commits

  • * 'cpus4096' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    cpumask: introduce new API, without changing anything, v3
    cpumask: new API, v2
    cpumask: introduce new API, without changing anything

    Linus Torvalds
     
  • Impact: cleanup

    Clean up based on feedback from Andrew Morton and others:

    - change to inline functions instead of macros
    - add __init to bootmem method
    - add a missing debug check

    Signed-off-by: Rusty Russell
    Signed-off-by: Ingo Molnar

    Rusty Russell
     
  • Previously I assumed that the receive queues of candidates don't
    change during the GC. This is only half true, nothing can be received
    from the queues (see comment in unix_gc()), but buffers could be added
    through the other half of the socket pair, which may still have file
    descriptors referring to it.

    This can result in inc_inflight_move_tail() erronously increasing the
    "inflight" counter for a unix socket for which dec_inflight() wasn't
    previously called. This in turn can trigger the "BUG_ON(total_refs <
    inflight_refs)" in a later garbage collection run.

    Fix this by only manipulating the "inflight" counter for sockets which
    are candidates themselves. Duplicating the file references in
    unix_attach_fds() is also needed to prevent a socket becoming a
    candidate for GC while the skb that contains it is not yet queued.

    Reported-by: Andrea Bittau
    Signed-off-by: Miklos Szeredi
    CC: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Currently, all existing users of cnt32_to_63() are fine since the CPU
    architectures where it is used don't do read access reordering, and user
    mode preemption is disabled already. It is nevertheless a good idea to
    better elaborate usage requirements wrt preemption, and use an explicit
    memory barrier on SMP to avoid different CPUs accessing the counter
    value in the wrong order. On UP a simple compiler barrier is
    sufficient.

    Signed-off-by: Nicolas Pitre
    Acked-by: Mathieu Desnoyers
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     

09 Nov, 2008

2 commits

  • Acked-by: Greg Kroah-Hartman
    Signed-Off-By: Kay Sievers
    Signed-off-by: Pierre Ossman

    Kay Sievers
     
  • Fix the __pfn_to_page(pfn) macro so that it doesn't evaluate its
    argument twice in the CONFIG_DISCONTIGMEM=y case, because 'pfn' may
    be a result of a funtion call having side effects.

    For example, the hibernation code applies pfn_to_page(pfn) to the
    result of a function returning the pfn corresponding to the next set
    bit in a bitmap and the current bit position is modified on each
    call. This leads to "interesting" failures for CONFIG_DISCONTIGMEM=y
    due to the current behavior of __pfn_to_page(pfn).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

08 Nov, 2008

1 commit


07 Nov, 2008

13 commits

  • fine-tune the HT sched-domains parameters as well.

    On a HT capable box, this increases lat_ctx performance from 23.87
    usecs to 1.49 usecs:

    # before

    $ ./lat_ctx -s 0 2

    "size=0k ovr=1.89
    2 23.87

    # after

    $ ./lat_ctx -s 0 2

    "size=0k ovr=1.84
    2 1.49

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Tune SD_MC_INIT the same way as SD_CPU_INIT:
    unset SD_BALANCE_NEWIDLE, and set SD_WAKE_BALANCE.

    This improves vmark by 5%:

    vmark 132102 125968 125497 messages/sec avg 127855.66 .984
    vmark 139404 131719 131272 messages/sec avg 134131.66 1.033

    Signed-off-by: Mike Galbraith
    Acked-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    # *DOCUMENTATION*

    Mike Galbraith
     
  • - add cpumask_of()
    - add free_bootmem_cpumask_var()

    Signed-off-by: Rusty Russell
    Signed-off-by: Ingo Molnar

    Rusty Russell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Fix recursive descent in __scm_destroy().
    iwl3945: fix deadlock on suspend
    iwl3945: do not send scan command if channel count zero
    iwl3945: clear scanning bits upon failure
    ath5k: correct handling of rx status fields
    zd1211rw: Add 2 device IDs
    Fix logic error in rfkill_check_duplicity
    iwlagn: avoid sleep in softirq context
    iwlwifi: clear scanning bits upon failure
    Revert "ath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode"
    tcp: Fix recvmsg MSG_PEEK influence of blocking behavior.
    netfilter: netns ct: walk netns list under RTNL
    ipv6: fix run pending DAD when interface becomes ready
    net/9p: fix printk format warnings
    net: fix packet socket delivery in rx irq handler
    xfrm: Have af-specific init_tempsel() initialize family field of temporary selector

    Linus Torvalds
     
  • sound/pci/pcxhr/pcxhr_core.c: In function 'pcxhr_set_pipe_cmd_params':
    sound/pci/pcxhr/pcxhr_core.c:700: warning: statement with no effect
    sound/pci/pcxhr/pcxhr_core.c:706: warning: statement with no effect
    sound/pci/pcxhr/pcxhr_core.c:710: warning: statement with no effect

    Due to

    try to fix this, and be more conventional about the empty stubs.

    Signed-off-by: Andrew Morton
    Signed-off-by: Takashi Iwai

    Andrew Morton
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    Block: use round_jiffies_up()
    Add round_jiffies_up and related routines
    block: fix __blkdev_get() for removable devices
    generic-ipi: fix the smp_mb() placement
    blk: move blk_delete_timer call in end_that_request_last
    block: add timer on blkdev_dequeue_request() not elv_next_request()
    bio: define __BIOVEC_PHYS_MERGEABLE
    block: remove unused ll_new_mergeable()

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: re-tune balancing
    sched: fix buddies for group scheduling
    sched: backward looking buddy
    sched: fix fair preempt check
    sched: cleanup fair task selection

    Linus Torvalds
     
  • __scm_destroy() walks the list of file descriptors in the scm_fp_list
    pointed to by the scm_cookie argument.

    Those, in turn, can close sockets and invoke __scm_destroy() again.

    There is nothing which limits how deeply this can occur.

    The idea for how to fix this is from Linus. Basically, we do all of
    the fput()s at the top level by collecting all of the scm_fp_list
    objects hit by an fput(). Inside of the initial __scm_destroy() we
    keep running the list until it is empty.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Fix the hrtimer_add_expires_ns() function. It should take a 'u64 ns' argument,
    but rather takes an 'unsigned long ns' argument - which might only be 32-bits.

    On FRV, this results in the kernel locking up because hrtimer_forward() passes
    the result of a 64-bit multiplication to this function, for which the compiler
    discards the top 32-bits - something that didn't happen when ktime_add_ns() was
    called directly.

    Signed-off-by: David Howells
    Acked-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    David Howells
     
  • * git://git.infradead.org/mtd-2.6:
    [JFFS2] fix race condition in jffs2_lzo_compress()
    [MTD] [NOR] Fix cfi_send_gen_cmd handling of x16 devices in x8 mode (v4)
    [JFFS2] Fix lack of locking in thread_should_wake()
    [JFFS2] Fix build failure with !CONFIG_JFFS2_FS_WRITEBUFFER
    [MTD] [NAND] OMAP2: remove duplicated #include

    Linus Torvalds
     
  • This adds three helpers:

    fat_make_attrs() - makes FAT attributes from inode.
    fat_make_mode() - makes mode_t from FAT attributes.
    fat_save_attrs() - saves FAT attributes to inode.

    Then this replaces: MSDOS_MKMODE() by fat_make_mode(), fat_attr() by
    fat_make_attrs(), ->i_attrs = attr & ATTR_UNUSED by fat_save_attrs().
    And for root inode, those is used with ATTR_DIR instead of bogus
    ATTR_NONE.

    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     
  • This splits __KERNEL__ stuff in include/msdos_fs.h into fs/fat/fat.h.

    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     
  • __scm_destroy() walks the list of file descriptors in the scm_fp_list
    pointed to by the scm_cookie argument.

    Those, in turn, can close sockets and invoke __scm_destroy() again.

    There is nothing which limits how deeply this can occur.

    The idea for how to fix this is from Linus. Basically, we do all of
    the fput()s at the top level by collecting all of the scm_fp_list
    objects hit by an fput(). Inside of the initial __scm_destroy() we
    keep running the list until it is empty.

    Signed-off-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Miller
     

06 Nov, 2008

4 commits

  • Impact: introduce new APIs

    We want to deprecate cpumasks on the stack, as we are headed for
    gynormous numbers of CPUs. Eventually, we want to head towards an
    undefined 'struct cpumask' so they can never be declared on stack.

    1) New cpumask functions which take pointers instead of copies.
    (cpus_* -> cpumask_*)

    2) Several new helpers to reduce requirements for temporary cpumasks
    (cpumask_first_and, cpumask_next_and, cpumask_any_and)

    3) Helpers for declaring cpumasks on or offstack for large NR_CPUS
    (cpumask_var_t, alloc_cpumask_var and free_cpumask_var)

    4) 'struct cpumask' for explicitness and to mark new-style code.

    5) Make iterator functions stop at nr_cpu_ids (a runtime constant),
    not NR_CPUS for time efficiency and for smaller dynamic allocations
    in future.

    6) cpumask_copy() so we can allocate less than a full cpumask eventually
    (for alloc_cpumask_var), and so we can eliminate the 'struct cpumask'
    definition eventually.

    7) work_on_cpu() helper for doing task on a CPU, rather than saving old
    cpumask for current thread and manipulating it.

    8) smp_call_function_many() which is smp_call_function_mask() except
    taking a cpumask pointer.

    Note that this patch simply introduces the new functions and leaves
    the obsolescent ones in place. This is to simplify the transition
    patches.

    Signed-off-by: Rusty Russell
    Signed-off-by: Ingo Molnar

    Rusty Russell
     
  • This patch (as1158b) adds round_jiffies_up() and friends. These
    routines work like the analogous round_jiffies() functions, except
    that they will never round down.

    The new routines will be useful for timeouts where we don't care
    exactly when the timer expires, provided it doesn't expire too soon.

    Signed-off-by: Alan Stern
    Signed-off-by: Jens Axboe

    Alan Stern
     
  • Define __BIOVEC_PHYS_MERGEABLE as the default implementation of
    BIOVEC_PHYS_MERGEABLE, so that its available for reuse within an
    arch-specific definition of BIOVEC_PHYS_MERGEABLE.

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Jens Axboe

    Jeremy Fitzhardinge
     
  • Impact: improve wakeup affinity on NUMA systems, tweak SMP systems

    Given the fixes+tweaks to the wakeup-buddy code, re-tweak the domain
    balancing defaults on NUMA and SMP systems.

    Turn on SD_WAKE_AFFINE which was off on x86 NUMA - there's no reason
    why we would not want to have wakeup affinity across nodes as well.
    (we already do this in the standard NUMA template.)

    lat_ctx on a NUMA box is particularly happy about this change:

    before:

    | phoenix:~/l> ./lat_ctx -s 0 2
    | "size=0k ovr=2.60
    | 2 5.70

    after:

    | phoenix:~/l> ./lat_ctx -s 0 2
    | "size=0k ovr=2.65
    | 2 2.07

    a 2.75x speedup.

    pipe-test is similarly happy about it too:

    | phoenix:~/sched-tests> ./pipe-test
    | 18.26 usecs/loop.
    | 14.70 usecs/loop.
    | 14.38 usecs/loop.
    | 10.55 usecs/loop. # +WAKE_AFFINE on domain0+domain1
    | 8.63 usecs/loop.
    | 8.59 usecs/loop.
    | 9.03 usecs/loop.
    | 8.94 usecs/loop.
    | 8.96 usecs/loop.
    | 8.63 usecs/loop.

    Also:

    - disable SD_BALANCE_NEWIDLE on NUMA and SMP domains (keep it for siblings)
    - enable SD_WAKE_BALANCE on SMP domains

    Sysbench+postgresql improves all around the board, quite significantly:

    .28-rc3-11474e2c .28-rc3-11474e2c-tune
    -------------------------------------------------
    1: 571 688 +17.08%
    2: 1236 1206 -2.55%
    4: 2381 2642 +9.89%
    8: 4958 5164 +3.99%
    16: 9580 9574 -0.07%
    32: 7128 8118 +12.20%
    64: 7342 8266 +11.18%
    128: 7342 8064 +8.95%
    256: 7519 7884 +4.62%
    512: 7350 7731 +4.93%
    -------------------------------------------------
    SUM: 55412 59341 +6.62%

    So it's a win both for the runup portion, the peak area and the tail.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

05 Nov, 2008

2 commits

  • For "unlock" cycles to 16bit devices in 8bit compatibility mode we need
    to use the byte addresses 0xaaa and 0x555. These effectively match
    the word address 0x555 and 0x2aa, except the latter has its low bit set.

    Most chips don't care about the value of the 'A-1' pin in x8 mode,
    but some -- like the ST M29W320D -- do. So we need to be careful to
    set it where appropriate.

    cfi_send_gen_cmd is only ever passed addresses where the low byte
    is 0x00, 0x55 or 0xaa. Of those, only addresses ending 0xaa are
    affected by this patch, by masking in the extra low bit when the device
    is known to be in compatibility mode.

    [dwmw2: Do it only when (cmd_ofs & 0xff) == 0xaa]
    v4: Fix stupid typo in cfi_build_cmd_addr that failed to compile
    I'm writing this patch way to late at night.
    v3: Bring all of the work back into cfi_build_cmd_addr
    including calling of map_bankwidth(map) and cfi_interleave(cfi)
    So every caller doesn't need to.
    v2: Only modified the address if we our device_type is larger than our
    bus width.

    Cc: stable@kernel.org
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David Woodhouse

    Eric W. Biederman
     
  • The changes to deliver hardware accelerated VLAN packets to packet
    sockets (commit bc1d0411) caused a warning for non-NAPI drivers.
    The __vlan_hwaccel_rx() function is called directly from the drivers
    RX function, for non-NAPI drivers that means its still in RX IRQ
    context:

    [ 27.779463] ------------[ cut here ]------------
    [ 27.779509] WARNING: at kernel/softirq.c:136 local_bh_enable+0x37/0x81()
    ...
    [ 27.782520] [] netif_nit_deliver+0x5b/0x75
    [ 27.782590] [] __vlan_hwaccel_rx+0x79/0x162
    [ 27.782664] [] atl1_intr+0x9a9/0xa7c [atl1]
    [ 27.782738] [] handle_IRQ_event+0x23/0x51
    [ 27.782808] [] handle_edge_irq+0xc2/0x102
    [ 27.782878] [] do_IRQ+0x4d/0x64

    Split hardware accelerated VLAN reception into two parts to fix this:

    - __vlan_hwaccel_rx just stores the VLAN TCI and performs the VLAN
    device lookup, then calls netif_receive_skb()/netif_rx()

    - vlan_hwaccel_do_receive(), which is invoked by netif_receive_skb()
    in softirq context, performs the real reception and delivery to
    packet sockets.

    Reported-and-tested-by: Ramon Casellas
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

04 Nov, 2008

3 commits