10 May, 2007

20 commits

  • This is done in order to be able to run SLUB which expects no modifications
    to its page structs.

    Signed-off-by: Christoph Lameter
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Fix some of the spelling issues. Fix sentences. Discourage SLOB use
    since SLUB can pack objects denser.

    Signed-off-by: Christoph Lameter
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • No "blank" (or "*") line is allowed between the function name and lines for
    it parameter(s).

    Cc: Randy Dunlap
    Signed-off-by: Pekka Enberg
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka J Enberg
     
  • In some cases SLUB is creating uselessly slabs that are larger than
    slub_max_order. Also the layout of some of the slabs was not satisfactory.

    Go to an iterarive approach.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • We have information about how long an object existed and about the nodes and
    cpus where the allocations and frees took place. Add that information to the
    tracking output in /sys/slab/xx/alloc_calls and /sys/slab/free_calls

    This will then enable slabinfo to output nice reports like this:

    christoph@qirst:~/slub$ ./slabinfo kmalloc-128

    Slabcache: kmalloc-128 Aliases: 0 Order : 0

    Sizes (bytes) Slabs Debug Memory
    ------------------------------------------------------------------------
    Object : 128 Total : 12 Sanity Checks : On Total: 49152
    SlabObj: 200 Full : 7 Redzoning : On Used : 24832
    SlabSiz: 4096 Partial: 4 Poisoning : On Loss : 24320
    Loss : 72 CpuSlab: 1 Tracking : On Lalig: 13968
    Align : 8 Objects: 20 Tracing : Off Lpadd: 1152

    kmalloc-128 has no kmem_cache operations

    kmalloc-128: Kernel object allocation
    -----------------------------------------------------------------------
    6 param_sysfs_setup+0x71/0x130 age=284512/284512/284512 pid=1 nodes=0-1,3
    11 percpu_populate+0x39/0x80 age=283914/284428/284512 pid=1 nodes=0
    21 __register_chrdev_region+0x31/0x170 age=282896/284347/284473 pid=1-1705 nodes=0-2
    1 sys_inotify_init+0x76/0x1c0 age=283423 pid=1004 nodes=0
    19 as_get_io_context+0x32/0xd0 age=6/247567/283988 pid=1-11782 nodes=0,2
    10 ida_pre_get+0x4a/0x80 age=277666/283773/284526 pid=0-2177 nodes=0,2
    24 kobject_kset_add_dir+0x37/0xb0 age=282727/283860/284472 pid=1-1723 nodes=0-2
    1 acpi_ds_build_internal_buffer_obj+0xd3/0x11d age=284508 pid=1 nodes=0
    24 con_insert_unipair+0xd7/0x110 age=284438/284438/284438 pid=1 nodes=0,2
    1 uart_open+0x2d2/0x4b0 age=283896 pid=1 nodes=0
    26 dma_pool_create+0x73/0x1a0 age=282762/282833/282916 pid=1705-1723 nodes=0
    1 neigh_table_init_no_netlink+0xd2/0x210 age=284461 pid=1 nodes=0
    2 neigh_parms_alloc+0x2b/0xe0 age=284410/284411/284412 pid=1 nodes=2
    2 neigh_resolve_output+0x1e1/0x280 age=276289/276291/276293 pid=0-2443 nodes=0
    1 netlink_kernel_create+0x90/0x170 age=284472 pid=1 nodes=0
    4 xt_alloc_table_info+0x39/0xf0 age=283958/283958/283959 pid=1 nodes=1
    3 fn_hash_insert+0x473/0x720 age=277653/277661/277666 pid=2177-2185 nodes=0
    1 get_mtrr_state+0x285/0x2a0 age=284526 pid=0 nodes=0
    1 cacheinfo_cpu_callback+0x26d/0x3e0 age=284458 pid=1 nodes=0
    29 kernel_param_sysfs_setup+0x25/0x90 age=284511/284511/284512 pid=1 nodes=0-1,3
    5 process_zones+0x5e/0x170 age=284546/284546/284546 pid=0 nodes=0
    1 drm_core_init+0x48/0x160 age=284421 pid=1 nodes=2

    kmalloc-128: Kernel object freeing
    ------------------------------------------------------------------------
    163 age=4295176847 pid=0 nodes=0-3
    1 __vunmap+0x6e/0xf0 age=282907 pid=1723 nodes=0
    28 free_as_io_context+0x12/0x90 age=9243/262197/283474 pid=42-11754 nodes=0
    1 acpi_get_object_info+0x1b7/0x1d4 age=284475 pid=1 nodes=0
    1 do_acpi_find_child+0x45/0x4e age=284475 pid=1 nodes=0

    NUMA nodes : 0 1 2 3
    ------------------------------------------
    All slabs 7 2 2 1
    Partial slabs 2 2 0 0

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • CONFIG_SLUB_DEBUG can be used to switch off the debugging and sysfs components
    of SLUB. Thus SLUB will be able to replace SLOB. SLUB can arrange objects in
    a denser way than SLOB and the code size should be minimal without debugging
    and sysfs support.

    Note that CONFIG_SLUB_DEBUG is materially different from CONFIG_SLAB_DEBUG.
    CONFIG_SLAB_DEBUG is used to enable slab debugging in SLAB. SLUB enables
    debugging via a boot parameter. SLUB debug code should always be present.

    CONFIG_SLUB_DEBUG can be modified in the embedded config section.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Move the tracking definitions and the check_valid_pointer() function away from
    the debugging related functions.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Trace in both slab_alloc and slab_free has a lot of common code. Use a single
    function for both.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • This replaces the PageError() checking. DebugSlab is clearer and allows for
    future changes to the page bit used. We also need it to support
    CONFIG_SLUB_DEBUG.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Move the resiliency check into the SYSFS section after validate_slab that is
    used by the resiliency check. This will avoid a forward declaration.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Scanning of objects happens in a number of functions. Consolidate that code.
    DECLARE_BITMAP instead of coding the declaration for bitmaps.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Update comments throughout SLUB to reflect the new developments. Fix up
    various awkward sentences.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Its only purpose was to bring some sort of symmetry to sysfs usage when
    dealing with bootstrapping per cpu flushing. Since we do not time out slabs
    anymore we have no need to run finish_bootstrap even without sysfs. Fold it
    back into slab_sysfs_init and drop the initcall for the !SYFS case.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • We really do not need all this gaga there.

    ksize gives us all the information we need to figure out if the object can
    cope with the new size.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • We needlessly duplicate code. Also make check_valid_pointer inline.

    Signed-off-by: Christoph LAemter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • -e Show empty slabs
    -d Modification of slab debug options at runtime
    -o Operations. Display of ctor / dtor etc.
    -r Report: Display all available information about a slabcache.

    Cleanup tracking display and make it work right.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • If no redzoning is selected then we do not need padding before the next
    object.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • SLUB currently assumes that the cacheline size is static. However, i386 f.e.
    supports dynamic cache line size determination.

    Use cache_line_size() instead of L1_CACHE_BYTES in the allocator.

    That also explains the purpose of SLAB_HWCACHE_ALIGN. So we will need to keep
    that one around to allow dynamic aligning of objects depending on boot
    determination of the cache line size.

    [akpm@linux-foundation.org: need to define it before we use it]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • This is needed before Powerpc can wire up the syscall.

    Signed-off-by: Stephen Rothwell
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • Cc: Pierre Ossman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

