23 Mar, 2011

1 commit

  • The oom killer is extremely verbose for machines with a large number of
    cpus and/or nodes. This verbosity can often be harmful if it causes other
    important messages to be scrolled from the kernel log and incurs a
    signicant time delay, specifically for kernels with CONFIG_NODES_SHIFT >
    8.

    This patch causes only memory information to be displayed for nodes that
    are allowed by current's cpuset when dumping the VM state. Information
    for all other nodes is irrelevant to the oom condition; we don't care if
    there's an abundance of memory elsewhere if we can't access it.

    This only affects the behavior of dumping memory information when an oom
    is triggered. Other dumps, such as for sysrq+m, still display the
    unfiltered form when using the existing show_mem() interface.

    Additionally, the per-cpu pageset statistics are extremely verbose in oom
    killer output, so it is now suppressed. This removes

    nodes_weight(current->mems_allowed) * (1 + nr_cpus)

    lines from the oom killer output.

    Callers may use __show_mem(SHOW_MEM_FILTER_NODES) to filter disallowed
    nodes.

    Signed-off-by: David Rientjes
    Cc: Mel Gorman
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

22 Mar, 2011

1 commit

  • * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default
    genksyms: Regenerate lexer and parser
    genksyms: Track changes to enum constants
    genksyms: simplify usage of find_symbol()
    genksyms: Add helpers for building string lists
    genksyms: Simplify printing of symbol types
    genksyms: Simplify lexer
    genksyms: Do not paste the bison header file to lex.c
    modpost: fix trailing comma
    KBuild: silence "'scripts/unifdef' is up to date."
    kbuild: Add extra gcc checks
    kbuild: reenable section mismatch analysis
    unifdef: update to upstream version 2.5

    Linus Torvalds
     

21 Mar, 2011

1 commit


17 Mar, 2011

3 commits

  • * 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    BKL: That's all, folks
    fs/locks.c: Remove stale FIXME left over from BKL conversion
    ipx: remove the BKL
    appletalk: remove the BKL
    x25: remove the BKL
    ufs: remove the BKL
    hpfs: remove the BKL
    drivers: remove extraneous includes of smp_lock.h
    tracing: don't trace the BKL
    adfs: remove the big kernel lock

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
    bonding: enable netpoll without checking link status
    xfrm: Refcount destination entry on xfrm_lookup
    net: introduce rx_handler results and logic around that
    bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
    bonding: wrap slave state work
    net: get rid of multiple bond-related netdevice->priv_flags
    bonding: register slave pointer for rx_handler
    be2net: Bump up the version number
    be2net: Copyright notice change. Update to Emulex instead of ServerEngines
    e1000e: fix kconfig for crc32 dependency
    netfilter ebtables: fix xt_AUDIT to work with ebtables
    xen network backend driver
    bonding: Improve syslog message at device creation time
    bonding: Call netif_carrier_off after register_netdevice
    bonding: Incorrect TX queue offset
    net_sched: fix ip_tos2prio
    xfrm: fix __xfrm_route_forward()
    be2net: Fix UDP packet detected status in RX compl
    Phonet: fix aligned-mode pipe socket buffer header reserve
    netxen: support for GbE port settings
    ...

    Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
    with the staging updates.

    Linus Torvalds
     
  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (50 commits)
    printk: do not mangle valid userspace syslog prefixes
    efivars: Add Documentation
    efivars: Expose efivars functionality to external drivers.
    efivars: Parameterize operations.
    efivars: Split out variable registration
    efivars: parameterize efivars
    efivars: Make efivars bin_attributes dynamic
    efivars: move efivars globals into struct efivars
    drivers:misc: ti-st: fix debugging code
    kref: Fix typo in kref documentation
    UIO: add PRUSS UIO driver support
    Fix spelling mistakes in Documentation/zh_CN/SubmittingPatches
    firmware: Fix unaligned memory accesses in dmi-sysfs
    firmware: Add documentation for /sys/firmware/dmi
    firmware: Expose DMI type 15 System Event Log
    firmware: Break out system_event_log in dmi-sysfs
    firmware: Basic dmi-sysfs support
    firmware: Add DMI entry types to the headers
    Driver core: convert platform_{get,set}_drvdata to static inline functions
    Translate linux-2.6/Documentation/magic-number.txt into Chinese
    ...

    Linus Torvalds
     

