19 Dec, 2014

1 commit

  • Pull module updates from Rusty Russell:
    "The exciting thing here is the getting rid of stop_machine on module
    removal. This is possible by using a simple atomic_t for the counter,
    rather than our fancy per-cpu counter: it turns out that no one is
    doing a module increment per net packet, so the slowdown should be in
    the noise"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    param: do not set store func without write perm
    params: cleanup sysfs allocation
    kernel:module Fix coding style errors and warnings.
    module: Remove stop_machine from module unloading
    module: Replace module_ref with atomic_t refcnt
    lib/bug: Use RCU list ops for module_bug_list
    module: Unlink module with RCU synchronizing instead of stop_machine
    module: Wait for RCU synchronizing before releasing a module

    Linus Torvalds
     

17 Dec, 2014

1 commit

  • Pull nfsd updates from Bruce Fields:
    "A comparatively quieter cycle for nfsd this time, but still with two
    larger changes:

    - RPC server scalability improvements from Jeff Layton (using RCU
    instead of a spinlock to find idle threads).

    - server-side NFSv4.2 ALLOCATE/DEALLOCATE support from Anna
    Schumaker, enabling fallocate on new clients"

    * 'for-3.19' of git://linux-nfs.org/~bfields/linux: (32 commits)
    nfsd4: fix xdr4 count of server in fs_location4
    nfsd4: fix xdr4 inclusion of escaped char
    sunrpc/cache: convert to use string_escape_str()
    sunrpc: only call test_bit once in svc_xprt_received
    fs: nfsd: Fix signedness bug in compare_blob
    sunrpc: add some tracepoints around enqueue and dequeue of svc_xprt
    sunrpc: convert to lockless lookup of queued server threads
    sunrpc: fix potential races in pool_stats collection
    sunrpc: add a rcu_head to svc_rqst and use kfree_rcu to free it
    sunrpc: require svc_create callers to pass in meaningful shutdown routine
    sunrpc: have svc_wake_up only deal with pool 0
    sunrpc: convert sp_task_pending flag to use atomic bitops
    sunrpc: move rq_cachetype field to better optimize space
    sunrpc: move rq_splice_ok flag into rq_flags
    sunrpc: move rq_dropme flag into rq_flags
    sunrpc: move rq_usedeferral flag to rq_flags
    sunrpc: move rq_local field to rq_flags
    sunrpc: add a generic rq_flags field to svc_rqst and move rq_secure to it
    nfsd: minor off by one checks in __write_versions()
    sunrpc: release svc_pool_map reference when serv allocation fails
    ...

    Linus Torvalds
     

16 Dec, 2014

1 commit

  • Pull drm updates from Dave Airlie:
    "Highlights:

    - AMD KFD driver merge

    This is the AMD HSA interface for exposing a lowlevel interface for
    GPGPU use. They have an open source userspace built on top of this
    interface, and the code looks as good as it was going to get out of
    tree.

    - Initial atomic modesetting work

    The need for an atomic modesetting interface to allow userspace to
    try and send a complete set of modesetting state to the driver has
    arisen, and been suffering from neglect this past year. No more,
    the start of the common code and changes for msm driver to use it
    are in this tree. Ongoing work to get the userspace ioctl finished
    and the code clean will probably wait until next kernel.

    - DisplayID 1.3 and tiled monitor exposed to userspace.

    Tiled monitor property is now exposed for userspace to make use of.

    - Rockchip drm driver merged.

    - imx gpu driver moved out of staging

    Other stuff:

    - core:
    panel - MIPI DSI + new panels.
    expose suggested x/y properties for virtual GPUs

    - i915:
    Initial Skylake (SKL) support
    gen3/4 reset work
    start of dri1/ums removal
    infoframe tracking
    fixes for lots of things.

    - nouveau:
    tegra k1 voltage support
    GM204 modesetting support
    GT21x memory reclocking work

    - radeon:
    CI dpm fixes
    GPUVM improvements
    Initial DPM fan control

    - rcar-du:
    HDMI support added
    removed some support for old boards
    slave encoder driver for Analog Devices adv7511

    - exynos:
    Exynos4415 SoC support

    - msm:
    a4xx gpu support
    atomic helper conversion

    - tegra:
    iommu support
    universal plane support
    ganged-mode DSI support

    - sti:
    HDMI i2c improvements

    - vmwgfx:
    some late fixes.

    - qxl:
    use suggested x/y properties"

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (969 commits)
    drm: sti: fix module compilation issue
    drm/i915: save/restore GMBUS freq across suspend/resume on gen4
    drm: sti: correctly cleanup CRTC and planes
    drm: sti: add HQVDP plane
    drm: sti: add cursor plane
    drm: sti: enable auxiliary CRTC
    drm: sti: fix delay in VTG programming
    drm: sti: prepare sti_tvout to support auxiliary crtc
    drm: sti: use drm_crtc_vblank_{on/off} instead of drm_vblank_{on/off}
    drm: sti: fix hdmi avi infoframe
    drm: sti: remove event lock while disabling vblank
    drm: sti: simplify gdp code
    drm: sti: clear all mixer control
    drm: sti: remove gpio for HDMI hot plug detection
    drm: sti: allow to change hdmi ddc i2c adapter
    drm/doc: Document drm_add_modes_noedid() usage
    drm/i915: Remove '& 0xffff' from the mask given to WA_REG()
    drm/i915: Invert the mask and val arguments in wa_add() and WA_REG()
    drm: Zero out DRM object memory upon cleanup
    drm/i915/bdw: Fix the write setting up the WIZ hashing mode
    ...

    Linus Torvalds
     

