Skip to content
  1. Apr 10, 2009
  2. Apr 09, 2009
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm · df552929
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
        dm kcopyd: fix callback race
        dm kcopyd: prepare for callback race fix
        dm: implement basic barrier support
        dm: remove dm_request loop
        dm: rework queueing and suspension
        dm: simplify dm_request loop
        dm: split DMF_BLOCK_IO flag into two
        dm: rearrange dm_wq_work
        dm: remove limited barrier support
        dm: add integrity support
      df552929
    • Herbert Xu's avatar
      module: try_then_request_module must wait · 97c18e2c
      Herbert Xu authored
      
      
      Since the whole point of try_then_request_module is to retry
      the operation after a module has been loaded, we must wait for
      the module to fully load.
      
      Otherwise all sort of things start breaking, e.g., you won't
      be able to read your encrypted disks on the first attempt.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Tested-by: default avatarMaciej Rutecki <maciej.rutecki@gmail.com>
      Tested-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97c18e2c
    • Nathan Lynch's avatar
      sched: do not count frozen tasks toward load · e3c8ca83
      Nathan Lynch authored
      
      
      Freezing tasks via the cgroup freezer causes the load average to climb
      because the freezer's current implementation puts frozen tasks in
      uninterruptible sleep (D state).
      
      Some applications which perform job-scheduling functions consult the
      load average when making decisions.  If a cgroup is frozen, the load
      average does not provide a useful measure of the system's utilization
      to such applications.  This is especially inconvenient if the job
      scheduler employs the cgroup freezer as a mechanism for preempting low
      priority jobs.  Contrast this with using SIGSTOP for the same purpose:
      the stopped tasks do not count toward system load.
      
      Change task_contributes_to_load() to return false if the task is
      frozen.  This results in /proc/loadavg behavior that better meets
      users' expectations.
      
      Signed-off-by: default avatarNathan Lynch <ntl@pobox.com>
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarNigel Cunningham <nigel@tuxonice.net>
      Tested-by: default avatarNigel Cunningham <nigel@tuxonice.net>
      Cc: <stable@kernel.org>
      Cc: containers@lists.linux-foundation.org
      Cc: linux-pm@lists.linux-foundation.org
      Cc: Matt Helsley <matthltc@us.ibm.com>
      LKML-Reference: <20090408194512.47a99b95@manatee.lan>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e3c8ca83
    • Li Zefan's avatar
      tracing: consolidate documents · 66bb7488
      Li Zefan authored
      
      
      Move kmemtrace.txt, tracepoints.txt, ftrace.txt and mmiotrace.txt to
      the new trace/ directory.
      
      I didnt find any references to those documents in both source
      files and documents, so no extra work needs to be done.
      
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarPekka Paalanen <pq@iki.fi>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      LKML-Reference: <49DD6E2B.6090200@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      66bb7488
    • Jaswinder Singh Rajput's avatar
      x86: cpu_debug remove execute permission · f20ab9c3
      Jaswinder Singh Rajput authored
      
      
      It seems by mistake these files got execute permissions so removing it.
      
      Signed-off-by: default avatarJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      LKML-Reference: <1239211186.9037.2.camel@ht.satnam>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f20ab9c3
    • Li Zefan's avatar
      blktrace: pass the right pointer to kfree() · 9eb85125
      Li Zefan authored
      
      
      Impact: fix kfree crash with non-standard act_mask string
      
      If passing a string with leading white spaces to strstrip(),
      the returned ptr != the original ptr.
      
      This bug was introduced by me.
      
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <49DD694C.8020902@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9eb85125
    • Frederic Weisbecker's avatar
      tracing/syscalls: use a dedicated file header · 47788c58
      Frederic Weisbecker authored
      
      
      Impact: fix build warnings and possibe compat misbehavior on IA64
      
      Building a kernel on ia64 might trigger these ugly build warnings:
      
      CC      arch/ia64/ia32/sys_ia32.o
      In file included from arch/ia64/ia32/sys_ia32.c:55:
      arch/ia64/ia32/ia32priv.h:290:1: warning: "elf_check_arch" redefined
      In file included from include/linux/elf.h:7,
                       from include/linux/module.h:14,
                       from include/linux/ftrace.h:8,
                       from include/linux/syscalls.h:68,
                       from arch/ia64/ia32/sys_ia32.c:18:
      arch/ia64/include/asm/elf.h:19:1: warning: this is the location of the previous definition
      [...]
      
      sys_ia32.c includes linux/syscalls.h which in turn includes linux/ftrace.h
      to import the syscalls tracing prototypes.
      
      But including ftrace.h can pull too much things for a low level file,
      especially on ia64 where the ia32 private headers conflict with higher
      level headers.
      
      Now we isolate the syscall tracing headers in their own lightweight file.
      
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Tested-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Michael Rubin <mrubin@google.com>
      Cc: Martin Bligh <mbligh@google.com>
      Cc: Michael Davidson <md@google.com>
      LKML-Reference: <20090408184058.GB6017@nowhere>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      47788c58
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · f4efdd65
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
        work_on_cpu(): rewrite it to create a kernel thread on demand
        kthread: move sched-realeted initialization from kthreadd context
        kthread: Don't looking for a task in create_kthread() #2
      f4efdd65
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/battery-2.6 · d8312204
      Linus Torvalds authored
      * git://git.infradead.org/battery-2.6:
        pda_power: Add optional OTG transceiver and voltage regulator support
        pcf50633_charger: Remove unused mbc_set_status function
        pcf50633_charger: Enable periodic charging restart
      d8312204
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · 3d4d4c8b
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
        cap_prctl: don't set error to 0 at 'no_change'
      3d4d4c8b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · c71d9caf
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        igb: remove sysfs entry that was used to set the number of vfs
        igbvf: add new driver to support 82576 virtual functions
        drivers/net/eql.c: Fix a dev leakage.
        niu: Fix unused variable warning.
        r6040: set MODULE_VERSION
        bnx2: Don't use reserved names
        FEC driver: add missing #endif
        niu: Fix error handling
        mv643xx_eth: don't reset the rx coal timer on interface up
        smsc911x: correct debugging message on mii read timeout
        ethoc: fix library build errors
        netfilter: ctnetlink: fix regression in expectation handling
        netfilter: fix selection of "LED" target in netfilter
        netfilter: ip6tables regression fix
      c71d9caf
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · a219ee88
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        sparc: Hook up sys_preadv and sys_pwritev
        sparc64: add_node_ranges() must be __init
        serial: sunsu: sunsu_kbd_ms_init needs to be __devinit
        sparc: Fix section mismatch warnings in cs4231 sound driver.
        sparc64: Fix section mismatch warnings in PCI controller drivers.
        sparc64: Fix section mismatch warnings in power driver.
        sparc64: get_cells() can't be marked __init
      a219ee88
    • Linus Torvalds's avatar
      Merge branch 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a7b334de
      Linus Torvalds authored
      * 'ext3-latency-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext3: Try to avoid starting a transaction in writepage for data=writepage
        block_write_full_page: switch synchronous writes to use WRITE_SYNC_PLUG
      a7b334de
    • Andrew Morton's avatar
      work_on_cpu(): rewrite it to create a kernel thread on demand · 6b44003e
      Andrew Morton authored
      
      
      Impact: circular locking bugfix
      
      The various implemetnations and proposed implemetnations of work_on_cpu()
      are vulnerable to various deadlocks because they all used queues of some
      form.
      
      Unrelated pieces of kernel code thus gained dependencies wherein if one
      work_on_cpu() caller holds a lock which some other work_on_cpu() callback
      also takes, the kernel could rarely deadlock.
      
      Fix this by creating a short-lived kernel thread for each work_on_cpu()
      invokation.
      
      This is not terribly fast, but the only current caller of work_on_cpu() is
      pci_call_probe().
      
      It would be nice to find some other way of doing the node-local
      allocations in the PCI probe code so that we can zap work_on_cpu()
      altogether.  The code there is rather nasty.  I can't think of anything
      simple at this time...
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      6b44003e
    • Oleg Nesterov's avatar
      kthread: move sched-realeted initialization from kthreadd context · 1c99315b
      Oleg Nesterov authored
      
      
      kthreadd is the single thread which implements ths "create" request, move
      sched_setscheduler/etc from create_kthread() to kthread_create() to
      improve the scalability.
      
      We should be careful with sched_setscheduler(), use _nochek helper.
      
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Pavel Emelyanov <xemul@openvz.org>
      Cc: Vitaliy Gusev <vgusev@openvz.org
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      1c99315b
    • Vitaliy Gusev's avatar
      kthread: Don't looking for a task in create_kthread() #2 · 3217ab97
      Vitaliy Gusev authored
      
      
      Remove the unnecessary find_task_by_pid_ns(). kthread() can just
      use "current" to get the same result.
      
      Signed-off-by: default avatarVitaliy Gusev <vgusev@openvz.org>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      3217ab97
    • Mikulas Patocka's avatar
      dm kcopyd: fix callback race · 340cd444
      Mikulas Patocka authored
      If the thread calling dm_kcopyd_copy is delayed due to scheduling inside
      split_job/segment_complete and the subjobs complete before the loop in
      split_job completes, the kcopyd callback could be invoked from the
      thread that called dm_kcopyd_copy instead of the kcopyd workqueue.
      
      dm_kcopyd_copy -> split_job -> segment_complete -> job->fn()
      
      Snapshots depend on the fact that callbacks are called from the singlethreaded
      kcopyd workqueue and expect that there is no racing between individual
      callbacks. The racing between callbacks can lead to corruption of exception
      store and it can also mean that exception store callbacks are called twice
      for the same exception - a likely reason for crashes reported inside
      pending_complete() / remove_exception().
      
      This patch fixes two problems:
      
      1. job->fn being called from the thread that submitted the job (see above).
      
      - Fix: hand over the completion callback to the kcopyd thread.
      
      2. job->fn(read_err, write_err, job->context); in segment_complet...
      340cd444
    • Mikulas Patocka's avatar
      dm kcopyd: prepare for callback race fix · 73830857
      Mikulas Patocka authored
      
      
      Use a variable in segment_complete() to point to the dm_kcopyd_client
      struct and only release job->pages in run_complete_job() if any are
      defined.  These changes are needed by the next patch.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      73830857
    • Mikulas Patocka's avatar
      dm: implement basic barrier support · af7e466a
      Mikulas Patocka authored
      
      
      Barriers are submitted to a worker thread that issues them in-order.
      
      The thread is modified so that when it sees a barrier request it waits
      for all pending IO before the request then submits the barrier and
      waits for it.  (We must wait, otherwise it could be intermixed with
      following requests.)
      
      Errors from the barrier request are recorded in a per-device barrier_error
      variable. There may be only one barrier request in progress at once.
      
      For now, the barrier request is converted to a non-barrier request when
      sending it to the underlying device.
      
      This patch guarantees correct barrier behavior if the underlying device
      doesn't perform write-back caching. The same requirement existed before
      barriers were supported in dm.
      
      Bottom layer barrier support (sending barriers by target drivers) and
      handling devices with write-back caches will be done in further patches.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      af7e466a
    • Mikulas Patocka's avatar
      dm: remove dm_request loop · 92c63902
      Mikulas Patocka authored
      
      
      Remove queue_io return value and a loop in dm_request.
      
      IO may be submitted to a worker thread with queue_io().  queue_io() sets
      DMF_QUEUE_IO_TO_THREAD so that all further IO is queued for the thread. When
      the thread finishes its work, it clears DMF_QUEUE_IO_TO_THREAD and from this
      point on, requests are submitted from dm_request again. This will be used
      for processing barriers.
      
      Remove the loop in dm_request. queue_io() can submit I/Os to the worker thread
      even if DMF_QUEUE_IO_TO_THREAD was not set.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      92c63902
    • Mikulas Patocka's avatar
      dm: rework queueing and suspension · 3b00b203
      Mikulas Patocka authored
      
      
      Rework shutting down on suspend and document the associated rules.
      
      Drop write lock in __split_and_process_bio to allow more processing
      concurrency.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      3b00b203
    • Alasdair G Kergon's avatar
      dm: simplify dm_request loop · 54d9a1b4
      Alasdair G Kergon authored
      
      
      Refactor the code in dm_request().
      
      Require the new DMF_BLOCK_FOR_SUSPEND flag on readahead bios we will
      discard so we don't drop such bios while processing a barrier.
      
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      54d9a1b4
    • Alasdair G Kergon's avatar
      dm: split DMF_BLOCK_IO flag into two · 1eb787ec
      Alasdair G Kergon authored
      
      
      Split the DMF_BLOCK_IO flag into two.
      
      DMF_BLOCK_IO_FOR_SUSPEND is set when I/O must be blocked while suspending a
      device.  DMF_QUEUE_IO_TO_THREAD is set when I/O must be queued to a
      worker thread for later processing.
      
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      1eb787ec
    • Alasdair G Kergon's avatar
      dm: rearrange dm_wq_work · df12ee99
      Alasdair G Kergon authored
      
      
      Refactor dm_wq_work() to make later patch more readable.
      
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      df12ee99
    • Mikulas Patocka's avatar
      dm: remove limited barrier support · 692d0eb9
      Mikulas Patocka authored
      
      
      Prepare for full barrier implementation: first remove the restricted support.
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      692d0eb9
    • Martin K. Petersen's avatar
      dm: add integrity support · 9c47008d
      Martin K. Petersen authored
      
      
      This patch provides support for data integrity passthrough in the device
      mapper.
      
       - If one or more component devices support integrity an integrity
         profile is preallocated for the DM device.
      
       - If all component devices have compatible profiles the DM device is
         flagged as capable.
      
       - Handle integrity metadata when splitting and cloning bios.
      
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      9c47008d
    • Serge E. Hallyn's avatar
      cap_prctl: don't set error to 0 at 'no_change' · 5bf37ec3
      Serge E. Hallyn authored
      
      
      One-liner: capsh --print is broken without this patch.
      
      In certain cases, cap_prctl returns error > 0 for success.  However,
      the 'no_change' label was always setting error to 0.  As a result,
      for example, 'prctl(CAP_BSET_READ, N)' would always return 0.
      It should return 1 if a process has N in its bounding set (as
      by default it does).
      
      I'm keeping the no_change label even though it's now functionally
      the same as 'error'.
      
      Signed-off-by: default avatarSerge Hallyn <serue@us.ibm.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      5bf37ec3
    • Alexander Duyck's avatar
      igb: remove sysfs entry that was used to set the number of vfs · 2a3abf6d
      Alexander Duyck authored
      
      
      This patch removes the sysfs entry num_vfs which was added to support
      enabling pci virtual functions for 82576.
      
      To prevent VFs from loading automatically a module parameter "max_vfs" was
      added so that the number of VFs per PF can be limited.  This is especially
      useful when 4 or more 82576 ports are on the system because otherwise to
      load all VFs would result in 8 interface per physical port.
      
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a3abf6d