1. 15 6月, 2014 1 次提交
  2. 12 6月, 2014 8 次提交
    • A
      kill generic_file_splice_write() · 5f073850
      Al Viro 提交于
      no callers left
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5f073850
    • A
      fs/splice.c: remove unneeded exports · 96f9bc8f
      Al Viro 提交于
      ocfs2 was using a bunch of splice.c guts...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      96f9bc8f
    • A
      ->splice_write() via ->write_iter() · 8d020765
      Al Viro 提交于
      iter_file_splice_write() - a ->splice_write() instance that gathers the
      pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
      it to ->write_iter().  A bunch of simple cases coverted to that...
      
      [AV: fixed the braino spotted by Cyrill]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8d020765
    • T
      net: Save software checksum complete · 7e3cead5
      Tom Herbert 提交于
      In skb_checksum complete, if we need to compute the checksum for the
      packet (via skb_checksum) save the result as CHECKSUM_COMPLETE.
      Subsequent checksum verification can use this.
      
      Also, added csum_complete_sw flag to distinguish between software and
      hardware generated checksum complete, we should always be able to trust
      the software computation.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e3cead5
    • T
      net: Preserve CHECKSUM_COMPLETE at validation · 5d0c2b95
      Tom Herbert 提交于
      Currently when the first checksum in a packet is validated using
      CHECKSUM_COMPLETE, ip_summed is overwritten to be CHECKSUM_UNNECESSARY
      so that any subsequent checksums in the packet are not correctly
      validated.
      
      This patch adds csum_valid flag in sk_buff and uses that to indicate
      validated checksum instead of setting CHECKSUM_UNNECESSARY. The bit
      is set accordingly in the skb_checksum_validate_* functions. The flag
      is checked in skb_checksum_complete, so that validation is communicated
      between checksum_init and checksum_complete sequence in TCP and UDP.
      Signed-off-by: NTom Herbert <therbert@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d0c2b95
    • O
      net: add __pskb_copy_fclone and pskb_copy_for_clone · bad93e9d
      Octavian Purdila 提交于
      There are several instances where a pskb_copy or __pskb_copy is
      immediately followed by an skb_clone.
      
      Add a couple of new functions to allow the copy skb to be allocated
      from the fclone cache and thus speed up subsequent skb_clone calls.
      
      Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Marek Lindner <mareklindner@neomailbox.ch>
      Cc: Simon Wunderlich <sw@simonwunderlich.de>
      Cc: Antonio Quartulli <antonio@meshcoding.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Arvid Brodin <arvid.brodin@alten.se>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
      Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Jon Maloy <jon.maloy@ericsson.com>
      Cc: Allan Stephens <allan.stephens@windriver.com>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Reviewed-by: NChristoph Paasch <christoph.paasch@uclouvain.be>
      Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bad93e9d
    • A
      cpumask: Utility function to set n'th cpu - local cpu first · da91309e
      Amir Vadai 提交于
      This function sets the n'th cpu - local cpu's first.
      For example: in a 16 cores server with even cpu's local, will get the
      following values:
      cpumask_set_cpu_local_first(0, numa, cpumask) => cpu 0 is set
      cpumask_set_cpu_local_first(1, numa, cpumask) => cpu 2 is set
      ...
      cpumask_set_cpu_local_first(7, numa, cpumask) => cpu 14 is set
      cpumask_set_cpu_local_first(8, numa, cpumask) => cpu 1 is set
      cpumask_set_cpu_local_first(9, numa, cpumask) => cpu 3 is set
      ...
      cpumask_set_cpu_local_first(15, numa, cpumask) => cpu 15 is set
      
      Curently this function will be used by multi queue networking devices to
      calculate the irq affinity mask, such that as many local cpu's as
      possible will be utilized to handle the mq device irq's.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da91309e
    • D
      ktime: add ktime_after and ktime_before helper · 67cb9366
      Daniel Borkmann 提交于
      Add two minimal helper functions analogous to time_before() and
      time_after() that will later on both be needed by SCTP code.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67cb9366
  3. 11 6月, 2014 8 次提交
  4. 07 6月, 2014 12 次提交
    • S
      svcrdma: refactor marshalling logic · 0bf48289
      Steve Wise 提交于
      This patch refactors the NFSRDMA server marshalling logic to
      remove the intermediary map structures.  It also fixes an existing bug
      where the NFSRDMA server was not minding the device fast register page
      list length limitations.
      Signed-off-by: NTom Tucker <tom@opengridcomputing.com>
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      0bf48289
    • J
      nfs4: remove unused CHANGE_SECURITY_LABEL · 999e5683
      J. Bruce Fields 提交于
      This constant has the wrong value.  And we don't use it.  And it's been
      removed from the 4.2 spec anyway.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      999e5683
    • G
      idle: remove cpu_idle() forward declarations · ae022622
      Geert Uytterhoeven 提交于
      After all architectures were converted to the generic idle framework,
      commit d190e819 ("idle: Remove GENERIC_IDLE_LOOP config switch")
      removed the last caller of cpu_idle().  The forward declarations in
      header files were forgotten.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ae022622
    • C
      mm: introduce kmemleak_update_trace() · ffe2c748
      Catalin Marinas 提交于
      The memory allocation stack trace is not always useful for debugging a
      memory leak (e.g.  radix_tree_preload).  This function, when called,
      updates the stack trace for an already allocated object.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ffe2c748
    • J
      key: convert use of typedef ctl_table to struct ctl_table · d6f50c95
      Joe Perches 提交于
      This typedef is unnecessary and should just be removed.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d6f50c95
    • M
      ipc/shm.c: increase the defaults for SHMALL, SHMMAX · 060028ba
      Manfred Spraul 提交于
      System V shared memory
      
      a) can be abused to trigger out-of-memory conditions and the standard
         measures against out-of-memory do not work:
      
          - it is not possible to use setrlimit to limit the size of shm segments.
      
          - segments can exist without association with any processes, thus
            the oom-killer is unable to free that memory.
      
      b) is typically used for shared information - today often multiple GB.
         (e.g. database shared buffers)
      
      The current default is a maximum segment size of 32 MB and a maximum
      total size of 8 GB.  This is often too much for a) and not enough for
      b), which means that lots of users must change the defaults.
      
      This patch increases the default limits (nearly) to the maximum, which
      is perfect for case b).  The defaults are used after boot and as the
      initial value for each new namespace.
      
      Admins/distros that need a protection against a) should reduce the
      limits and/or enable shm_rmid_forced.
      
      Unix has historically required setting these limits for shared memory,
      and Linux inherited such behavior.  The consequence of this is added
      complexity for users and administrators.  One very common example are
      Database setup/installation documents and scripts, where users must
      manually calculate the values for these limits.  This also requires
      (some) knowledge of how the underlying memory management works, thus
      causing, in many occasions, the limits to just be flat out wrong.
      Disabling these limits sooner could have saved companies a lot of time,
      headaches and money for support.  But it's never too late, simplify
      users life now.
      
      Further notes:
      - The patch only changes default, overrides behave as before:
              # sysctl kernel.shmall=33554432
        would recreate the previous limit for SHMMAX (for the current namespace).
      
      - Disabling sysv shm allocation is possible with:
              # sysctl kernel.shmall=0
        (not a new feature, also per-namespace)
      
      - The limits are intentionally set to a value slightly less than ULONG_MAX,
        to avoid triggering overflows in user space apps.
        [not unreasonable, see http://marc.info/?l=linux-mm&m=139638334330127]
      Signed-off-by: NManfred Spraul <manfred@colorfullife.com>
      Signed-off-by: NDavidlohr Bueso <davidlohr@hp.com>
      Reported-by: NDavidlohr Bueso <davidlohr@hp.com>
      Acked-by: NMichael Kerrisk <mtk.manpages@gmail.com>
      Acked-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      060028ba
    • L
      idr: reorder the fields · dcbff5d1
      Lai Jiangshan 提交于
      idr_layer->layer is always accessed in read path, move it in the front.
      
      idr_layer->bitmap is moved on the bottom.  And rcu_head shares with
      bitmap due to they do not be accessed at the same time.
      
      idr->id_free/id_free_cnt/lock are free list fields, and moved to the
      bottom.  They will be removed in near future.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dcbff5d1
    • O
      signals: introduce kernel_sigaction() · b4e74264
      Oleg Nesterov 提交于
      Now that allow_signal() is really trivial we can unify it with
      disallow_signal().  Add the new helper, kernel_sigaction(), and
      reimplement allow_signal/disallow_signal as a trivial wrappers.
      
      This saves one EXPORT_SYMBOL() and the new helper can have more users.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4e74264
    • O
      signals: mv {dis,}allow_signal() from sched.h/exit.c to signal.[ch] · 0341729b
      Oleg Nesterov 提交于
      Move the declaration/definition of allow_signal/disallow_signal to
      signal.h/signal.c.  The new place is more logical and allows to use the
      static helpers in signal.c (see the next changes).
      
      While at it, make them return void and remove the valid_signal() check.
      Nobody checks the returned value, and in-kernel users must not pass the
      wrong signal number.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0341729b
    • O
      signals: kill sigfindinword() · 36fac0a2
      Oleg Nesterov 提交于
      It has no users and it doesn't look useful.  I do not know why/when it was
      introduced, I can't even find any user in the git history.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      36fac0a2
    • M
      ptrace: fix fork event messages across pid namespaces · 4e52365f
      Matthew Dempsky 提交于
      When tracing a process in another pid namespace, it's important for fork
      event messages to contain the child's pid as seen from the tracer's pid
      namespace, not the parent's.  Otherwise, the tracer won't be able to
      correlate the fork event with later SIGTRAP signals it receives from the
      child.
      
      We still risk a race condition if a ptracer from a different pid
      namespace attaches after we compute the pid_t value.  However, sending a
      bogus fork event message in this unlikely scenario is still a vast
      improvement over the status quo where we always send bogus fork event
      messages to debuggers in a different pid namespace than the forking
      process.
      Signed-off-by: NMatthew Dempsky <mdempsky@chromium.org>
      Acked-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Julien Tinnes <jln@chromium.org>
      Cc: Roland McGrath <mcgrathr@chromium.org>
      Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4e52365f
    • M
      drivers/rtc/rtc-cmos.c: drivers/char/rtc.c features for DECstation support · 31632dbd
      Maciej W. Rozycki 提交于
      This brings in drivers/char/rtc.c functionality required for DECstation
      and, should the maintainers decide to switch, Alpha systems to use
      rtc-cmos.
      
      Specifically these features are made available:
      
      * RTC iomem rather than x86/PCI port I/O mapping, controlled with the
        RTC_IOMAPPED macro as with the original driver.  The DS1287A chip in all
        DECstation systems is mapped in the host bus address space as a
        contiguous block of 64 32-bit words of which the least significant byte
        accesses the RTC chip for both reads and writes.  All the address and
        data window register accesses are made transparently by the chipset glue
        logic so that the device appears directly mapped on the host bus.
      
      * A way to set the size of the address space explicitly with the
        newly-added `address_space' member of the platform part of the RTC
        device structure.  This avoids the unreliable heuristics that does not
        work in a setup where the RTC is not explicitly accessed with the usual
        address and data window register pair.
      
      * The ability to use the RTC periodic interrupt as a system clock
        device, which is implemented by arch/mips/kernel/cevt-ds1287.c for
        DECstation systems and takes the RTC interrupt away from the RTC driver.
         Eventually hooking back to the clock device's interrupt handler should
        be possible for the purpose of the alarm clock and possibly also
        update-in-progress interrupt, but this is not done by this change.
      
        o To avoid interfering with the clock interrupt all the places where
          the RTC interrupt mask is fiddled with are only executed if and IRQ
          has been assigned to the RTC driver.
      
        o To avoid changing the clock setup Register A is not fiddled with
          if CMOS_RTC_FLAGS_NOFREQ is set in the newly-added `flags' member of
          the platform part of the RTC device structure.  Originally, in
          drivers/char/rtc.c, this was keyed with the absence of the RTC
          interrupt, just like the interrupt mask, but there only the periodic
          interrupt frequency is set, whereas rtc-cmos also sets the divider
          bits.  Therefore a new flag is introduced so that systems where the
          RTC interrupt is not usable rather than used as a system clock device
          can fully initialise the RTC.
      
      * A small clean-up is made to the IRQ assignment code that makes the IRQ
        number hardcoded to -1 rather than arbitrary -ENXIO (or whatever error
        happens to be returned by platform_get_irq) where no IRQ has been
        assigned to the RTC driver (NO_IRQ might be another candidate, but it
        looks like this macro has inconsistent or missing definitions and
        limited use and might therefore be unsafe).
      
      Verified to work correctly with a DECstation 5000/240 system.
      
      [akpm@linux-foundation.org: fix weird code layout]
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31632dbd
  5. 06 6月, 2014 5 次提交
    • J
      blk-mq: bump max tag depth to 10K tags · a4391c64
      Jens Axboe 提交于
      For some scsi-mq cases, the tag map can be huge. So increase the
      max number of tags we support.
      
      Additionally, don't fail with EINVAL if a user requests too many
      tags. Warn that the tag depth has been adjusted down, and store
      the new value inside the tag_set passed in.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a4391c64
    • J
      block: add blk_rq_set_block_pc() · f27b087b
      Jens Axboe 提交于
      With the optimizations around not clearing the full request at alloc
      time, we are leaving some of the needed init for REQ_TYPE_BLOCK_PC
      up to the user allocating the request.
      
      Add a blk_rq_set_block_pc() that sets the command type to
      REQ_TYPE_BLOCK_PC, and properly initializes the members associated
      with this type of request. Update callers to use this function instead
      of manipulating rq->cmd_type directly.
      
      Includes fixes from Christoph Hellwig <hch@lst.de> for my half-assed
      attempt.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      f27b087b
    • K
      net: phy: fix sparse warning in fixed.c · 46cfd6ea
      Konrad Zapalowicz 提交于
      This commit fixes the following sparse warning:
      
      drivers/net/phy/fixed.c:207
          - warning: symbol 'fixed_phy_del' was not declared.
            Should it be static?
      
      by adding symbol definition to the phy_fixed.h API file. It is ok to do
      because the function in question is an exported symbol.
      Signed-off-by: NKonrad Zapalowicz <bergo.torino@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46cfd6ea
    • V
      cpufreq: add support for intermediate (stable) frequencies · 1c03a2d0
      Viresh Kumar 提交于
      Douglas Anderson, recently pointed out an interesting problem due to which
      udelay() was expiring earlier than it should.
      
      While transitioning between frequencies few platforms may temporarily switch to
      a stable frequency, waiting for the main PLL to stabilize.
      
      For example: When we transition between very low frequencies on exynos, like
      between 200MHz and 300MHz, we may temporarily switch to a PLL running at 800MHz.
      No CPUFREQ notification is sent for that. That means there's a period of time
      when we're running at 800MHz but loops_per_jiffy is calibrated at between 200MHz
      and 300MHz. And so udelay behaves badly.
      
      To get this fixed in a generic way, introduce another set of callbacks
      get_intermediate() and target_intermediate(), only for drivers with
      target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.
      
      get_intermediate() should return a stable intermediate frequency platform wants
      to switch to, and target_intermediate() should set CPU to that frequency,
      before jumping to the frequency corresponding to 'index'. Core will take care of
      sending notifications and driver doesn't have to handle them in
      target_intermediate() or target_index().
      
      NOTE: ->target_index() should restore to policy->restore_freq in case of
      failures as core would send notifications for that.
      Tested-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1c03a2d0
    • J
      block: add notion of a chunk size for request merging · 762380ad
      Jens Axboe 提交于
      Some drivers have different limits on what size a request should
      optimally be, depending on the offset of the request. Similar to
      dividing a device into chunks. Add a setting that allows the driver
      to inform the block layer of such a chunk size. The block layer will
      then prevent merging across the chunks.
      
      This is needed to optimally support NVMe with a non-zero stripe size.
      Signed-off-by: NJens Axboe <axboe@fb.com>
      762380ad
  6. 05 6月, 2014 6 次提交