13 Dec, 2014

1 commit

  • Pull ext4 updates from Ted Ts'o:
    "Lots of bugs fixes, including Zheng and Jan's extent status shrinker
    fixes, which should improve CPU utilization and potential soft lockups
    under heavy memory pressure, and Eric Whitney's bigalloc fixes"

    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (26 commits)
    ext4: ext4_da_convert_inline_data_to_extent drop locked page after error
    ext4: fix suboptimal seek_{data,hole} extents traversial
    ext4: ext4_inline_data_fiemap should respect callers argument
    ext4: prevent fsreentrance deadlock for inline_data
    ext4: forbid journal_async_commit in data=ordered mode
    jbd2: remove unnecessary NULL check before iput()
    ext4: Remove an unnecessary check for NULL before iput()
    ext4: remove unneeded code in ext4_unlink
    ext4: don't count external journal blocks as overhead
    ext4: remove never taken branch from ext4_ext_shift_path_extents()
    ext4: create nojournal_checksum mount option
    ext4: update comments regarding ext4_delete_inode()
    ext4: cleanup GFP flags inside resize path
    ext4: introduce aging to extent status tree
    ext4: cleanup flag definitions for extent status tree
    ext4: limit number of scanned extents in status tree shrinker
    ext4: move handling of list of shrinkable inodes into extent status code
    ext4: change LRU to round-robin in extent status tree shrinker
    ext4: cache extent hole in extent status tree for ext4_da_map_blocks()
    ext4: fix block reservation for bigalloc filesystems
    ...

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • Pull sound updates from Takashi Iwai:
    "This became a fairly large pull request. In addition to the usual
    driver updates / fixes, there have been a high amount of cleanups in
    ASoC area, as well as control API helpers and kernel documentations
    fixes touching through the whole tree.

    In the driver side, the biggest changes are the support for new Intel
    SoC found on new x86 machines, and the updates of FireWire dice and
    oxfw drivers.

    Some remarkable items are below:

    ALSA core:
    - PCM mmap code cleanup, removal of arch-dependent codes
    - PCM xrun injection support
    - PCM hwptr tracepoint support
    - Refactoring of snd_pcm_action(), simplification of PCM locking
    - Robustified sequecner auto-load functionality
    - New control API helpers and lots of cleanups along with them
    - Lots of kerneldoc fixes and cleanups

    USB-audio:
    - The mixer resume code was largely rewritten, and the devices with
    quirks are resumed properly.
    - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
    Denon/Marantz DACs, Zoom R16/24

    FireWire:
    - DICE driver updates with better duplex and sync support, including
    MIDI support
    - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
    including the previous LaCie Speakers device. Fullduplex and MIDI
    support included as well as DICE driver.

    HD-audio:
    - Refactoring the driver-caps quirk handling in snd-hda-intel
    - More consistent control names representing the topology better
    - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
    fix, ASUS Z99He laptop EAPD

    ASoC:
    - Conversion of AC'97 drivers to use regmap, bringing us closer to
    the removal of the ASoC level I/O code
    - Clean up a lot of old drivers that were open coding things that
    have subsequently been implemented in the core
    - Some DAPM performance improvements
    - Removal of the now seldom used CODEC mutex
    - Lots of updates for the newer Intel SoC support, including support
    for the DSP and some Cherrytrail and Braswell machine drivers
    - Support for Samsung boards using rt5631 as the CODEC
    - Removal of the obsolete AFEB9260 machine driver
    - Driver support for the TI TS3A227E headset driver used in some
    Chrombeooks

    Others:
    - ASIHPI driver update and cleanups
    - Lots of dev_*() printk conversions
    - Lots of trivial cleanups for the codes spotted by Coccinelle"

    * tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits)
    ALSA: pcxhr: NULL dereference on probe failure
    ALSA: lola: NULL dereference on probe failure
    ALSA: hda - Add "eapd" model string for AD1986A codec
    ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
    ALSA: oxfw: Add hwdep interface
    ALSA: oxfw: Add support for capture/playback MIDI messages
    ALSA: oxfw: add support for capturing PCM samples
    ALSA: oxfw: Add support AMDTP in-stream
    ALSA: oxfw: Add support for Behringer/Mackie devices
    ALSA: oxfw: Change the way to start stream
    ALSA: oxfw: Add proc interface for debugging purpose
    ALSA: oxfw: Change the way to make PCM rules/constraints
    ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation
    ALSA: oxfw: Change the way to name card
    ALSA: dice: Add support for MIDI capture/playback
    ALSA: dice: Add support for capturing PCM samples
    ALSA: dice: Support for non SYT-Match sampling clock source mode
    ALSA: dice: Add support for duplex streams with synchronization
    ALSA: dice: Change the way to start stream
    ALSA: jack: Add dummy snd_jack_set_key() definition
    ...

    Linus Torvalds
     

11 Dec, 2014

2 commits

  • Pull tracing updates from Steven Rostedt:
    "There was a lot of clean ups and minor fixes. One of those clean ups
    was to the trace_seq code. It also removed the return values to the
    trace_seq_*() functions and use trace_seq_has_overflowed() to see if
    the buffer filled up or not. This is similar to work being done to
    the seq_file code as well in another tree.

    Some of the other goodies include:

    - Added some "!" (NOT) logic to the tracing filter.

    - Fixed the frame pointer logic to the x86_64 mcount trampolines

    - Added the logic for dynamic trampolines on !CONFIG_PREEMPT systems.
    That is, the ftrace trampoline can be dynamically allocated and be
    called directly by functions that only have a single hook to them"

    * tag 'trace-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (55 commits)
    tracing: Truncated output is better than nothing
    tracing: Add additional marks to signal very large time deltas
    Documentation: describe trace_buf_size parameter more accurately
    tracing: Allow NOT to filter AND and OR clauses
    tracing: Add NOT to filtering logic
    ftrace/fgraph/x86: Have prepare_ftrace_return() take ip as first parameter
    ftrace/x86: Get rid of ftrace_caller_setup
    ftrace/x86: Have save_mcount_regs macro also save stack frames if needed
    ftrace/x86: Add macro MCOUNT_REG_SIZE for amount of stack used to save mcount regs
    ftrace/x86: Simplify save_mcount_regs on getting RIP
    ftrace/x86: Have save_mcount_regs store RIP in %rdi for first parameter
    ftrace/x86: Rename MCOUNT_SAVE_FRAME and add more detailed comments
    ftrace/x86: Move MCOUNT_SAVE_FRAME out of header file
    ftrace/x86: Have static tracing also use ftrace_caller_setup
    ftrace/x86: Have static function tracing always test for function graph
    kprobes: Add IPMODIFY flag to kprobe_ftrace_ops
    ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict
    kprobes/ftrace: Recover original IP if pre_handler doesn't change it
    tracing/trivial: Fix typos and make an int into a bool
    tracing: Deletion of an unnecessary check before iput()
    ...

    Linus Torvalds
     
  • Pull NFS client updates from Trond Myklebust:
    "Highlights include:

    Features:
    - NFSv4.2 client support for hole punching and preallocation.
    - Further RPC/RDMA client improvements.
    - Add more RPC transport debugging tracepoints.
    - Add RPC debugging tools in debugfs.

    Bugfixes:
    - Stable fix for layoutget error handling
    - Fix a change in COMMIT behaviour resulting from the recent io code
    updates"

    * tag 'nfs-for-3.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (28 commits)
    sunrpc: add a debugfs rpc_xprt directory with an info file in it
    sunrpc: add debugfs file for displaying client rpc_task queue
    nfs: Add DEALLOCATE support
    nfs: Add ALLOCATE support
    NFS: Clean up nfs4_init_callback()
    NFS: SETCLIENTID XDR buffer sizes are incorrect
    SUNRPC: serialize iostats updates
    xprtrdma: Display async errors
    xprtrdma: Enable pad optimization
    xprtrdma: Re-write rpcrdma_flush_cqs()
    xprtrdma: Refactor tasklet scheduling
    xprtrdma: unmap all FMRs during transport disconnect
    xprtrdma: Cap req_cqinit
    xprtrdma: Return an errno from rpcrdma_register_external()
    nfs: define nfs_inc_fscache_stats and using it as possible
    nfs: replace nfs_add_stats with nfs_inc_stats when add one
    NFS: Deletion of unnecessary checks before the function call "nfs_put_client"
    sunrpc: eliminate RPC_TRACEPOINTS
    sunrpc: eliminate RPC_DEBUG
    lockd: eliminate LOCKD_DEBUG
    ...

    Linus Torvalds
     