09 May, 2007

20 commits

  • In the process of rewriting the x86 setup code, I found a number of
    inaccuracies and outdated recommendations in the boot protocol
    documentation. Revamp to make it more up to date.

    In particular, the common use of the heap actually requires (slightly)
    more than 4K of heap plus stack, which is the recommended amount in
    the document; currently the code compensates by being smaller than
    specified, but we can't assume that will be true forever. Thus,
    recommend that if we have a modern bzImage kernel, that the bootloader
    maximizes the available space.

    Signed-off-by: H. Peter Anvin
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • … from the "expired" array'

    Revert commit bd53f96ca54a21c07e7a0ae1886fa623d370b85f.

    Con says:

    This is no good, sorry. The one I saw originally was with the staircase
    deadline cpu scheduler in situ and was different.

    #define TASK_PREEMPTS_CURR(p, rq) \
    ((p)->prio < (rq)->curr->prio)
    (((p)->prio < (rq)->curr->prio) && ((p)->array == (rq)->active))

    This will fail to wake up a runqueue for a task that has been migrated to the
    expired array of a runqueue which is otherwise idle which can happen with smp
    balancing,

    Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com>
    Cc: Con Kolivas <kernel@kolivas.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Andrew Morton
     
  • We have a standard suffix to associate a designation string to a sensor:
    _label. Use it instead of _position so that libsensors will catch it.
    (This isn't implemented yet, but should be soon.)

    Signed-off-by: Jean Delvare
    Cc: Nicolas Boichat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Let the applesmc device export its address to userspace. libsensors needs
    this to recognize the device and give it a unique ID.

    Signed-off-by: Jean Delvare
    Cc: Nicolas Boichat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Zero-sized allocations are pointless anyway, and the SLUB allocator
    complains about them, so stop doing that.

    Signed-off-by: Tilman Schmidt
    Signed-off-by: Hansjoerg Lipp
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tilman Schmidt
     
  • The recent cleanup uncovered that include/asm-m68k/scatterlist.h
    needs to include

    Signed-off-by: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • Miscellaneous fixes to bring FRV up to date:

    (1) Copy the new syscall numbers from i386 to asm-frv/unistd.h and fill out
    the syscall table in entry.S too.

    (2) Mark __frv_uart0 and __frv_uart1 __pminitdata rather than __initdata so
    that determine_clocks() can access them when CONFIG_PM=y.

    (3) Make arch/frv/mm/elf-fdpic.c include asm/mman.h so that MAP_FIXED is
    available (fixes commit 2fd3bebaad9da3b3b99c46a3389099424bf7ee35).

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • /proc/pid/clear_refs is only defined in the CONFIG_MMU case, so make sure we
    don't have any references to clear_refs_smap() in generic procfs code.

    Signed-off-by: David Rientjes
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • This is to fix unnecessary __meminit definition. These are exported for
    kernel modules.

    I compiled on ia64/x86-64 with memory hotplug on/off.

    Signed-off-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    [CRYPTO] cryptomgr: Fix use after free

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Optimize fault kprobe handling just like powerpc.
    [SPARC]: Wire up utimensat syscall.
    [SPARC64]: Fix request_irq() ignored result warnings in PCI controller code.
    [SPARC64]: Kill asm-sparc64/pbm.h
    [ATYFB]: Fix sparc includes.
    [QLA2XXX]: Fix build on sparc.
    [SPARC64]: Removal of trivial pci_controller_info uses.
    [SPARC64]: Move index info pci_pbm_info.
    [SPARC64]: Move {setup,teardown}_msi_irq into pci_pbm_info.
    [SPARC64]: Move pci_ops into pci_pbm_info.
    [SPARC64] SBUS: Error interrupt registry cleanups.
    [SPARC64] PCI: Use root list of pbm's instead of pci_controller_info's
    [SPARC64] PCI: Kill PROM_PCIRNG_MAX and PROM_PCIIMAP_MAX.
    [SPARC64] PCI: Use common routine to fetch PBM properties.

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits)
    [SCSI] zfcp: clear boxed flag on unit reopen.
    [SCSI] zfcp: clear adapter failed flag if an fsf request times out.
    [SCSI] zfcp: rework request ID management.
    [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI
    [SCSI] zfcp: Locking for req_no and req_seq_no
    [SCSI] zfcp: print S_ID and D_ID with 3 bytes
    [SCSI] ipr: Use PCI-E reset API for new ipr adapter
    [SCSI] qla2xxx: Update version number to 8.01.07-k7.
    [SCSI] qla2xxx: Add MSI support.
    [SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
    [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed.
    [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
    [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
    [SCSI] zfcp: Stop system after memory corruption
    [SCSI] mesh: cleanup variable usage in interrupt handler
    [SCSI] megaraid: replace yield() with cond_resched()
    [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
    [SCSI] aacraid: correct SUN products to README
    [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers
    [SCSI] aacraid: kexec fix (reset interrupt handler)
    ...

    Linus Torvalds
     
  • This reverts commit 464bdd33e9baad9806c7adbd8dfc37081a55f27e.

    Peter Anvin correctly points out that VESA modes have nothing to do with
    frame buffers per se - they are often just regular extended text modes.
    Disabling them just because we don't have frame buffer support is very
    wrong.

    Cc: H. Peter Anvin
    Cc: Antonino A. Daplas ,
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • .. to match what we do on write(). This way, people who write to files
    by using [f]truncate + writable mmap have the same semantics as if they
    were using the write() family of system calls.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • By the time kthread_run returns the param may have already been freed
    so writing the returned thread_struct pointer to param is wrong.

    In fact, we don't need it in param anyway so this patch simply puts it
    on the stack.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • And eliminate DIE_GPF while we're at it.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Everything it contains can be hidden in pci_impl.h

    Signed-off-by: David S. Miller

    David S. Miller
     
  • No need to use asm/pbm.h here.

    Signed-off-by: David S. Miller

    David S. Miller