16 Mar, 2011

2 commits

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

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    rtmutex: tester: Remove the remaining BKL leftovers
    lockdep/timers: Explain in detail the locking problems del_timer_sync() may cause
    rtmutex: Simplify PI algorithm and make highest prio task get lock
    rwsem: Remove redundant asmregparm annotation
    rwsem: Move duplicate function prototypes to linux/rwsem.h
    rwsem: Unify the duplicate rwsem_is_locked() inlines
    rwsem: Move duplicate init macros and functions to linux/rwsem.h
    rwsem: Move duplicate struct rwsem declaration to linux/rwsem.h
    x86: Cleanup rwsem_count_t typedef
    rwsem: Cleanup includes
    locking: Remove deprecated lock initializers
    cred: Replace deprecated spinlock initialization
    kthread: Replace deprecated spinlock initialization
    xtensa: Replace deprecated spinlock initialization
    um: Replace deprecated spinlock initialization
    sparc: Replace deprecated spinlock initialization
    mips: Replace deprecated spinlock initialization
    cris: Replace deprecated spinlock initialization
    alpha: Replace deprecated spinlock initialization
    rtmutex-tester: Remove BKL tests

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

    * 'core-futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    arm: Remove bogus comment in futex_atomic_cmpxchg_inatomic()
    futex: Deobfuscate handle_futex_death()
    plist: Add priority list test
    plist: Shrink struct plist_head
    futex,plist: Remove debug lock assignment from plist_node
    futex,plist: Pass the real head of the priority list to plist_del()
    futex: Sanitize futex ops argument types
    futex: Sanitize cmpxchg_futex_value_locked API
    futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()
    futex: Avoid redudant evaluation of task_pid_vnr()
    futex: Update futex_wait_setup comments about locking

    Linus Torvalds
     

12 Mar, 2011

3 commits


08 Mar, 2011

1 commit

  • In complex subsystems like mac80211 structures can contain several
    timers and work structs, so identifying a specific instance from the
    call trace and object type output of debugobjects can be hard.

    Allow the subsystems which support debugobjects to provide a hint
    function. This function returns a pointer to a kernel address
    (preferrably the objects callback function) which is printed along
    with the debugobjects type.

    Add hint methods for timer_list, work_struct and hrtimer.

    [ tglx: Massaged changelog, made it compile ]

    Signed-off-by: Stanislaw Gruszka
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Stanislaw Gruszka
     

05 Mar, 2011

2 commits

  • This removes the implementation of the big kernel lock,
    at last. A lot of people have worked on this in the
    past, I so the credit for this patch should be with
    everyone who participated in the hunt.

    The names on the Cc list are the people that were the
    most active in this, according to the recorded git
    history, in alphabetical order.

    Signed-off-by: Arnd Bergmann
    Acked-by: Alan Cox
    Cc: Alessio Igor Bogani
    Cc: Al Viro
    Cc: Andrew Hendry
    Cc: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Eric W. Biederman
    Cc: Frederic Weisbecker
    Cc: Hans Verkuil
    Acked-by: Ingo Molnar
    Cc: Jan Blunck
    Cc: John Kacur
    Cc: Jonathan Corbet
    Cc: Linus Torvalds
    Cc: Matthew Wilcox
    Cc: Oliver Neukum
    Cc: Paul Menage
    Acked-by: Thomas Gleixner
    Cc: Trond Myklebust

    Arnd Bergmann
     
  • Make CONFIG_AVERAGE selectable for out-of-tree users
    such as compat-wireless.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     

04 Mar, 2011

