17 May, 2007

26 commits

  • Currently we have a maze of configuration variables that determine the
    maximum slab size. Worst of all it seems to vary between SLAB and SLUB.

    So define a common maximum size for kmalloc. For conveniences sake we use
    the maximum size ever supported which is 32 MB. We limit the maximum size
    to a lower limit if MAX_ORDER does not allow such large allocations.

    For many architectures this patch will have the effect of adding large
    kmalloc sizes. x86_64 adds 5 new kmalloc sizes. So a small amount of
    memory will be needed for these caches (contemporary SLAB has dynamically
    sizeable node and cpu structure so the waste is less than in the past)

    Most architectures will then be able to allocate object with sizes up to
    MAX_ORDER. We have had repeated breakage (in fact whenever we doubled the
    number of supported processors) on IA64 because one or the other struct
    grew beyond what the slab allocators supported. This will avoid future
    issues and f.e. avoid fixes for 2k and 4k cpu support.

    CONFIG_LARGE_ALLOCS is no longer necessary so drop it.

    It fixes sparc64 with SLAB.

    Signed-off-by: Christoph Lameter
    Signed-off-by: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Consolidate functionality into the #ifdef section.

    Extract tracing into one subroutine.

    Move object debug processing into the #ifdef section so that the
    code in __slab_alloc and __slab_free becomes minimal.

    Reduce number of functions we need to provide stubs for in the !SLUB_DEBUG case.

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

    Christoph Lameter
     
  • SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

    Signed-off-by: Christoph Lameter
    Cc: David Howells
    Cc: Jens Axboe
    Cc: Steven French
    Cc: Michael Halcrow
    Cc: OGAWA Hirofumi
    Cc: Miklos Szeredi
    Cc: Steven Whitehouse
    Cc: Roman Zippel
    Cc: David Woodhouse
    Cc: Dave Kleikamp
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Anton Altaparmakov
    Cc: Mark Fasheh
    Cc: Paul Mackerras
    Cc: Christoph Hellwig
    Cc: Jan Kara
    Cc: David Chinner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • The atomicity when handling flags in SLUB is not necessary since both flags
    used by SLUB are not updated in a racy way. Flag updates are either done
    during slab creation or destruction or under slab_lock. Some of these flags
    do not have the non atomic variants that we need. So define our own.

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

    Christoph Lameter
     
  • Align the output of % with K/M/G of sizes.

    Check for empty NUMA information to avoid segfault on !NUMA.

    -r should work directly not only if we match a single slab
    without additional options.

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

    Christoph Lameter
     
  • I'm getting zillions of undefined references to __kmalloc_size_too_large on
    alpha. For some reason alpha is building out-of-line copies of kmalloc_slab()
    into lots of compilation units.

    It turns out that gcc just isn't smart enough to work out that
    __builtin_contant_p(size)==true implies that __builtin_contant_p(index)==true.

    So let's give it a bit of help.

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

    Andrew Morton
     
  • slub warns on this, and we're working on making kmalloc(0) return NULL.
    Let's make slab warn as well so our testers detect such callers more
    rapidly.

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

    Christoph Lameter
     
  • Use inline functions to access the per cpu bit. Intoduce the notion of
    "freezing" a slab to make things more understandable.

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

    Christoph Lameter
     
  • Two definitions remained in slab.h that are particular to the SLAB allocator.
    Move to slab_def.h

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

    Christoph Lameter
     
  • No arch sets ARCH_USES_SLAB_PAGE_STRUCT anymore.

    Remove the experimental dependency as well since we want to have it as
    a real alternative to SLAB.

    It all comes down to killing a single line from init/Kconfig.

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

    Christoph Lameter
     
  • There is no user of destructors left. There is no reason why we should keep
    checking for destructors calls in the slab allocators.

    The RFC for this patch was discussed at
    http://marc.info/?l=linux-kernel&m=117882364330705&w=2

    Destructors were mainly used for list management which required them to take a
    spinlock. Taking a spinlock in a destructor is a bit risky since the slab
    allocators may run the destructors anytime they decide a slab is no longer
    needed.

    Patch drops destructor support. Any attempt to use a destructor will BUG().

    Acked-by: Pekka Enberg
    Acked-by: Paul Mundt
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • The SLOB allocator should implement SLAB_DESTROY_BY_RCU correctly, because
    even on UP, RCU freeing semantics are not equivalent to simply freeing
    immediately. This also allows SLOB to be used on SMP.

    Signed-off-by: Nick Piggin
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: track spindown status and skip spindown_compat if possible
    libata: fix shutdown warning message printing
    libata-acpi: add ATA_FLAG_ACPI_SATA port flag
    libata: during revalidation, check n_sectors after device is configured
    libata: separate out ata_dev_reread_id()
    pata_scc had been missed by ata_std_prereset() switch

    Linus Torvalds
     
  • * 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
    [ALSA] usbaudio - Coping with short replies in usbmixer
    [ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty
    [ALSA] Fix probe of non-PnP ISA devices
    [ALSA] version 1.0.14rc4
    [ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops
    [ALSA] ASoC AC97 device reg bugfix
    [ALSA] ASoC AC97 static GPL symbol fix
    [ALSA] hda-codec - Make the mixer capability check more robust
    [ALSA] usb-audio: another Logitech QuickCam ID

    Linus Torvalds
     
  • * 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32:
    [AVR32] Implement platform hooks for atmel_lcdfb driver
    [AVR32] Wire up signalfd, timerfd and eventfd
    [AVR32] optimize pagefault path
    [AVR32] Remove bogus comment in arch/avr32/kernel/irq.c

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Add hypervisor API negotiation and fix console bugs.

    Linus Torvalds
     
  • We call alloc_page where we should be calling __page_cache_alloc.

    __page_cache_alloc performs cpuset memory spreading. alloc_page does not.
    There is no reason that pages allocated via find_or_create should be
    exempt.

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

    Christoph Lameter
     
  • alpha:

    drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma':
    drivers/parport/parport_pc.c:636: warning: implicit declaration of function 'dma_map_single'
    drivers/parport/parport_pc.c:637: error: 'DMA_TO_DEVICE' undeclared (first use in this function)
    drivers/parport/parport_pc.c:637: error: (Each undeclared identifier is reported only once
    drivers/parport/parport_pc.c:637: error: for each function it appears in.)

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

    Andrew Morton
     
  • find_first_zero_bit accepts number of bits, not longs.

    Signed-off-by: Domen Puncer
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Domen Puncer
     
  • afs_prepare_write() should not mark a page up to date if it only partially
    fills it in, in expectation of the caller filling in the rest prior to calling
    commit_write(). commit_write(), however, should mark the page up to date.

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

    David Howells
     
  • kmem_cache_create() was swapping ctor and dtor in calling find_mergeable():
    though it caused no bug, and probably never would, even if destructors are
    retained; but fix it so as not to generate anxiety ;)

    Signed-off-by: Hugh Dickins
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Sorry I screwed up the comparison. It is only an error if we attempt
    to allocate a slab larger than the maximum allowed size.

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

    Christoph Lameter
     
  • Fix AFS to write back dirty on unmounting. This didn't happen because
    afs_super_ops.drop_inode was pointing to generic_delete_inode. Now this
    pointer is left set to NULL so that the default behaviour occurs instead.

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

    David Howells
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] optimize pagefaults a little
    [IA64] Fix section conflict of ia64_mlogbuf_finish
    [IA64] s/scalibility/scalability/
    [IA64] kdump on INIT needs multi-nodes sync-up (v.2)
    [IA64] wire up {signal,timer,event}fd syscalls
    [IA64] spelling fixes: arch/ia64/

    Linus Torvalds
     
  • In commit e3c7db621bed4afb8e231cb005057f2feb5db557 we fixed the resume
    ordering, so that the ACPI low-level resume code was called before the
    actual driver resume was called. However, that broke the nesting logic
    of suspend and resume, and we continued to suspend the devices _after_
    we the ACPI device suspend code was called.

    That resulted in us saving PCI state for devices that had already been
    changed by ACPI, and in some cases disabled entirely (causing the PCI
    save_state to be all-ones). Which in turn caused the wrong state to be
    written back on resume.

    This moves the ACPI device suspend to after the device model per-device
    suspend() calls. This fixes the bogus state save.

    Thanks to Lukáš Hejtmánek for testing.

    Acked-by: Lukas Hejtmanek
    Acked-by: Rafael J. Wysocki
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: Andrew Morton
    Cc: Greg KH
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Get rid of the notifier list and call the kprobes code directly
    if compiled in. This mirrors the changes that recently went
    into powerpc, s390 and sparc64.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tony Luck

    Christoph Hellwig
     