10 Dec, 2014

10 commits

  • Pull scheduler updates from Ingo Molnar:
    "The main changes in this cycle are:

    - 'Nested Sleep Debugging', activated when CONFIG_DEBUG_ATOMIC_SLEEP=y.

    This instruments might_sleep() checks to catch places that nest
    blocking primitives - such as mutex usage in a wait loop. Such
    bugs can result in hard to debug races/hangs.

    Another category of invalid nesting that this facility will detect
    is the calling of blocking functions from within schedule() ->
    sched_submit_work() -> blk_schedule_flush_plug().

    There's some potential for false positives (if secondary blocking
    primitives themselves are not ready yet for this facility), but the
    kernel will warn once about such bugs per bootup, so the warning
    isn't much of a nuisance.

    This feature comes with a number of fixes, for problems uncovered
    with it, so no messages are expected normally.

    - Another round of sched/numa optimizations and refinements, for
    CONFIG_NUMA_BALANCING=y.

    - Another round of sched/dl fixes and refinements.

    Plus various smaller fixes and cleanups"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
    sched: Add missing rcu protection to wake_up_all_idle_cpus
    sched/deadline: Introduce start_hrtick_dl() for !CONFIG_SCHED_HRTICK
    sched/numa: Init numa balancing fields of init_task
    sched/deadline: Remove unnecessary definitions in cpudeadline.h
    sched/cpupri: Remove unnecessary definitions in cpupri.h
    sched/deadline: Fix rq->dl.pushable_tasks bug in push_dl_task()
    sched/fair: Fix stale overloaded status in the busiest group finding logic
    sched: Move p->nr_cpus_allowed check to select_task_rq()
    sched/completion: Document when to use wait_for_completion_io_*()
    sched: Update comments about CLONE_NEWUTS and CLONE_NEWIPC
    sched/fair: Kill task_struct::numa_entry and numa_group::task_list
    sched: Refactor task_struct to use numa_faults instead of numa_* pointers
    sched/deadline: Don't check CONFIG_SMP in switched_from_dl()
    sched/deadline: Reschedule from switched_from_dl() after a successful pull
    sched/deadline: Push task away if the deadline is equal to curr during wakeup
    sched/deadline: Add deadline rq status print
    sched/deadline: Fix artificial overrun introduced by yield_task_dl()
    sched/rt: Clean up check_preempt_equal_prio()
    sched/core: Use dl_bw_of() under rcu_read_lock_sched()
    sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu
    ...

    Linus Torvalds
     
  • Pull RCU updates from Ingo Molnar:
    "These are the main changes in this cycle:

    - Streamline RCU's use of per-CPU variables, shifting from "cpu"
    arguments to functions to "this_"-style per-CPU variable
    accessors.

    - signal-handling RCU updates.

    - real-time updates.

    - torture-test updates.

    - miscellaneous fixes.

    - documentation updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits)
    rcu: Fix FIXME in rcu_tasks_kthread()
    rcu: More info about potential deadlocks with rcu_read_unlock()
    rcu: Optimize cond_resched_rcu_qs()
    rcu: Add sparse check for RCU_INIT_POINTER()
    documentation: memory-barriers.txt: Correct example for reorderings
    documentation: Add atomic_long_t to atomic_ops.txt
    documentation: Additional restriction for control dependencies
    documentation: Document RCU self test boot params
    rcutorture: Fix rcu_torture_cbflood() memory leak
    rcutorture: Remove obsolete kversion param in kvm.sh
    rcutorture: Remove stale test configurations
    rcutorture: Enable RCU self test in configs
    rcutorture: Add early boot self tests
    torture: Run Linux-kernel binary out of results directory
    cpu: Avoid puts_pending overflow
    rcu: Remove "cpu" argument to rcu_cleanup_after_idle()
    rcu: Remove "cpu" argument to rcu_prepare_for_idle()
    rcu: Remove "cpu" argument to rcu_needs_cpu()
    rcu: Remove "cpu" argument to rcu_note_context_switch()
    rcu: Remove "cpu" argument to rcu_preempt_check_callbacks()
    ...

    Linus Torvalds
     
  • These were useful when I was tracking down a race condition between
    svc_xprt_do_enqueue and svc_get_next_xprt.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Testing has shown that the pool->sp_lock can be a bottleneck on a busy
    server. Every time data is received on a socket, the server must take
    that lock in order to dequeue a thread from the sp_threads list.

    Address this problem by eliminating the sp_threads list (which contains
    threads that are currently idle) and replacing it with a RQ_BUSY flag in
    svc_rqst. This allows us to walk the sp_all_threads list under the
    rcu_read_lock and find a suitable thread for the xprt by doing a
    test_and_set_bit.

    Note that we do still have a potential atomicity problem however with
    this approach. We don't want svc_xprt_do_enqueue to set the
    rqst->rq_xprt pointer unless a test_and_set_bit of RQ_BUSY returned
    zero (which indicates that the thread was idle). But, by the time we
    check that, the bit could be flipped by a waking thread.

    To address this, we acquire a new per-rqst spinlock (rq_lock) and take
    that before doing the test_and_set_bit. If that returns false, then we
    can set rq_xprt and drop the spinlock. Then, when the thread wakes up,
    it must set the bit under the same spinlock and can trust that if it was
    already set then the rq_xprt is also properly set.

    With this scheme, the case where we have an idle thread no longer needs
    to take the highly contended pool->sp_lock at all, and that removes the
    bottleneck.

    That still leaves one issue: What of the case where we walk the whole
    sp_all_threads list and don't find an idle thread? Because the search is
    lockess, it's possible for the queueing to race with a thread that is
    going to sleep. To address that, we queue the xprt and then search again.

    If we find an idle thread at that point, we can't attach the xprt to it
    directly since that might race with a different thread waking up and
    finding it. All we can do is wake the idle thread back up and let it
    attempt to find the now-queued xprt.

    Signed-off-by: Jeff Layton
    Tested-by: Chris Worley
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • ...also make the manipulation of sp_all_threads list use RCU-friendly
    functions.

    Signed-off-by: Jeff Layton
    Tested-by: Chris Worley
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • In a later patch, we're going to need some atomic bit flags. Since that
    field will need to be an unsigned long, we mitigate that space
    consumption by migrating some other bitflags to the new field. Start
    with the rq_secure flag.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     

08 Dec, 2014

1 commit


26 Nov, 2014

3 commits

  • In this commit we discard the lru algorithm for inodes with extent
    status tree because it takes significant effort to maintain a lru list
    in extent status tree shrinker and the shrinker can take a long time to
    scan this lru list in order to reclaim some objects.

    We replace the lru ordering with a simple round-robin. After that we
    never need to keep a lru list. That means that the list needn't be
    sorted if the shrinker can not reclaim any objects in the first round.

    Cc: Andreas Dilger
    Signed-off-by: Zheng Liu
    Signed-off-by: Jan Kara
    Signed-off-by: Theodore Ts'o

    Zheng Liu
     
  • Currently extent status tree doesn't cache extent hole when a write
    looks up in extent tree to make sure whether a block has been allocated
    or not. In this case, we don't put extent hole in extent cache because
    later this extent might be removed and a new delayed extent might be
    added back. But it will cause a defect when we do a lot of writes. If
    we don't put extent hole in extent cache, the following writes also need
    to access extent tree to look at whether or not a block has been
    allocated. It brings a cache miss. This commit fixes this defect.
    Also if the inode doesn't have any extent, this extent hole will be
    cached as well.

    Cc: Andreas Dilger
    Signed-off-by: Zheng Liu
    Signed-off-by: Jan Kara
    Signed-off-by: Theodore Ts'o

    Zheng Liu
     
  • For bigalloc filesystems we have to check whether newly requested inode
    block isn't already part of a cluster for which we already have delayed
    allocation reservation. This check happens in ext4_ext_map_blocks() and
    that function sets EXT4_MAP_FROM_CLUSTER if that's the case. However if
    ext4_da_map_blocks() finds in extent cache information about the block,
    we don't call into ext4_ext_map_blocks() and thus we always end up
    getting new reservation even if the space for cluster is already
    reserved. This results in overreservation and premature ENOSPC reports.

    Fix the problem by checking for existing cluster reservation already in
    ext4_da_map_blocks(). That simplifies the logic and actually allows us
    to get rid of the EXT4_MAP_FROM_CLUSTER flag completely.

    Signed-off-by: Jan Kara
    Signed-off-by: Theodore Ts'o

    Jan Kara
     

25 Nov, 2014

4 commits


20 Nov, 2014

3 commits

  • …/linux-rcu into core/rcu

    Pull RCU updates from Paul E. McKenney:

    - Streamline RCU's use of per-CPU variables, shifting from "cpu"
    arguments to functions to "this_"-style per-CPU variable accessors.

    - Signal-handling RCU updates.

    - Real-time updates.

    - Torture-test updates.

    - Miscellaneous fixes.

    - Documentation updates.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • If the trace_seq of ftrace_raw_output_prep() is full this function
    returns TRACE_TYPE_PARTIAL_LINE, otherwise it returns zero.

    The problem is that TRACE_TYPE_PARTIAL_LINE happens to be zero!

    The thing is, the caller of ftrace_raw_output_prep() expects a
    success to be zero. Change that to expect it to be
    TRACE_TYPE_HANDLED.

    Link: http://lkml.kernel.org/r/20141114112522.GA2988@dhcp128.suse.cz

    Reminded-by: Petr Mladek
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Adding a trace_seq_has_overflowed() which returns true if the trace_seq
    had too much written into it allows us to simplify the code.

    Instead of checking the return value of every call to trace_seq_printf()
    and friends, they can all be called normally, and at the end we can
    return !trace_seq_has_overflowed() instead.

    Several functions also return TRACE_TYPE_PARTIAL_LINE when the trace_seq
    overflowed and TRACE_TYPE_HANDLED otherwise. Another helper function
    was created called trace_handle_return() which takes a trace_seq and
    returns these enums. Using this helper function also simplifies the
    code.

    This change also makes it possible to remove the return values of
    trace_seq_printf() and friends. They should instead just be
    void functions.

    Link: http://lkml.kernel.org/r/20141114011410.365183157@goodmis.org

    Reviewed-by: Petr Mladek
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

16 Nov, 2014

1 commit


15 Nov, 2014

1 commit

  • drm/tegra: Changes for v3.19-rc1

    The highlights in this pull request are:

    * IOMMU support: The Tegra DRM driver can now deal with discontiguous
    buffers if an IOMMU exists in the system. That means it can allocate
    using drm_gem_get_pages() and will map them into IOVA space via the
    IOMMU API. Similarly, non-contiguous PRIME buffers can be imported
    from a different driver, which allows better integration with gk20a
    (nouveau) and less hacks.

    * Universal planes: This is precursory work for atomic modesetting and
    will allow hardware cursor support to be implemented on pre-Tegra114
    where RGB cursors were not supported.

    * DSI ganged-mode support: The DSI controller can now gang up with a
    second DSI controller to drive high resolution DSI panels.

    Besides those bigger changes there is a slew of fixes, cleanups, plugged
    memory leaks and so on.

    * tag 'drm/tegra/for-3.19-rc1' of git://people.freedesktop.org/~tagr/linux: (44 commits)
    drm/tegra: gem: Check before freeing CMA memory
    drm/tegra: fb: Add error codes to error messages
    drm/tegra: fb: Properly release GEM objects on failure
    drm/tegra: Detach panel when a connector is removed
    drm/tegra: Plug memory leak
    drm/tegra: gem: Use more consistent data types
    drm/tegra: fb: Do not destroy framebuffer
    drm/tegra: gem: dumb: pitch and size are outputs
    drm/tegra: Enable the hotplug interrupt only when necessary
    drm/tegra: dc: Universal plane support
    drm/tegra: dc: Registers are 32 bits wide
    drm/tegra: dc: Factor out DC, window and cursor commit
    drm/tegra: Add IOMMU support
    drm/tegra: Fix error handling cleanup
    drm/tegra: gem: Use dma_mmap_writecombine()
    drm/tegra: gem: Remove redundant drm_gem_free_mmap_offset()
    drm/tegra: gem: Cleanup tegra_bo_create_with_handle()
    drm/tegra: gem: Extract tegra_bo_alloc_object()
    drm/tegra: dsi: Set up PHY_TIMING & BTA_TIMING registers earlier
    drm/tegra: dsi: Replace 1000000 by USEC_PER_SEC
    ...

    Dave Airlie
     

13 Nov, 2014

1 commit


11 Nov, 2014

1 commit


09 Nov, 2014

1 commit

  • This function has no more non regmap user, which means we can remove the
    implementation of the function and associated functions and structure
    fields.

    For convenience we keep a static inline version of the function that
    forwards calls to regcache_sync() unconditionally.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

30 Oct, 2014

2 commits

  • …/paulmck/linux-rcu into core/urgent

    Pull two RCU fixes from Paul E. McKenney:

    " - Complete the work of commit dd56af42bd82 (rcu: Eliminate deadlock
    between CPU hotplug and expedited grace periods), which was
    intended to allow synchronize_sched_expedited() to be safely
    used when holding locks acquired by CPU-hotplug notifiers.
    This commit makes the put_online_cpus() avoid the deadlock
    instead of just handling the get_online_cpus().

    - Complete the work of commit 35ce7f29a44a (rcu: Create rcuo
    kthreads only for onlined CPUs), which was intended to allow
    RCU to avoid allocating unneeded kthreads on systems where the
    firmware says that there are more CPUs than are really present.
    This commit makes rcu_barrier() aware of the mismatch, so that
    it doesn't hang waiting for non-existent CPUs. "

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • PREEMPT_RCU and TREE_PREEMPT_RCU serve the same function after
    TINY_PREEMPT_RCU has been removed. This patch removes TREE_PREEMPT_RCU
    and uses PREEMPT_RCU config option in its place.

    Signed-off-by: Pranith Kumar
    Signed-off-by: Paul E. McKenney

    Pranith Kumar
     

29 Oct, 2014

1 commit

  • Commit 35ce7f29a44a (rcu: Create rcuo kthreads only for onlined CPUs)
    avoids creating rcuo kthreads for CPUs that never come online. This
    fixes a bug in many instances of firmware: Instead of lying about their
    age, these systems instead lie about the number of CPUs that they have.
    Before commit 35ce7f29a44a, this could result in huge numbers of useless
    rcuo kthreads being created.

    It appears that experience indicates that I should have told the
    people suffering from this problem to fix their broken firmware, but
    I instead produced what turned out to be a partial fix. The missing
    piece supplied by this commit makes sure that rcu_barrier() knows not to
    post callbacks for no-CBs CPUs that have not yet come online, because
    otherwise rcu_barrier() will hang on systems having firmware that lies
    about the number of CPUs.

    It is tempting to simply have rcu_barrier() refuse to post a callback on
    any no-CBs CPU that does not have an rcuo kthread. This unfortunately
    does not work because rcu_barrier() is required to wait for all pending
    callbacks. It is therefore required to wait even for those callbacks
    that cannot possibly be invoked. Even if doing so hangs the system.

    Given that posting a callback to a no-CBs CPU that does not yet have an
    rcuo kthread can hang rcu_barrier(), It is tempting to report an error
    in this case. Unfortunately, this will result in false positives at
    boot time, when it is perfectly legal to post callbacks to the boot CPU
    before the scheduler has started, in other words, before it is legal
    to invoke rcu_barrier().

    So this commit instead has rcu_barrier() avoid posting callbacks to
    CPUs having neither rcuo kthread nor pending callbacks, and has it
    complain bitterly if it finds CPUs having no rcuo kthread but some
    pending callbacks. And when rcu_barrier() does find CPUs having no rcuo
    kthread but pending callbacks, as noted earlier, it has no choice but
    to hang indefinitely.

    Reported-by: Yanko Kaneti
    Reported-by: Jay Vosburgh
    Reported-by: Meelis Roos
    Reported-by: Eric B Munson
    Signed-off-by: Paul E. McKenney
    Tested-by: Eric B Munson
    Tested-by: Jay Vosburgh
    Tested-by: Yanko Kaneti
    Tested-by: Kevin Fenzi
    Tested-by: Meelis Roos

    Paul E. McKenney
     

28 Oct, 2014

1 commit

  • task_preempt_count() has nothing to do with the actual preempt counter,
    thread_info->saved_preempt_count is only valid right after switch_to().

    __trace_sched_switch_state() can use preempt_count(), prev is still the
    current task when trace_sched_switch() is called.

    Signed-off-by: Oleg Nesterov
    [ Added BUG_ON(). ]
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Linus Torvalds
    Cc: Mel Gorman
    Cc: Oleg Nesterov
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20141007195108.GB28002@redhat.com
    Signed-off-by: Ingo Molnar

    Oleg Nesterov
     

25 Oct, 2014

1 commit

  • Pull thermal management updates from Zhang Rui:
    "Sorry that I missed the merge window as there is a bug found in the
    last minute, and I have to fix it and wait for the code to be tested
    in linux-next tree for a few days. Now the buggy patch has been
    dropped entirely from my next branch. Thus I hope those changes can
    still be merged in 3.18-rc2 as most of them are platform thermal
    driver changes.

    Specifics:

    - introduce ACPI INT340X thermal drivers.

    Newer laptops and tablets may have thermal sensors and other
    devices with thermal control capabilities that are exposed for the
    OS to use via the ACPI INT340x device objects. Several drivers are
    introduced to expose the temperature information and cooling
    ability from these objects to user-space via the normal thermal
    framework.

    From: Lu Aaron, Lan Tianyu, Jacob Pan and Zhang Rui.

    - introduce a new thermal governor, which just uses a hysteresis to
    switch abruptly on/off a cooling device. This governor can be used
    to control certain fan devices that can not be throttled but just
    switched on or off. From: Peter Feuerer.

    - introduce support for some new thermal interrupt functions on
    i.MX6SX, in IMX thermal driver. From: Anson, Huang.

    - introduce tracing support on thermal framework. From: Punit
    Agrawal.

    - small fixes in OF thermal and thermal step_wise governor"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits)
    Thermal: int340x thermal: select ACPI fan driver
    Thermal: int3400_thermal: use acpi_thermal_rel parsing APIs
    Thermal: int340x_thermal: expose acpi thermal relationship tables
    Thermal: introduce int3403 thermal driver
    Thermal: introduce INT3402 thermal driver
    Thermal: move the KELVIN_TO_MILLICELSIUS macro to thermal.h
    ACPI / Fan: support INT3404 thermal device
    ACPI / Fan: add ACPI 4.0 style fan support
    ACPI / fan: convert to platform driver
    ACPI / fan: use acpi_device_xxx_power instead of acpi_bus equivelant
    ACPI / fan: remove no need check for device pointer
    ACPI / fan: remove unused macro
    Thermal: int3400 thermal: register to thermal framework
    Thermal: int3400 thermal: add capability to detect supporting UUIDs
    Thermal: introduce int3400 thermal driver
    ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package()
    ACPI: make acpi_create_platform_device() an external API
    thermal: step_wise: fix: Prevent from binary overflow when trend is dropping
    ACPI: introduce ACPI int340x thermal scan handler
    thermal: Added Bang-bang thermal governor
    ...

    Linus Torvalds
     

21 Oct, 2014

1 commit

  • Pull ext4 updates from Ted Ts'o:
    "A large number of cleanups and bug fixes, with some (minor) journal
    optimizations"

    [ This got sent to me before -rc1, but was stuck in my spam folder. - Linus ]

    * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (67 commits)
    ext4: check s_chksum_driver when looking for bg csum presence
    ext4: move error report out of atomic context in ext4_init_block_bitmap()
    ext4: Replace open coded mdata csum feature to helper function
    ext4: delete useless comments about ext4_move_extents
    ext4: fix reservation overflow in ext4_da_write_begin
    ext4: add ext4_iget_normal() which is to be used for dir tree lookups
    ext4: don't orphan or truncate the boot loader inode
    ext4: grab missed write_count for EXT4_IOC_SWAP_BOOT
    ext4: optimize block allocation on grow indepth
    ext4: get rid of code duplication
    ext4: fix over-defensive complaint after journal abort
    ext4: fix return value of ext4_do_update_inode
    ext4: fix mmap data corruption when blocksize < pagesize
    vfs: fix data corruption when blocksize < pagesize for mmaped data
    ext4: fold ext4_nojournal_sops into ext4_sops
    ext4: support freezing ext2 (nojournal) file systems
    ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs()
    ext4: don't check quota format when there are no quota files
    jbd2: simplify calling convention around __jbd2_journal_clean_checkpoint_list
    jbd2: avoid pointless scanning of checkpoint lists
    ...

    Linus Torvalds
     

13 Oct, 2014

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main changes in this cycle were:

    - changes related to No-CBs CPUs and NO_HZ_FULL

    - RCU-tasks implementation

    - torture-test updates

    - miscellaneous fixes

    - locktorture updates

    - RCU documentation updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (81 commits)
    workqueue: Use cond_resched_rcu_qs macro
    workqueue: Add quiescent state between work items
    locktorture: Cleanup header usage
    locktorture: Cannot hold read and write lock
    locktorture: Fix __acquire annotation for spinlock irq
    locktorture: Support rwlocks
    rcu: Eliminate deadlock between CPU hotplug and expedited grace periods
    locktorture: Document boot/module parameters
    rcutorture: Rename rcutorture_runnable parameter
    locktorture: Add test scenario for rwsem_lock
    locktorture: Add test scenario for mutex_lock
    locktorture: Make torture scripting account for new _runnable name
    locktorture: Introduce torture context
    locktorture: Support rwsems
    locktorture: Add infrastructure for torturing read locks
    torture: Address race in module cleanup
    locktorture: Make statistics generic
    locktorture: Teach about lock debugging
    locktorture: Support mutexes
    locktorture: Add documentation
    ...

    Linus Torvalds