2 commits

  • Conflicts:
    drivers/net/bnx2x/bnx2x.h

    David S. Miller
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
    MAINTAINERS: Add Andy Gospodarek as co-maintainer.
    r8169: disable ASPM
    RxRPC: Fix v1 keys
    AF_RXRPC: Handle receiving ACKALL packets
    cnic: Fix lost interrupt on bnx2x
    cnic: Prevent status block race conditions with hardware
    net: dcbnl: check correct ops in dcbnl_ieee_set()
    e1000e: disable broken PHY wakeup for ICH10 LOMs, use MAC wakeup instead
    igb: fix sparse warning
    e1000: fix sparse warning
    netfilter: nf_log: avoid oops in (un)bind with invalid nfproto values
    dccp: fix oops on Reset after close
    ipvs: fix dst_lock locking on dest update
    davinci_emac: Add Carrier Link OK check in Davinci RX Handler
    bnx2x: update driver version to 1.62.00-6
    bnx2x: properly calculate lro_mss
    bnx2x: perform statistics "action" before state transition.
    bnx2x: properly configure coefficients for MinBW algorithm (NPAR mode).
    bnx2x: Fix ethtool -t link test for MF (non-pmf) devices.
    bnx2x: Fix nvram test for single port devices.
    ...

    Linus Torvalds
     

02 Mar, 2011

1 commit


01 Mar, 2011

1 commit


26 Feb, 2011

1 commit

  • swiotlb's map_page wrongly calls panic() when it can't find a buffer fit
    for device's dma mask. It should return an error instead.

    Devices with an odd dma mask (i.e. under 4G) like b44 network card hit
    this bug (the system crashes):

    http://marc.info/?l=linux-kernel&m=129648943830106&w=2

    If swiotlb returns an error, b44 driver can use the own bouncing
    mechanism.

    Reported-by: Chuck Ebbert
    Signed-off-by: FUJITA Tomonori
    Tested-by: Arkadiusz Miskiewicz
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

24 Feb, 2011

1 commit

  • This was disabled in commit

    e5f95c8 (kbuild: print only total number of section mismatces found)

    because there were too many warnings. Now we're down to a reasonable
    number again, so we start scaring people with the details.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Randy Dunlap
    Acked-by: Mike Frysinger
    Signed-off-by: Michal Marek

    Uwe Kleine-König
     

20 Feb, 2011

1 commit


19 Feb, 2011

1 commit

  • When list debugging is enabled, we aim to readably show list corruption
    errors, and the basic list_add/list_del operations end up having extra
    debugging code in them to do some basic validation of the list entries.

    However, "list_del_init()" and "list_move[_tail]()" ended up avoiding
    the debug code due to how they were written. This fixes that.

    So the _next_ time we have list_move() problems with stale list entries,
    we'll hopefully have an easier time finding them..

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

16 Feb, 2011

1 commit


08 Feb, 2011

1 commit


04 Feb, 2011

2 commits


31 Jan, 2011

1 commit


28 Jan, 2011

2 commits

  • The augmented rbtree helper functions are not exported to modules right
    now.

    (We have started using augmented rbtrees in the upcoming version of
    drbd.)

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (43 commits)
    bnx2: Eliminate AER error messages on systems not supporting it
    cnic: Fix big endian bug
    xfrm6: Don't forget to propagate peer into ipsec route.
    tg3: Use new VLAN code
    bonding: update documentation - alternate configuration.
    TCP: fix a bug that triggers large number of TCP RST by mistake
    MAINTAINERS: remove Reinette Chatre as iwlwifi maintainer
    rt2x00: add device id for windy31 usb device
    mac80211: fix a crash in ieee80211_beacon_get_tim on change_interface
    ipv6: Revert 'administrative down' address handling changes.
    textsearch: doc - fix spelling in lib/textsearch.c.
    USB NET KL5KUSB101: Fix mem leak in error path of kaweth_download_firmware()
    pch_gbe: don't use flush_scheduled_work()
    bnx2: Always set ETH_FLAG_TXVLAN
    net: clear heap allocation for ethtool_get_regs()
    ipv6: Always clone offlink routes.
    dcbnl: make get_app handling symmetric for IEEE and CEE DCBx
    tcp: fix bug in listening_get_next()
    inetpeer: Use correct AVL tree base pointer in inet_getpeer().
    GRO: fix merging a paged skb after non-paged skbs
    ...

    Linus Torvalds
     

27 Jan, 2011

2 commits


26 Jan, 2011

1 commit

  • Executed command: fsstress -d /mnt -n 600 -p 850

    crash> bt
    PID: 7947 TASK: ffff880160546a70 CPU: 0 COMMAND: "fsstress"
    #0 [ffff8800dfc07d00] machine_kexec at ffffffff81030db9
    #1 [ffff8800dfc07d70] crash_kexec at ffffffff810a7952
    #2 [ffff8800dfc07e40] oops_end at ffffffff814aa7c8
    #3 [ffff8800dfc07e70] die_nmi at ffffffff814aa969
    #4 [ffff8800dfc07ea0] do_nmi_callback at ffffffff8102b07b
    #5 [ffff8800dfc07f10] do_nmi at ffffffff814aa514
    #6 [ffff8800dfc07f50] nmi at ffffffff814a9d60
    [exception RIP: __lookup_tag+100]
    RIP: ffffffff812274b4 RSP: ffff88016056b998 RFLAGS: 00000287
    RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000006
    RDX: 000000000000001d RSI: ffff88016056bb18 RDI: ffff8800c85366e0
    RBP: ffff88016056b9c8 R8: ffff88016056b9e8 R9: 0000000000000000
    R10: 000000000000000e R11: ffff8800c8536908 R12: 0000000000000010
    R13: 0000000000000040 R14: ffffffffffffffc0 R15: ffff8800c85366e0
    ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018

    #7 [ffff88016056b998] __lookup_tag at ffffffff812274b4
    #8 [ffff88016056b9d0] radix_tree_gang_lookup_tag_slot at ffffffff81227605
    #9 [ffff88016056ba20] find_get_pages_tag at ffffffff810fc110
    #10 [ffff88016056ba80] pagevec_lookup_tag at ffffffff81105e85
    #11 [ffff88016056baa0] write_cache_pages at ffffffff81104c47
    #12 [ffff88016056bbd0] generic_writepages at ffffffff81105014
    #13 [ffff88016056bbe0] do_writepages at ffffffff81105055
    #14 [ffff88016056bbf0] __filemap_fdatawrite_range at ffffffff810fb2cb
    #15 [ffff88016056bc40] filemap_write_and_wait_range at ffffffff810fb32a
    #16 [ffff88016056bc70] generic_file_direct_write at ffffffff810fb3dc
    #17 [ffff88016056bce0] __generic_file_aio_write at ffffffff810fcee5
    #18 [ffff88016056bda0] generic_file_aio_write at ffffffff810fd085
    #19 [ffff88016056bdf0] do_sync_write at ffffffff8114f9ea
    #20 [ffff88016056bf00] vfs_write at ffffffff8114fcf8
    #21 [ffff88016056bf30] sys_write at ffffffff81150691
    #22 [ffff88016056bf80] system_call_fastpath at ffffffff8100c0b2

    I think this root cause is the following:

    radix_tree_range_tag_if_tagged() always tags the root tag with settag
    if the root tag is set with iftag even if there are no iftag tags
    in the specified range (Of course, there are some iftag tags
    outside the specified range).

    ===============================================================================
    [[[Detailed description]]]

    (1) Why cannot radix_tree_gang_lookup_tag_slot() return forever?

    __lookup_tag():
    - Return with 0.
    - Return with the index which is not bigger than the old one as the
    input parameter.

    Therefore the following "while" repeats forever because the above
    conditions cause "ret" not to be updated and the cur_index cannot be
    changed into the bigger one.

    (So, radix_tree_gang_lookup_tag_slot() cannot return forever.)

    radix_tree_gang_lookup_tag_slot():
    1178 while (ret < max_items) {
    1179 unsigned int slots_found;
    1180 unsigned long next_index; /* Index of next search */
    1181
    1182 if (cur_index > max_index)
    1183 break;
    1184 slots_found = __lookup_tag(node, results + ret,
    1185 cur_index, max_items - ret, &next_index,
    tag);
    1186 ret += slots_found;
    // cannot update ret because slots_found == 0.
    // so, this while loops forever.
    1187 if (next_index == 0)
    1188 break;
    1189 cur_index = next_index;
    1190 }

    (2) Why does __lookup_tag() return with 0 and doesn't update the index?

    Assuming the following:
    - the one of the slot in radix_tree_node is NULL.
    - the one of the tag which corresponds to the slot sets with
    PAGECACHE_TAG_TOWRITE or other.
    - In a certain height(!=0), the corresponding index is 0.

    a) __lookup_tag() notices that the tag is set.

    1005 static unsigned int
    1006 __lookup_tag(struct radix_tree_node *slot, void ***results, unsigned long index,
    1007 unsigned int max_items, unsigned long *next_index, unsigned int tag)
    1008 {
    1009 unsigned int nr_found = 0;
    1010 unsigned int shift, height;
    1011
    1012 height = slot->height;
    1013 if (height == 0)
    1014 goto out;
    1015 shift = (height-1) * RADIX_TREE_MAP_SHIFT;
    1016
    1017 while (height > 0) {
    1018 unsigned long i = (index >> shift) & RADIX_TREE_MAP_MASK ;
    1019
    1020 for (;;) {
    1021 if (tag_get(slot, tag, i))
    1022 break;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    * the index is not updated yet.

    b) __lookup_tag() notices that the slot is NULL.

    1023 index &= ~((1UL << shift) - 1);
    1024 index += 1UL << shift;
    1025 if (index == 0)
    1026 goto out; /* 32-bit wraparound */
    1027 i++;
    1028 if (i == RADIX_TREE_MAP_SIZE)
    1029 goto out;
    1030 }
    1031 height--;
    1032 if (height == 0) { /* Bottom level: grab some items */
    ...
    1055 }
    1056 shift -= RADIX_TREE_MAP_SHIFT;
    1057 slot = rcu_dereference_raw(slot->slots[i]);
    1058 if (slot == NULL)
    1059 break;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    c) __lookup_tag() doesn't update the index and return with 0.

    1060 }
    1061 out:
    1062 *next_index = index;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1063 return nr_found;
    1064 }

    (3) Why is the slot NULL even if the tag is set?

    Because radix_tree_range_tag_if_tagged() always sets the root tag with
    PAGECACHE_TAG_TOWRITE if the root tag is set with PAGECACHE_TAG_DIRTY,
    even if there is no tag which can be set with PAGECACHE_TAG_TOWRITE
    in the specified range (from *first_indexp to last_index). Of course,
    some PAGECACHE_TAG_DIRTY nodes must exist outside the specified range.
    (radix_tree_range_tag_if_tagged() is called only from tag_pages_for_writeback())

    640 unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root
    *root,
    641 unsigned long *first_indexp, unsigned long last_index,
    642 unsigned long nr_to_tag,
    643 unsigned int iftag, unsigned int settag)
    644 {
    645 unsigned int height = root->height;
    646 struct radix_tree_path path[height];
    647 struct radix_tree_path *pathp = path;
    648 struct radix_tree_node *slot;
    649 unsigned int shift;
    650 unsigned long tagged = 0;
    651 unsigned long index = *first_indexp;
    652
    653 last_index = min(last_index, radix_tree_maxindex(height));
    654 if (index > last_index)
    655 return 0;
    656 if (!nr_to_tag)
    657 return 0;
    658 if (!root_tag_get(root, iftag)) {
    659 *first_indexp = last_index + 1;
    660 return 0;
    661 }
    662 if (height == 0) {
    663 *first_indexp = last_index + 1;
    664 root_tag_set(root, settag);
    665 return 1;
    666 }
    ...
    733 root_tag_set(root, settag);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    734 *first_indexp = index;
    735
    736 return tagged;
    737 }

    As the result, there is no radix_tree_node which is set with
    PAGECACHE_TAG_TOWRITE but the root tag(radix_tree_root) is set with
    PAGECACHE_TAG_TOWRITE.

    [figure: inside radix_tree]
    (Please see the figure with typewriter font)
    ===========================================
    [roottag = DIRTY]
    | tag=0:NOTHING
    tag[0 0 0 1] 1:DIRTY
    [x x x +] 2:WRITEBACK
    | 3:DIRTY,WRITEBACK
    p 4:TOWRITE
    5:DIRTY,TOWRITE ...
    specified range (index: 0 to 2)

    * There is no DIRTY tag within the specified range.
    (But there is a DIRTY tag outside that range.)

    | | | | | | | | |
    after calling tag_pages_for_writeback()
    | | | | | | | | |
    v v v v v v v v v

    [roottag = DIRTY,TOWRITE]
    | p is "page".
    tag[0 0 0 1] x is NULL.
    [x x x +] +- is a pointer to "page".
    |
    p

    * But TOWRITE tag is set on the root tag.
    ============================================

    After that, radix_tree_extend() via radix_tree_insert() is called
    when the page is added.
    This function sets the new radix_tree_node with PAGECACHE_TAG_TOWRITE
    to succeed the status of the root tag.

    246 static int radix_tree_extend(struct radix_tree_root *root, unsigned long
    index)
    247 {
    248 struct radix_tree_node *node;
    249 unsigned int height;
    250 int tag;
    251
    252 /* Figure out what the height should be. */
    253 height = root->height + 1;
    254 while (index > radix_tree_maxindex(height))
    255 height++;
    256
    257 if (root->rnode == NULL) {
    258 root->height = height;
    259 goto out;
    260 }
    261
    262 do {
    263 unsigned int newheight;
    264 if (!(node = radix_tree_node_alloc(root)))
    265 return -ENOMEM;
    266
    267 /* Increase the height. */
    268 node->slots[0] = radix_tree_indirect_to_ptr(root->rnode);
    269
    270 /* Propagate the aggregated tag info into the new root */
    271 for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) {
    272 if (root_tag_get(root, tag))
    273 tag_set(node, tag, 0);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    274 }

    ===========================================
    [roottag = DIRTY,TOWRITE]
    | :
    tag[0 0 0 1] [0 0 0 0]
    [x x x +] [+ x x x]
    | |
    p p (new page)

    | | | | | | | | |
    after calling radix_tree_insert
    | | | | | | | | |
    v v v v v v v v v

    [roottag = DIRTY,TOWRITE]
    |
    tag [5 0 0 0] * DIRTY and TOWRITE tags are
    [+ + x x] succeeded to the new node.
    | |
    tag [0 0 0 1] [0 0 0 0]
    [x x x +] [+ x x x]
    | |
    p p
    ============================================

    After that, the index 3 page is released by remove_from_page_cache().
    Then we can make the situation that the tag is set with PAGECACHE_TAG_TOWRITE
    and that the slot which corresponds to the tag is NULL.
    ===========================================
    [roottag = DIRTY,TOWRITE]
    |
    tag [5 0 0 0]
    [+ + x x]
    | |
    tag [0 0 0 1] [0 0 0 0]
    [x x x +] [+ x x x]
    | |
    p p
    (remove)

    | | | | | | | | |
    after calling remove_page_cache
    | | | | | | | | |
    v v v v v v v v v

    [roottag = DIRTY,TOWRITE]
    |
    tag [4 0 0 0] * Only DIRTY tag is cleared
    [x + x x] because no TOWRITE tag is existed
    | in the bottom node.
    [0 0 0 0]
    [+ x x x]
    |
    p
    ============================================

    To solve this problem

    Change to that radix_tree_tag_if_tagged() doesn't tag the root tag
    if it doesn't set any tags within the specified range.

    Like this.
    ============================================
    640 unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root
    *root,
    641 unsigned long *first_indexp, unsigned long last_index,
    642 unsigned long nr_to_tag,
    643 unsigned int iftag, unsigned int settag)
    644 {
    650 unsigned long tagged = 0;
    ...
    733 if (tagged)
    ^^^^^^^^^^^^^^^^^^^^^^^^
    734 root_tag_set(root, settag);
    735 *first_indexp = index;
    736
    737 return tagged;
    738 }

    ============================================

    Signed-off-by: Toshiyuki Okajima
    Acked-by: Jan Kara
    Cc: Dave Chinner
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Toshiyuki Okajima
     

25 Jan, 2011

2 commits

  • Found the following spelling errors while reading the textsearch code:
    "facitilies" -> "facilities"
    "continously" -> "continuously"
    "arbitary" -> "arbitrary"
    "patern" -> "pattern"
    "occurences" -> "occurrences"

    I'll try to push this patch through DaveM, given the only users
    of textsearch is in the net/ tree (nf_conntrack_amanda.c, xt_string.c
    and em_text.c)

    Signed-off-by: Jesper Sander
    Signed-off-by: Jesper Dangaard Brouer
    Signed-off-by: David S. Miller

    Jesper Dangaard Brouer
     
  • When initiating I/O on a multiqueue and multi-IRQ device, we may want
    to select a queue for which the response will be handled on the same
    or a nearby CPU. This requires a reverse-map of IRQ affinity. Add
    library functions to support a generic reverse-mapping from CPUs to
    objects with affinity and the specific case where the objects are
    IRQs.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

21 Jan, 2011

1 commit

  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

14 Jan, 2011

5 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)
    ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
    ACPI: fix resource check message
    ACPI / Battery: Update information on info notification and resume
    ACPI: Drop device flag wake_capable
    ACPI: Always check if _PRW is present before trying to evaluate it
    ACPI / PM: Check status of power resources under mutexes
    ACPI / PM: Rename acpi_power_off_device()
    ACPI / PM: Drop acpi_power_nocheck
    ACPI / PM: Drop acpi_bus_get_power()
    Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()
    ACPI / Fan: Rework the handling of power resources
    ACPI / PM: Register power resource devices as soon as they are needed
    ACPI / PM: Register acpi_power_driver early
    ACPI / PM: Add function for updating device power state consistently
    ACPI / PM: Add function for device power state initialization
    ACPI / PM: Introduce __acpi_bus_get_power()
    ACPI / PM: Introduce function for refcounting device power resources
    ACPI / PM: Add functions for manipulating lists of power resources
    ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes
    ACPICA: Update version to 20101209
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     
  • Check for end of the input buffer when skipping over the filename field in
    the .gz file header.

    Signed-off-by: Lasse Collin
    Cc: "H. Peter Anvin"
    Cc: Alain Knaff
    Cc: Albin Tonnerre
    Cc: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lasse Collin
     
  • This implements the API defined in which is
    used for kernel, initramfs, and initrd decompression. This patch together
    with the first patch is enough for XZ-compressed initramfs and initrd;
    XZ-compressed kernel will need arch-specific changes.

    The buffering requirements described in decompress_unxz.c are stricter
    than with gzip, so the relevant changes should be done to the
    arch-specific code when adding support for XZ-compressed kernel.
    Similarly, the heap size in arch-specific pre-boot code may need to be
    increased (30 KiB is enough).

    The XZ decompressor needs memmove(), memeq() (memcmp() == 0), and
    memzero() (memset(ptr, 0, size)), which aren't available in all
    arch-specific pre-boot environments. I'm including simple versions in
    decompress_unxz.c, but a cleaner solution would naturally be nicer.

    Signed-off-by: Lasse Collin
    Cc: "H. Peter Anvin"
    Cc: Alain Knaff
    Cc: Albin Tonnerre
    Cc: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lasse Collin
     
  • In userspace, the .lzma format has become mostly a legacy file format that
    got superseded by the .xz format. Similarly, LZMA Utils was superseded by
    XZ Utils.

    These patches add support for XZ decompression into the kernel. Most of
    the code is as is from XZ Embedded .
    It was written for the Linux kernel but is usable in other projects too.

    Advantages of XZ over the current LZMA code in the kernel:
    - Nice API that can be used by other kernel modules; it's
    not limited to kernel, initramfs, and initrd decompression.
    - Integrity check support (CRC32)
    - BCJ filters improve compression of executable code on
    certain architectures. These together with LZMA2 can
    produce a few percent smaller kernel or Squashfs images
    than plain LZMA without making the decompression slower.

    This patch: Add the main decompression code (xz_dec), testing module
    (xz_dec_test), wrapper script (xz_wrap.sh) for the xz command line tool,
    and documentation. The xz_dec module is enough to have a usable XZ
    decompressor e.g. for Squashfs.

    Signed-off-by: Lasse Collin
    Cc: "H. Peter Anvin"
    Cc: Alain Knaff
    Cc: Albin Tonnerre
    Cc: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lasse Collin