10 Jul, 2009

16 commits

  • When debugging is enabled, slub requires that additional metadata be
    stored in slabs for certain options: SLAB_RED_ZONE, SLAB_POISON, and
    SLAB_STORE_USER.

    Consequently, it may require that the minimum possible slab order needed
    to allocate a single object be greater when using these options. The
    most notable example is for objects that are PAGE_SIZE bytes in size.

    Higher minimum slab orders may cause page allocation failures when oom or
    under heavy fragmentation.

    This patch adds a new slub_debug option, which disables debugging by
    default for caches that would have resulted in higher minimum orders:

    slub_debug=O

    When this option is used on systems with 4K pages, kmalloc-4096, for
    example, will not have debugging enabled by default even if
    CONFIG_SLUB_DEBUG_ON is defined because it would have resulted in a
    order-1 minimum slab order.

    Reported-by: Larry Finger
    Tested-by: Larry Finger
    Cc: Christoph Lameter
    Signed-off-by: David Rientjes
    Signed-off-by: Pekka Enberg

    David Rientjes
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: when ATTR_READONLY is set, only clear write bits on non-directories
    cifs: remove cifsInodeInfo->inUse counter
    cifs: convert cifs_get_inode_info and non-posix readdir to use cifs_iget
    [CIFS] update cifs version number
    cifs: add and use CIFSSMBUnixSetFileInfo for setattr calls
    cifs: make a separate function for filling out FILE_UNIX_BASIC_INFO
    cifs: rename CIFSSMBUnixSetInfo to CIFSSMBUnixSetPathInfo
    cifs: add pid of initiating process to spnego upcall info
    cifs: fix regression with O_EXCL creates and optimize away lookup
    cifs: add new cifs_iget function and convert unix codepath to use it

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits)
    cxgb3: Fix crash caused by stashing wrong netdev_queue
    ixgbe: Fix coexistence of FCoE and Flow Director in 82599
    memory barrier: adding smp_mb__after_lock
    net: adding memory barrier to the poll and receive callbacks
    netpoll: Fix carrier detection for drivers that are using phylib
    includecheck fix: include/linux, rfkill.h
    p54: tx refused but queue active
    Atheros Kconfig needs to be dependent on WLAN_80211
    mac80211: fix docbook
    mac80211_hwsim: avoid NULL access
    ssb: Add support for 4318E
    b43: Add support for 4318E
    zd1211rw: adding SONY IFU-WLM2 (054c:0257) as a zd1211b device
    zd1211rw: 07b8:6001 is a ZD1211B
    r6040: bump driver version to 0.24 and date to 08 July 2009
    r6040: restore MIER register correctly when IRQ line is shared
    ipv4: Fix fib_trie rebalancing, part 4 (root thresholds)
    davinci_emac: fix kernel oops when changing MAC address while interface is down
    igb: set lan id prior to configuring phy
    mac80211: minstrel: avoid accessing negative indices in rix_to_ndx()
    ...

    Linus Torvalds
     
  • Looks like the change in ad361c9884e809340f6daca80d56a9e9c871690a
    wasn't compile tested.

    Signed-off-by: Dave Jones
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Commit c3a8c5b6 ("cxgb3: move away from LLTX") exposed a bug in how
    cxgb3 looks up the netdev_queue it stashes away in a qset during
    initialization. For multiport devices, the TX queue index it uses is
    offset by the first_qset index of each port. This leads to a crash
    once LLTX is removed, since hard_start_xmit is called with one TX
    queue lock held, while the TX reclaim timer task grabs a different
    (wrong) TX queue lock when it frees skbs.

    Fix this by removing the first_qset offset used to look up the TX
    queue passed into t3_sge_alloc_qset() from setup_sge_qsets().

    Signed-off-by: Roland Dreier
    Acked-by: Divy Le Ray
    Signed-off-by: David S. Miller

    Roland Dreier
     
  • Fix coexistence of Fiber Channel over Ethernet (FCoE) and Flow Director (FDIR)
    in 82599 and remove the disabling of FDIR when FCoE is enabled.

    Currently, FDIR is turned off when FCoE is enabled under the assumption that
    FCoE is always enabled with DCB being turned on. However, FDIR does not have
    to be turned off all the time when FCoE is enabled since FCoE can be enabled
    without DCB being turned on, e.g., use link pause only. This patch makes sure
    that when DCB is turned on or off, FDIR is turned on or off correspondingly;
    and when FCoE is enabled, it does not disable FDIR, rather, it will have FDIR
    set up properly so FCoE and FDIR can coexist regardless of DCB being on or off.

    Signed-off-by: Yi Zou
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Yi Zou
     
  • Adding smp_mb__after_lock define to be used as a smp_mb call after
    a lock.

    Making it nop for x86, since {read|write|spin}_lock() on x86 are
    full memory barriers.

    Signed-off-by: Jiri Olsa
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Jiri Olsa
     
  • Adding memory barrier after the poll_wait function, paired with
    receive callbacks. Adding fuctions sock_poll_wait and sk_has_sleeper
    to wrap the memory barrier.

    Without the memory barrier, following race can happen.
    The race fires, when following code paths meet, and the tp->rcv_nxt
    and __add_wait_queue updates stay in CPU caches.

    CPU1 CPU2

    sys_select receive packet
    ... ...
    __add_wait_queue update tp->rcv_nxt
    ... ...
    tp->rcv_nxt check sock_def_readable
    ... {
    schedule ...
    if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
    wake_up_interruptible(sk->sk_sleep)
    ...
    }

    If there was no cache the code would work ok, since the wait_queue and
    rcv_nxt are opposit to each other.

    Meaning that once tp->rcv_nxt is updated by CPU2, the CPU1 either already
    passed the tp->rcv_nxt check and sleeps, or will get the new value for
    tp->rcv_nxt and will return with new data mask.
    In both cases the process (CPU1) is being added to the wait queue, so the
    waitqueue_active (CPU2) call cannot miss and will wake up CPU1.

    The bad case is when the __add_wait_queue changes done by CPU1 stay in its
    cache, and so does the tp->rcv_nxt update on CPU2 side. The CPU1 will then
    endup calling schedule and sleep forever if there are no more data on the
    socket.

    Calls to poll_wait in following modules were ommited:
    net/bluetooth/af_bluetooth.c
    net/irda/af_irda.c
    net/irda/irnet/irnet_ppp.c
    net/mac80211/rc80211_pid_debugfs.c
    net/phonet/socket.c
    net/rds/af_rds.c
    net/rfkill/core.c
    net/sunrpc/cache.c
    net/sunrpc/rpc_pipe.c
    net/tipc/socket.c

    Signed-off-by: Jiri Olsa
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Jiri Olsa
     
  • cifs: when ATTR_READONLY is set, only clear write bits on non-directories

    On windows servers, ATTR_READONLY apparently either has no meaning or
    serves as some sort of queue to certain applications for unrelated
    behavior. This MS kbase article has details:

    http://support.microsoft.com/kb/326549/

    Don't clear the write bits directory mode when ATTR_READONLY is set.

    Reported-by: pouchat@peewiki.net
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: remove cifsInodeInfo->inUse counter

    It was purported to be a refcounter of some sort, but was never
    used that way. It never served any purpose that wasn't served equally well
    by the I_NEW flag.

    Signed-off-by: Jeff Layton
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: convert cifs_get_inode_info and non-posix readdir to use cifs_iget

    Rather than allocating an inode and filling it out, have
    cifs_get_inode_info fill out a cifs_fattr and call cifs_iget. This means
    a pretty hefty reorganization of cifs_get_inode_info.

    For the readdir codepath, add a couple of new functions for filling out
    cifs_fattr's from different FindFile response infolevels.

    Finally, remove cifs_new_inode since there are no more callers.

    Signed-off-by: Jeff Layton
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     
  • Signed-off-by: Steve French

    Steve French
     
  • cifs: add and use CIFSSMBUnixSetFileInfo for setattr calls

    When there's an open filehandle, SET_FILE_INFO is apparently preferred
    over SET_PATH_INFO. Add a new variant that sets a FILE_UNIX_INFO_BASIC
    infolevel via SET_FILE_INFO and switch cifs_setattr_unix to use the
    new call when there's an open filehandle available.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: make a separate function for filling out FILE_UNIX_BASIC_INFO

    The SET_FILE_INFO variant will need to do the same thing here. Break
    this code out into a separate function that both variants can call.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: rename CIFSSMBUnixSetInfo to CIFSSMBUnixSetPathInfo

    ...in preparation of adding a SET_FILE_INFO variant.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: add pid of initiating process to spnego upcall info

    This will allow the upcall to poke in /proc//environ and get
    the value of the $KRB5CCNAME env var for the process.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     