16 May, 2007

14 commits

  • This patch makes sure that short USB replies are treated as an
    error when requesting the value of a certain mixer control.

    Signed-off-by: Thomas Reitmayr
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Thomas Reitmayr
     
  • Included is a patch against current alsa-kernel hg tip adding
    quirks that Ubuntu Dapper/Edgy/Feisty contains.

    Signed-off-by: Daniel T Chen
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Daniel T Chen
     
  • isa_register_driver() returns an error if no device is found
    and it's no fatal error for the drivers with pnp support.

    Signed-off-by: Rene Herman
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Rene Herman
     
  • Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     
  • Fixed some platform no sound and Add JD Function for below platform list:
    Sony(0x104d) 0x9015, 0x900e, 0x1f00
    Toshiba(0x1179) DALLAS 0xff00, 0xff01
    Targa(0x1462) 0x28fb
    Asus(0x1043) A7J 0x060d
    Lenovo(0x17aa) 0x3bfd, 0x2085
    MEDION(0x17c0) MD2 0x4071

    Signed-off-by: Kailang Yang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Kailang Yang
     
  • This patch fixes a bug whereby AC97 bus device data was being clobbered
    when AC97 codecs using the generic ac97_codec.c driver were being
    registered. Codecs that didn't use the generic driver were unaffected
    (e.g. WM9712, WM9713).
    Changes:-
    o Add new AC97 codec class for custom (or need bus dev registration)
    AC97 codecs.
    o Only register/deregister this custom codec device with the AC97 bus.
    The generic AC97 driver already does this for generic codec devices.
    This may be related to bug #3038 :-
    https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3038

    Signed-off-by: Liam Girdwood
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Liam Girdwood
     
  • This patch fixes a bug whereby the GPL'ed symbol ac97_dai was being
    declared as static.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Liam Girdwood
     
  • In some cases, mixer elements return -EINVAL because it couldn't
    obtain proper amp_cap bits. The patch improves the robustness,
    trying the amp_cap query again in such a case.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • This patch adds the ID for another quickcam microphone, reported by freqmod
    on ALSA ticket #0003040
    I'm going to submit a USB patch separately to provide a macro to simplify these
    entries, as suggested by Alan Stern. We could switch to using that in future.

    Signed-off-by: Daniel Drake
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Jaroslav Kysela

    Daniel Drake
     
  • Our assumption that most distros issue STANDBYNOW seems wrong. The
    upstream sysvinit and thus many distros including gentoo and opensuse
    don't take any action for libata disks on spindown. We can skip
    compat handling for these distros so that they don't need to update
    anything to take advantage of kernel-side shutdown.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Unlocking ap->lock and ssleeping don't work because SCSI commands can
    be issued from completion path without context. Reimplement delayed
    completion by allowing translation functions to override
    qc->scsidone(), storing the original completion function to
    scmd->scsi_done() and overriding qc->scsidone() with a function which
    schedules delayed invocation of scmd->scsi_done().

    This isn't pretty at all but all the ugly parts are thankfully
    contained in the stop translation path where the compat feature is
    implemented.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Whether a controller needs IDE or SATA ACPI hierarchy is determined by
    the programming interface of the controller not by whether the
    controller is SATA or PATA, or it supports slave device or not. This
    patch adds ATA_FLAG_ACPI_SATA port flags which tells libata-acpi that
    the port needs SATA ACPI nodes, and sets the flag for ahci and
    sata_sil24.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Device might be resized during ata_dev_configure() due to HPA or
    (later) ACPI _GTF. Currently it's worked around by caching n_sectors
    before turning off HPA. The cached original size is overwritten if
    the device is reconfigured without being hardreset - which always
    happens after configuring trasnfer mode. If the device gets hardreset
    for some reason after that, revalidation fails with -ENODEV.

    This patch makes size checking more robust by moving n_sectors check
    from ata_dev_reread_id() to ata_dev_revalidate() after the device is
    fully configured. No matter what happens during configuration, a
    device must have the same n_sectors after fully configured to be
    treated as the same device.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Separate out ata_dev_reread_id() from ata_dev_revalidate().
    ata_dev_reread_id() reads IDENTIFY page and determines whether the
    same device is still there. ata_dev_revalidate() reconfigures after
    reread completes. This will be used by ACPI update.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo