24 May, 2007

6 commits

  • Allow user space to determine if a disk supports Asynchronous Notification of
    media changes. This is done by adding a new sysfs file "capability_flags",
    which is documented in (insert file name). This sysfs file will export all
    disk capabilities flags to user space. We also define a new flag to define
    the media change notification capability.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kristen Carlson Accardi
     
  • Other than refrigerator, no one else calls frozen_process(). So move it from
    include/linux/freezer.h to kernel/power/process.c.

    Also, since a task can be marked as frozen by itself, we don't need to pass
    the (struct task_struct *p) parameter to frozen_process().

    Signed-off-by: Gautham R Shenoy
    Signed-off-by: Rafael J. Wysocki
    Cc: Oleg Nesterov
    Cc: Pavel Machek
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gautham R Shenoy
     
  • This patch fixes the race pointed out by Oleg Nesterov.

    * Freezer marks a thread as freezeable.
    * The thread now marks itself PF_NOFREEZE, but it will be frozen on
    on calling try_to_freeze(). Thus the task is frozen, even though it doesn't
    want to.
    * Subsequent thaw_processes() will also fail to thaw the task since it is
    marked PF_NOFREEZE.

    Avoid this problem by checking the task's PF_NOFREEZE status in
    frozen_processes() before marking the task as frozen.

    Signed-off-by: Gautham R Shenoy
    Signed-off-by: Rafael J. Wysocki
    Cc: Oleg Nesterov
    Cc: Pavel Machek
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gautham R Shenoy
     
  • Currently try_to_freeze_tasks() has to wait until all of the vforked processes
    exit and for this reason every user can make it fail. To fix this problem we
    can introduce the additional process flag PF_FREEZER_SKIP to be used by tasks
    that do not want to be counted as freezable by the freezer and want to have
    TIF_FREEZE set nevertheless. Then, this flag can be set by tasks using
    sys_vfork() before they call wait_for_completion(&vfork) and cleared after
    they have woken up. After clearing it, the tasks should call try_to_freeze()
    as soon as possible.

    Signed-off-by: Rafael J. Wysocki
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Pavel Machek
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • If the freezing of tasks fails and a task is preempted in refrigerator()
    before calling frozen_process(), then thaw_tasks() may run before this task is
    frozen. In that case the task will freeze and no one will thaw it.

    To fix this race we can call freezing(current) in refrigerator() along with
    frozen_process(current) under the task_lock() which also should be taken in
    the error path of try_to_freeze_tasks() as well as in thaw_process().
    Moreover, if thaw_process() additionally clears TIF_FREEZE for tasks that are
    not frozen, we can be sure that all tasks are thawed and there are no pending
    "freeze" requests after thaw_tasks() has run.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Add the IDE device ID to atiixp_pci_tbl struct in atiixp.c for ATI SB700.

    From: Henry Su
    Signed-off-by: Luugi Marsan
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Henry Su
     

23 May, 2007

1 commit


22 May, 2007

9 commits

  • commit e8edc6e03a5c8562dc70a6d969f732bdb355a7e7 added an include of
    linux/jiffies.h in linux/smb_fs.h outside the ifdef __KERNEL__.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    Add constant for FCS/CRC length (frame check sequence)
    declance: Remove a dangling spin_unlock_irq() thingy
    e1000: Don't enable polling in open() (was: e1000: assertion hit in e1000_clean(), kernel 2.6.21.1)

    Linus Torvalds
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: bump versions
    libata: Trim trailing whitespace
    libata: Kiss post_set_mode goodbye
    ata_piix: clean up
    pata_hpt366: Enable bits are unreliable so don't use them
    libata: Add Seagate STT20000A to DMA blacklist.
    ahci: disable 64bit dma on sb600

    Linus Torvalds
     
  • As of the -mm tree we don't have post_set_mode users any more.

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • About a dozen drivers that have some form of crc checksumming or offloading
    use this constant, warranting a global define for it.

    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik

    Auke Kok
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix:
    mm/slab: fix section mismatch warning
    mm: fix section mismatch warnings
    init/main: use __init_refok to fix section mismatch
    kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
    all-archs: consolidate .data section definition in asm-generic
    all-archs: consolidate .text section definition in asm-generic
    kbuild: add "Section mismatch" warning whitelist for powerpc
    kbuild: make better section mismatch reports on i386, arm and mips
    kbuild: make modpost section warnings clearer
    kconfig: search harder for curses library in check-lxdialog.sh
    kbuild: include limits.h in sumversion.c for PATH_MAX
    powerpc: Fix the MODALIAS generation in modpost for of devices

    Linus Torvalds
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [NET]: Fix race condition about network device name allocation.
    [IPV4]: icmp: fix crash with sysctl_icmp_errors_use_inbound_ifaddr
    [NETFILTER]: nf_conntrack_ipv4: fix incorrect #ifdef config name
    [NETFILTER]: nf_conntrack: fix use-after-free in helper destroy callback invocation
    [IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all
    [TCP] FRTO: Prevent state inconsistency in corner cases
    [TCP] FRTO: Add missing ECN CWR sending to one of the responses
    [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error
    [RFKILL]: Fix check for correct rfkill allocation
    [IPV6]: Add ip6_tunnel.h to headers_install

    Linus Torvalds
     
  • The ifdef tests were broken. Assume it acts like gcc 4

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • First thing mm.h does is including sched.h solely for can_do_mlock() inline
    function which has "current" dereference inside. By dealing with can_do_mlock()
    mm.h can be detached from sched.h which is good. See below, why.

    This patch
    a) removes unconditional inclusion of sched.h from mm.h
    b) makes can_do_mlock() normal function in mm/mlock.c
    c) exports can_do_mlock() to not break compilation
    d) adds sched.h inclusions back to files that were getting it indirectly.
    e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
    getting them indirectly

    Net result is:
    a) mm.h users would get less code to open, read, preprocess, parse, ... if
    they don't need sched.h
    b) sched.h stops being dependency for significant number of files:
    on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
    after patch it's only 3744 (-8.3%).

    Cross-compile tested on

    all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
    alpha alpha-up
    arm
    i386 i386-up i386-defconfig i386-allnoconfig
    ia64 ia64-up
    m68k
    mips
    parisc parisc-up
    powerpc powerpc-up
    s390 s390-up
    sparc sparc-up
    sparc64 sparc64-up
    um-x86_64
    x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

    as well as my two usual configs.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

20 May, 2007

1 commit


19 May, 2007

2 commits

  • Throughout the kernel there are a few legitimite references
    to init or exit sections. Most of these are covered by the
    patterns included in modpost but a few nees special attention.
    To avoid hardcoding a lot of function names in modpost introduce
    a marker so relevant function/data can be marked.
    When modpost see a reference to a init/exit function from
    a function/data marked no warning will be issued.

    Idea from: Andrew Morton

    Signed-off-by: Sam Ravnborg
    Cc: Andrew Morton

    Sam Ravnborg
     
  • 1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It does
    in case the argument is a variable but in case it's a constant it behaves
    wrong and returns 0. Probably nobody ever did it so this was never noticed.

    Signed-off-by: Rolf Eike Beer
    Signed-off-by: Linus Torvalds

    Rolf Eike Beer
     

18 May, 2007

3 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [IPV4]: Remove IPVS icmp hack from route.c for now.
    [IPV4]: Correct rp_filter help text.
    [TCP]: TCP_CONG_YEAH requires TCP_CONG_VEGAS
    [TCP] slow start: Make comments and code logic clearer.
    [BLUETOOTH]: Fix locking in hci_sock_dev_event().
    [NET]: Fix BMSR_100{HALF,FULL}2 defines in linux/mii.h
    [NET]: lockdep classes in register_netdevice

    Linus Torvalds
     
  • As pointed out by Jarek Poplawski, the patch

    [WORKQUEUE]: cancel_delayed_work: use del_timer() instead of del_timer_sync()
    commit: 071b638689464c6b39407025eedd810d5b5e6f5d

    was wrong, it was merged by mistake after that.

    From the changelog:

    after this patch:
    ...
    delayed_work_timer_fn->__queue_work() in progress.

    The latter doesn't differ from the caller's POV,

    it does make a difference if the caller calls flush_workqueue() after
    cancel_delayed_work(), in that case flush_workqueue() can miss this
    work_struct.

    Signed-off-by: Oleg Nesterov
    Cc: Jarek Poplawski
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Noticed by Matvejchikov Ilya.

    Signed-off-by: David S. Miller

    David S. Miller
     

17 May, 2007

15 commits

  • Trond Myklebust
     
  • Re-introduce rmap verification patches that Hugh removed when he removed
    PG_map_lock. PG_map_lock actually isn't needed to synchronise access to
    anonymous pages, because PG_locked and PTL together already do.

    These checks were important in discovering and fixing a rare rmap corruption
    in SLES9.

    Signed-off-by: Nick Piggin
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Make sysctl/kernel/core_pattern and fs/exec.c agree on maximum core
    filename size and change it to 128, so that extensive patterns such as
    '/local/cores/%e-%h-%s-%t-%p.core' won't result in truncated filename
    generation.

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

    Dan Aloni
     
  • This patch add new sub-device-id to support new adapter and changed the
    interrupt irq number for unsigned char to unsigned int.

    [akpm@osdl.org: fix whitespace in device table]
    Signed-off by: Wendy Xiong

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

    wendy xiong
     
  • It is a known fact that freezeable multithreaded workqueues doesn't like
    CPU_DEAD. We keep them only for the incoming CPU-hotplug rework.

    Sadly, we can't just kill create_freezeable_workqueue() right now, make
    them singlethread.

    Signed-off-by: Oleg Nesterov
    Cc: "Rafael J. Wysocki"
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Trond Myklebust
     
  • All architectures that have an implementation of smp_call_function_single
    let it return -EBUSY if it is asked to execute func on the current cpu.
    (akpm: except for x86_64). Therefore the UP version must always return
    -EBUSY.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Heiko Carstens
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • * '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
     
  • 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
     
  • Trond Myklebust
     

16 May, 2007

3 commits

  • 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
     
  • 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