09 Jul, 2009

24 commits

  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Fix compile failure in cpufreq.c

    Linus Torvalds
     
  • Using early netconsole and gianfar driver this error pops up:

    netconsole: timeout waiting for carrier

    It appears that net/core/netpoll.c:netpoll_setup() is using
    cond_resched() in a loop waiting for a carrier.

    The thing is that cond_resched() is a no-op when system_state !=
    SYSTEM_RUNNING, and so drivers/net/phy/phy.c's state_queue is never
    scheduled, therefore link detection doesn't work.

    I belive that the main problem is in cond_resched()[1], but despite
    how the cond_resched() story ends, it might be a good idea to call
    msleep(1) instead of cond_resched(), as suggested by Andrew Morton.

    [1] http://lkml.org/lkml/2009/7/7/463

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • David S. Miller
     
  • Commit ad361c98 ("Remove multiple KERN_ prefixes from printk formats")
    broke the build for fealnx because it added some "printk(PR_CONT ..."
    calls, when PR_CONT doesn't exist; it should be "printk(KERN_CONT ..."

    Signed-off-by: Roland Dreier
    Cc: Joe Perches
    Signed-off-by: Linus Torvalds

    Roland Dreier
     
  • managed_policy is out of scope for the non-smp case.
    Declare it locally where used (twice)

    Signed-off-by: Dave Jones

    Dave Jones
     
  • cifs: fix regression with O_EXCL creates and optimize away lookup

    Signed-off-by: Jeff Layton
    Tested-by: Shirish Pargaonkar
    CC: Stable Kernel
    Signed-off-by: Steve French

    Jeff Layton
     
  • Remove not needed locking of the fb_info->mm_lock mutex before a
    frambuffer is registered.

    This fixes a problem with uninitialized the fb_info->mm_lock mutex
    introduced by the commit 537a1bf059f " fbdev: add mutex for fb_mmap
    locking"

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Remove call to the fsl_diu_set_par before the register_framebuffer().

    This fixes a problem with uninitialized the fb_info->mm_lock mutex
    introduced by the commit 537a1bf059f " fbdev: add mutex for fb_mmap
    locking"

    Signed-off-by: Krzysztof Helt
    Tested-by: "Kai Jiang"
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • fix the following 'make includecheck' warning:

    include/linux/rfkill.h: linux/types.h is included more than once.

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: John W. Linville

    Jaswinder Singh Rajput
     
  • In the mainline kernel, p54usb will fail because the TX queue length can
    become < 0. This problem has been reported as Bugzilla #13725. The failure
    is expressed by the following message in the logs:

    WARNING: at net/mac80211/tx.c:1325 ieee80211_tx+0x23c/0x298 [mac80211]()
    Hardware name: HP Pavilion dv2700 Notebook PC
    tx refused but queue active

    This problem has been recently observed in the wireless-testing tree, where
    a full solution is being tested. That fix is too invasive for 2.6.31-rcX,
    but the simple change supplied here will prevent the failure.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • Atheros top level menu needs a "depends WLAN_80211" to properly indent
    within menuconfig and xconfig interfaces.

    This is purely a visual issue but it effects all subsequent drivers.
    The issue is the top level menu does not include a dependency on
    WLAN_80211 so within the tree structure, Atheros is at the same level as
    WLAN_80211 but when WLAN_80211 collapsed, the menu disappears along with
    all subsequent drives, so it is really a subordinate.

    Signed-off-by: Jay Sternberg
    Signed-off-by: John W. Linville

    Jay Sternberg
     
  • These two functions no longer exist in mac80211,
    so trying to insert them generates warnings in
    the document.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • There's a race condition -- started can be set to true
    before channel is set due to the way mac80211 callbacks
    currently work (->start should probably pass the channel
    we would like to have initially). For now simply add a
    check to hwsim to avoid dereferencing the NULL channel
    pointer.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Added support for the Broadcom 4318E chipset on PCMCIA/CF cards. The
    4318E can do 802.11A/B/G, only B and G mode are supported in b43.

    Signed-off-by: Clyde McPherson
    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Clyde McPherson
     
  • Added support for the Broadcom 4318E chipset on PCMCIA/CF cards. The
    4318E can do 802.11A/B/G, only B and G mode are supported in b43.

    Signed-off-by: Clyde McPherson
    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Clyde McPherson
     
  • Yevgen Kotikov reported success on the sourceforge zd1211-devs list
    with the following details:

    Brand/retail: SONY IFU-WLM2
    USB-IDs: Vendor: 0x054C Device: 0x0257
    chip ID: zd1211b chip 054c:0257 v4802 high 00-0b-6b AL2230_RF pa0 -----
    FCC ID: unknown

    Signed-off-by: Hin-Tak Leung
    Tested-by: Yevgen Kotikov
    Signed-off-by: John W. Linville

    Hin-Tak Leung
     
  • On a shuttle machine here we got 07b8:6001 device, handled by zd1211rw, which does not work.
    Scanning is OK but association does not work, we get "direct probe to AP xxx timed out"

    It appears that this simple patch makes the device work perfectly.

    This id was already there in initial import of the driver so I don't know if it has ever been
    working as ZD1211 (which would mean they changed it and kept the id :( ).

    Signed-off-by: Pascal Terjan
    Signed-off-by: John W. Linville

    Pascal Terjan
     
  • Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • When the r6040 device IRQ line is shared we will enter the driver
    interrupt service routine, mask off the device interrupt enable
    register (MIER) and return with IRQ_NONE, we would then leave the
    device with interrupts disabled, this patch fixes that issue.

    Reported-by: Steve Holland
    Signed-off-by: Joe Chou
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Pawel Staszewski wrote:


    Some time ago i report this:
    http://bugzilla.kernel.org/show_bug.cgi?id=6648

    and now with 2.6.29 / 2.6.29.1 / 2.6.29.3 and 2.6.30 it back
    dmesg output:
    oprofile: using NMI interrupt.
    Fix inflate_threshold_root. Now=15 size=11 bits
    ...
    Fix inflate_threshold_root. Now=15 size=11 bits

    cat /proc/net/fib_triestat
    Basic info: size of leaf: 40 bytes, size of tnode: 56 bytes.
    Main:
    Aver depth: 2.28
    Max depth: 6
    Leaves: 276539
    Prefixes: 289922
    Internal nodes: 66762
    1: 35046 2: 13824 3: 9508 4: 4897 5: 2331 6: 1149 7: 5
    9: 1 18: 1
    Pointers: 691228
    Null ptrs: 347928
    Total size: 35709 kB

    It seems, the current threshold for root resizing is too aggressive,
    and it causes misleading warnings during big updates, but it might be
    also responsible for memory problems, especially with non-preempt
    configs, when RCU freeing is delayed long after call_rcu.

    It should be also mentioned that because of non-atomic changes during
    resizing/rebalancing the current lookup algorithm can miss valid leaves
    so it's additional argument to shorten these activities even at a cost
    of a minimally longer searching.

    This patch restores values before the patch "[IPV4]: fib_trie root
    node settings", commit: 965ffea43d4ebe8cd7b9fee78d651268dd7d23c5 from
    v2.6.22.

    Pawel's report:


    I dont see any big change of (cpu load or faster/slower
    routing/propagating routes from bgpd or something else) - in avg there
    is from 2% to 3% more of CPU load i dont know why but it is - i change
    from "preempt" to "no preempt" 3 times and check this my "mpstat -P ALL
    1 30"
    always avg cpu load was from 2 to 3% more compared to "no preempt"
    [...]
    cat /proc/net/fib_triestat
    Basic info: size of leaf: 20 bytes, size of tnode: 36 bytes.
    Main:
    Aver depth: 2.44
    Max depth: 6
    Leaves: 277814
    Prefixes: 291306
    Internal nodes: 66420
    1: 32737 2: 14850 3: 10332 4: 4871 5: 2313 6: 942 7: 371 8: 3 17: 1
    Pointers: 599098
    Null ptrs: 254865
    Total size: 18067 kB

    According to this and other similar reports average depth is slightly
    increased (~0.2), and root nodes are shorter (log 17 vs. 18), but
    there is no visible performance decrease. So, until memory handling is
    improved or added parameters for changing this individually, this
    patch resets to safer defaults.

    Reported-by: Pawel Staszewski
    Reported-by: Jorge Boncompte [DTI2]
    Signed-off-by: Jarek Poplawski
    Tested-by: Pawel Staszewski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Check that network interface is running before changing its MAC address.
    Otherwise, rxch is accessed when it's NULL - causing a kernel oops.
    Moreover, check that the new MAC address is valid.

    Signed-off-by: Pablo Bitton
    Signed-off-by: Chaithrika U S
    Tested-by: Chaithrika U S
    [tested on DM6467 EVM]
    Signed-off-by: David S. Miller

    Pablo Bitton
     
  • The igb driver was defaulting to using the lock for pci-e function 0 for
    all of the phys due to the fact that the lan id was not being set prior to
    initialization. This change makes it so that the function id is set prior
    to checking for the phy id.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Alex found that specjbb2005 still can not run with hugepages on an
    x86-64 machine. This only happens when numa is not compiled in.

    The root cause: node_set_state will not set it back for us in that case,
    so don't clear that when numa is not select in config

    [ v2: use node_clear_state instead ]
    Reported-and-Tested-by: Alex Shi
    Signed-off-by: Yinghai Lu
    Reviewed-by: Christoph Lameter
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches