12 Nov, 2015

1 commit

  • Pull thermal updates from Zhang Rui:

    - Implement generic devfreq cooling mechanism through frequency
    reduction for devices using devfreq. From Ørjan Eide and Javi
    Merino.

    - Introduce OMAP3 support on TI SoC thermal driver. From Pavel Mack
    and Eduardo Valentin.

    - A bounch of small fixes on devfreq_cooling, Exynos, IMX, Armada, and
    Rockchip thermal drivers.

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (24 commits)
    thermal: exynos: Directly return 0 instead of using local ret variable
    thermal: exynos: Remove unneeded semicolon
    thermal: exynos: Use IS_ERR() because regulator cannot be NULL
    thermal: exynos: Fix first temperature read after registering sensor
    thermal: exynos: Fix unbalanced regulator disable on probe failure
    devfreq_cooling: return on allocation failure
    thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
    dt-bindings: rockchip-thermal: Add the pinctrl states in this document
    thermal: devfreq_cooling: Make power a u64
    thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister
    thermal: underflow bug in imx_set_trip_temp()
    thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula
    thermal: imx: register irq handler later in probe
    thermal: rockhip: fix setting thermal shutdown polarity
    thermal: rockchip: fix handling of invalid readings
    devfreq_cooling: add trace information
    thermal: Add devfreq cooling
    PM / OPP: get the voltage for all OPPs
    tools/thermal: tmon: use pkg-config also for CFLAGS
    linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS
    ...

    Linus Torvalds
     

08 Nov, 2015

1 commit

  • Merge second patch-bomb from Andrew Morton:

    - most of the rest of MM

    - procfs

    - lib/ updates

    - printk updates

    - bitops infrastructure tweaks

    - checkpatch updates

    - nilfs2 update

    - signals

    - various other misc bits: coredump, seqfile, kexec, pidns, zlib, ipc,
    dma-debug, dma-mapping, ...

    * emailed patches from Andrew Morton : (102 commits)
    ipc,msg: drop dst nil validation in copy_msg
    include/linux/zutil.h: fix usage example of zlib_adler32()
    panic: release stale console lock to always get the logbuf printed out
    dma-debug: check nents in dma_sync_sg*
    dma-mapping: tidy up dma_parms default handling
    pidns: fix set/getpriority and ioprio_set/get in PRIO_USER mode
    kexec: use file name as the output message prefix
    fs, seqfile: always allow oom killer
    seq_file: reuse string_escape_str()
    fs/seq_file: use seq_* helpers in seq_hex_dump()
    coredump: change zap_threads() and zap_process() to use for_each_thread()
    coredump: ensure all coredumping tasks have SIGNAL_GROUP_COREDUMP
    signal: remove jffs2_garbage_collect_thread()->allow_signal(SIGCONT)
    signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()
    signal: turn dequeue_signal_lock() into kernel_dequeue_signal()
    signals: kill block_all_signals() and unblock_all_signals()
    nilfs2: fix gcc uninitialized-variable warnings in powerpc build
    nilfs2: fix gcc unused-but-set-variable warnings
    MAINTAINERS: nilfs2: add header file for tracing
    nilfs2: add tracepoints for analyzing reading and writing metadata files
    ...

    Linus Torvalds
     

07 Nov, 2015

7 commits

  • This patch adds tracepoints for analyzing requests of reading and writing
    metadata files. The tracepoints cover every in-place mdt files (cpfile,
    sufile, and datfile).

    Example of tracing mdt_insert_new_block():
    cp-14635 [000] ...1 30598.199309: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 155
    cp-14635 [000] ...1 30598.199520: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 5
    cp-14635 [000] ...1 30598.200828: nilfs2_mdt_insert_new_block: inode = ffff88022a8d0178 ino = 3 block = 253

    Signed-off-by: Hitoshi Mitake
    Signed-off-by: Ryusuke Konishi
    Cc: Steven Rostedt
    Cc: TK Kato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hitoshi Mitake
     
  • This patch adds tracepoints which would be useful for analyzing segment
    usage from a perspective of high level sufile manipulation (check, alloc,
    free). sufile is an important in-place updated metadata file, so
    analyzing the behavior would be useful for performance turning.

    example of usage (a case of allocation):

    $ sudo bin/tpoint nilfs2:nilfs2_segment_usage_allocated
    Tracing nilfs2:nilfs2_segment_usage_allocated. Ctrl-C to end.
    segctord-17800 [002] ...1 10671.867294: nilfs2_segment_usage_allocated: sufile = ffff880054f908a8 segnum = 2
    segctord-17800 [002] ...1 10675.073477: nilfs2_segment_usage_allocated: sufile = ffff880054f908a8 segnum = 3

    Signed-off-by: Hitoshi Mitake
    Signed-off-by: Ryusuke Konishi
    Cc: Steven Rostedt
    Cc: Benixon Dhas
    Cc: TK Kato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hitoshi Mitake
     
  • This patch adds a tracepoint for transaction events of nilfs. With the
    tracepoint, these events can be tracked: begin, abort, commit, trylock,
    lock, and unlock. Basically, these events have corresponding functions
    e.g. begin event corresponds nilfs_transaction_begin(). The unlock event
    is an exception. It corresponds to the iteration in
    nilfs_transaction_lock().

    Only one tracepoint is introcued: nilfs2_transaction_transition. The
    above events are distinguished with newly introduced enum. With this
    tracepoint, we can analyse a critical section of segment constructoin.

    Sample output by tpoint of perf-tools:
    cp-4457 [000] ...1 63.266220: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 1 flags = 9 state = BEGIN
    cp-4457 [000] ...1 63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT
    cp-4457 [000] ...1 63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT
    segctord-4371 [001] ...1 68.261196: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK
    segctord-4371 [001] ...1 68.261280: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = LOCK
    segctord-4371 [001] ...1 68.261877: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 1 flags = 10 state = BEGIN
    segctord-4371 [001] ...1 68.262116: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = COMMIT
    segctord-4371 [001] ...1 68.265032: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = UNLOCK
    segctord-4371 [001] ...1 132.376847: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK

    This patch also does trivial cleaning of comma usage in collection stage
    transition event for consistent coding style.

    Signed-off-by: Hitoshi Mitake
    Signed-off-by: Ryusuke Konishi
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hitoshi Mitake
     
  • This patch adds a tracepoint for tracking stage transition of block
    collection in segment construction. With the tracepoint, we can analysis
    the behavior of segment construction in depth. It would be useful for
    bottleneck detection and debugging, etc.

    The tracepoint is created with the standard trace API of linux (like ext3,
    ext4, f2fs and btrfs). So we can analysis with existing tools easily. Of
    course, more detailed analysis will be possible if we can create nilfs
    specific analysis tools.

    Below is an example of event dump with Brendan Gregg's perf-tools
    (https://github.com/brendangregg/perf-tools). Time consumption between
    each stage can be obtained.

    $ sudo bin/tpoint nilfs2:nilfs2_collection_stage_transition
    Tracing nilfs2:nilfs2_collection_stage_transition. Ctrl-C to end.
    segctord-14875 [003] ...1 28311.067794: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_INIT
    segctord-14875 [003] ...1 28311.068139: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_GC
    segctord-14875 [003] ...1 28311.068139: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_FILE
    segctord-14875 [003] ...1 28311.068486: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_IFILE
    segctord-14875 [003] ...1 28311.068540: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_CPFILE
    segctord-14875 [003] ...1 28311.068561: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_SUFILE
    segctord-14875 [003] ...1 28311.068565: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_DAT
    segctord-14875 [003] ...1 28311.068573: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_SR
    segctord-14875 [003] ...1 28311.068574: nilfs2_collection_stage_transition: sci = ffff8800ce6de000 stage = ST_DONE

    For capturing transition correctly, this patch adds wrappers for the
    member scnt of nilfs_cstage. With this change, every transition of the
    stage can produce trace event in a correct manner.

    Signed-off-by: Hitoshi Mitake
    Signed-off-by: Ryusuke Konishi
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hitoshi Mitake
     
  • …d avoiding waking kswapd

    __GFP_WAIT has been used to identify atomic context in callers that hold
    spinlocks or are in interrupts. They are expected to be high priority and
    have access one of two watermarks lower than "min" which can be referred
    to as the "atomic reserve". __GFP_HIGH users get access to the first
    lower watermark and can be called the "high priority reserve".

    Over time, callers had a requirement to not block when fallback options
    were available. Some have abused __GFP_WAIT leading to a situation where
    an optimisitic allocation with a fallback option can access atomic
    reserves.

    This patch uses __GFP_ATOMIC to identify callers that are truely atomic,
    cannot sleep and have no alternative. High priority users continue to use
    __GFP_HIGH. __GFP_DIRECT_RECLAIM identifies callers that can sleep and
    are willing to enter direct reclaim. __GFP_KSWAPD_RECLAIM to identify
    callers that want to wake kswapd for background reclaim. __GFP_WAIT is
    redefined as a caller that is willing to enter direct reclaim and wake
    kswapd for background reclaim.

    This patch then converts a number of sites

    o __GFP_ATOMIC is used by callers that are high priority and have memory
    pools for those requests. GFP_ATOMIC uses this flag.

    o Callers that have a limited mempool to guarantee forward progress clear
    __GFP_DIRECT_RECLAIM but keep __GFP_KSWAPD_RECLAIM. bio allocations fall
    into this category where kswapd will still be woken but atomic reserves
    are not used as there is a one-entry mempool to guarantee progress.

    o Callers that are checking if they are non-blocking should use the
    helper gfpflags_allow_blocking() where possible. This is because
    checking for __GFP_WAIT as was done historically now can trigger false
    positives. Some exceptions like dm-crypt.c exist where the code intent
    is clearer if __GFP_DIRECT_RECLAIM is used instead of the helper due to
    flag manipulations.

    o Callers that built their own GFP flags instead of starting with GFP_KERNEL
    and friends now also need to specify __GFP_KSWAPD_RECLAIM.

    The first key hazard to watch out for is callers that removed __GFP_WAIT
    and was depending on access to atomic reserves for inconspicuous reasons.
    In some cases it may be appropriate for them to use __GFP_HIGH.

    The second key hazard is callers that assembled their own combination of
    GFP flags instead of starting with something like GFP_KERNEL. They may
    now wish to specify __GFP_KSWAPD_RECLAIM. It's almost certainly harmless
    if it's missed in most cases as other activity will wake kswapd.

    Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Vitaly Wool <vitalywool@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Mel Gorman
     
  • Pull btrfs updates from Chris Mason:
    "We have a lot of subvolume quota improvements in here, along with big
    piles of cleanups from Dave Sterba and Anand Jain and others.

    Josef pitched in a batch of allocator fixes based on production use
    here at FB. We found that mount -o ssd_spread greatly improved our
    performance on hardware raid5/6, but it exposed some CPU bottlenecks
    in the allocator. These patches make a huge difference"

    * 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (100 commits)
    Btrfs: fix hole punching when using the no-holes feature
    Btrfs: find_free_extent: Do not erroneously skip LOOP_CACHING_WAIT state
    btrfs: Fix a data space underflow warning
    btrfs: qgroup: Fix a rebase bug which will cause qgroup double free
    btrfs: qgroup: Fix a race in delayed_ref which leads to abort trans
    btrfs: clear PF_NOFREEZE in cleaner_kthread()
    btrfs: qgroup: Don't copy extent buffer to do qgroup rescan
    btrfs: add balance filters limits, stripes and usage to supported mask
    btrfs: extend balance filter usage to take minimum and maximum
    btrfs: add balance filter for stripes
    btrfs: extend balance filter limit to take minimum and maximum
    btrfs: fix use after free iterating extrefs
    btrfs: check unsupported filters in balance arguments
    Btrfs: fix regression running delayed references when using qgroups
    Btrfs: fix regression when running delayed references
    Btrfs: don't do extra bitmap search in one bit case
    Btrfs: keep track of largest extent in bitmaps
    Btrfs: don't keep trying to build clusters if we are fragmented
    Btrfs: cut down on loops through the allocator
    Btrfs: don't continue setting up space cache when enospc
    ...

    Linus Torvalds
     
  • Pull tracking updates from Steven Rostedt:
    "Most of the changes are clean ups and small fixes. Some of them have
    stable tags to them. I searched through my INBOX just as the merge
    window opened and found lots of patches to pull. I ran them through
    all my tests and they were in linux-next for a few days.

    Features added this release:
    ----------------------------

    - Module globbing. You can now filter function tracing to several
    modules. # echo '*:mod:*snd*' > set_ftrace_filter (Dmitry Safonov)

    - Tracer specific options are now visible even when the tracer is not
    active. It was rather annoying that you can only see and modify
    tracer options after enabling the tracer. Now they are in the
    options/ directory even when the tracer is not active. Although
    they are still only visible when the tracer is active in the
    trace_options file.

    - Trace options are now per instance (although some of the tracer
    specific options are global)

    - New tracefs file: set_event_pid. If any pid is added to this file,
    then all events in the instance will filter out events that are not
    part of this pid. sched_switch and sched_wakeup events handle next
    and the wakee pids"

    * tag 'trace-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (68 commits)
    tracefs: Fix refcount imbalance in start_creating()
    tracing: Put back comma for empty fields in boot string parsing
    tracing: Apply tracer specific options from kernel command line.
    tracing: Add some documentation about set_event_pid
    ring_buffer: Remove unneeded smp_wmb() before wakeup of reader benchmark
    tracing: Allow dumping traces without tracking trace started cpus
    ring_buffer: Fix more races when terminating the producer in the benchmark
    ring_buffer: Do no not complete benchmark reader too early
    tracing: Remove redundant TP_ARGS redefining
    tracing: Rename max_stack_lock to stack_trace_max_lock
    tracing: Allow arch-specific stack tracer
    recordmcount: arm64: Replace the ignored mcount call into nop
    recordmcount: Fix endianness handling bug for nop_mcount
    tracepoints: Fix documentation of RCU lockdep checks
    tracing: ftrace_event_is_function() can return boolean
    tracing: is_legal_op() can return boolean
    ring-buffer: rb_event_is_commit() can return boolean
    ring-buffer: rb_per_cpu_empty() can return boolean
    ring_buffer: ring_buffer_empty{cpu}() can return boolean
    ring-buffer: rb_is_reader_page() can return boolean
    ...

    Linus Torvalds
     

06 Nov, 2015

7 commits

  • Merge patch-bomb from Andrew Morton:

    - inotify tweaks

    - some ocfs2 updates (many more are awaiting review)

    - various misc bits

    - kernel/watchdog.c updates

    - Some of mm. I have a huge number of MM patches this time and quite a
    lot of it is quite difficult and much will be held over to next time.

    * emailed patches from Andrew Morton : (162 commits)
    selftests: vm: add tests for lock on fault
    mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage
    mm: introduce VM_LOCKONFAULT
    mm: mlock: add new mlock system call
    mm: mlock: refactor mlock, munlock, and munlockall code
    kasan: always taint kernel on report
    mm, slub, kasan: enable user tracking by default with KASAN=y
    kasan: use IS_ALIGNED in memory_is_poisoned_8()
    kasan: Fix a type conversion error
    lib: test_kasan: add some testcases
    kasan: update reference to kasan prototype repo
    kasan: move KASAN_SANITIZE in arch/x86/boot/Makefile
    kasan: various fixes in documentation
    kasan: update log messages
    kasan: accurately determine the type of the bad access
    kasan: update reported bug types for kernel memory accesses
    kasan: update reported bug types for not user nor kernel memory accesses
    mm/kasan: prevent deadlock in kasan reporting
    mm/kasan: don't use kasan shadow pointer in generic functions
    mm/kasan: MODULE_VADDR is not available on all archs
    ...

    Linus Torvalds
     
  • Compaction returns prematurely with COMPACT_PARTIAL when contended or has
    fatal signal pending. This is ok for the callers, but might be misleading
    in the traces, as the usual reason to return COMPACT_PARTIAL is that we
    think the allocation should succeed. After this patch we distinguish the
    premature ending condition in the mm_compaction_finished and
    mm_compaction_end tracepoints.

    The contended status covers the following reasons:
    - lock contention or need_resched() detected in async compaction
    - fatal signal pending
    - too many pages isolated in the zone (only for async compaction)
    Further distinguishing the exact reason seems unnecessary for now.

    Signed-off-by: Vlastimil Babka
    Cc: Joonsoo Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Steven Rostedt
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     
  • Some compaction tracepoints use zone->name to print which zone is being
    compacted. This works for in-kernel printing, but not userspace trace
    printing of raw captured trace such as via trace-cmd report.

    This patch uses zone_idx() instead of zone->name as the raw value, and
    when printing, converts the zone_type to string using the appropriate EM()
    macros and some ugly tricks to overcome the problem that half the values
    depend on CONFIG_ options and one does not simply use #ifdef inside of
    #define.

    trace-cmd output before:
    transhuge-stres-4235 [000] 453.149280: mm_compaction_finished: node=0
    zone=ffffffff81815d7a order=9 ret=partial

    after:
    transhuge-stres-4235 [000] 453.149280: mm_compaction_finished: node=0
    zone=Normal order=9 ret=partial

    Signed-off-by: Vlastimil Babka
    Reviewed-by: Steven Rostedt
    Cc: Joonsoo Kim
    Cc: Ingo Molnar
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Valentin Rothberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     
  • Some compaction tracepoints convert the integer return values to strings
    using the compaction_status_string array. This works for in-kernel
    printing, but not userspace trace printing of raw captured trace such as
    via trace-cmd report.

    This patch converts the private array to appropriate tracepoint macros
    that result in proper userspace support.

    trace-cmd output before:
    transhuge-stres-4235 [000] 453.149280: mm_compaction_finished: node=0
    zone=ffffffff81815d7a order=9 ret=

    after:
    transhuge-stres-4235 [000] 453.149280: mm_compaction_finished: node=0
    zone=ffffffff81815d7a order=9 ret=partial

    Signed-off-by: Vlastimil Babka
    Reviewed-by: Steven Rostedt
    Cc: Joonsoo Kim
    Cc: Ingo Molnar
    Cc: Mel Gorman
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vlastimil Babka
     
  • Pull media updates from Mauro Carvalho Chehab:
    "Media updates, including:

    - Lots of improvements at the kABI documentation
    - Split of Videobuf2 into a common part and a V4L2 specific one
    - Split of the VB2 tracing events into a separate header file
    - s5p-mfc got support for Exynos 5433
    - v4l2 fixes for 64-bits alignment when running 32 bits userspace
    on ARM
    - Added support for SDR radio transmitter at core, vivid and hackrf
    drivers
    - Some y2038 fixups
    - Some improvements at V4L2 colorspace support
    - saa7164 converted to use the V4L2 core control framework
    - several new boards additions, cleanups and fixups

    PS: There are two patches for scripts/kernel-doc that are needed by
    the documentation patches on Media. Jon is OK on merging those via
    my tree"

    * tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (146 commits)
    [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK
    [media] DocBook media: update copyright/version numbers
    [media] ivtv: Convert to get_user_pages_unlocked()
    [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL
    [media] DocBook media: Fix a typo in encoder cmd
    [media] DocBook: add SDR specific info to G_MODULATOR / S_MODULATOR
    [media] DocBook: add SDR specific info to G_TUNER / S_TUNER
    [media] hackrf: do not set human readable name for formats
    [media] hackrf: add support for transmitter
    [media] hackrf: switch to single function which configures everything
    [media] hackrf: add control for RF amplifier
    [media] DocBook: add modulator type field
    [media] v4l: add type field to v4l2_modulator struct
    [media] DocBook: document SDR transmitter
    [media] v4l2: add support for SDR transmitter
    [media] DocBook: document tuner RF gain control
    [media] v4l2: add RF gain control
    [media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR
    [media] media/vivid-osd: fix info leak in ioctl
    [media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2
    ...

    Linus Torvalds
     
  • Pull f2fs updates from Jaegeuk Kim:
    "Most part of the patches include enhancing the stability and
    performance of in-memory extent caches feature.

    In addition, it introduces several new features and configurable
    points:
    - F2FS_GOING_DOWN_METAFLUSH ioctl to test power failures
    - F2FS_IOC_WRITE_CHECKPOINT ioctl to trigger checkpoint by users
    - background_gc=sync mount option to do gc synchronously
    - periodic checkpoints
    - sysfs entry to control readahead blocks for free nids

    And the following bug fixes have been merged.
    - fix SSA corruption by collapse/insert_range
    - correct a couple of gc behaviors
    - fix the results of f2fs_map_blocks
    - fix error case handling of volatile/atomic writes"

    * tag 'for-f2fs-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (54 commits)
    f2fs: fix to skip shrinking extent nodes
    f2fs: fix error path of ->symlink
    f2fs: fix to clear GCed flag for atomic written page
    f2fs: don't need to submit bio on error case
    f2fs: fix leakage of inmemory atomic pages
    f2fs: refactor __find_rev_next_{zero}_bit
    f2fs: support fiemap for inline_data
    f2fs: flush dirty data for bmap
    f2fs: relocate the tracepoint for background_gc
    f2fs crypto: fix racing of accessing encrypted page among
    f2fs: export ra_nid_pages to sysfs
    f2fs: readahead for free nids building
    f2fs: support lower priority asynchronous readahead in ra_meta_pages
    f2fs: don't tag REQ_META for temporary non-meta pages
    f2fs: add a tracepoint for f2fs_read_data_pages
    f2fs: set GFP_NOFS for grab_cache_page
    f2fs: fix SSA updates resulting in corruption
    Revert "f2fs: do not skip dentry block writes"
    f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure
    f2fs: merge meta writes as many possible
    ...

    Linus Torvalds
     
  • Pull file locking updates from Jeff Layton:
    "The largest series of changes is from Ben who offered up a set to add
    a new helper function for setting locks based on the type set in
    fl_flags. Dmitry also send in a fix for a potential race that he
    found with KTSAN"

    * tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux:
    locks: cleanup posix_lock_inode_wait and flock_lock_inode_wait
    Move locks API users to locks_lock_inode_wait()
    locks: introduce locks_lock_inode_wait()
    locks: Use more file_inode and fix a comment
    fs: fix data races on inode->i_flctx
    locks: change tracepoint for generic_add_lease

    Linus Torvalds
     

31 Oct, 2015

1 commit

  • Tracing is useful for debugging and performance tuning. Add similar
    traces to what's present in the cpu cooling device.

    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Cc: Steven Rostedt
    Cc: Ingo Molnar
    Signed-off-by: Javi Merino
    Signed-off-by: Eduardo Valentin

    Javi Merino
     

22 Oct, 2015

1 commit


21 Oct, 2015

5 commits

  • Add a new options to trace Kconfig, CONFIG_TRACING_EVENTS_GPIO, that is
    used for enabling/disabling compilation of gpio function trace events.

    Link: http://lkml.kernel.org/r/1438432079-11704-4-git-send-email-tal.shorer@gmail.com

    Acked-by: Linus Walleij
    Signed-off-by: Tal Shorer
    Signed-off-by: Steven Rostedt

    Tal Shorer
     
  • Allow a trace events header file to disable compilation of its
    trace events by defining the preprocessor macro NOTRACE.

    This could be done, for example, according to a Kconfig option.

    Link: http://lkml.kernel.org/r/1438432079-11704-3-git-send-email-tal.shorer@gmail.com

    Signed-off-by: Tal Shorer
    Signed-off-by: Steven Rostedt

    Tal Shorer
     
  • New IOCTL ops:
    vidioc_enum_fmt_sdr_out
    vidioc_g_fmt_sdr_out
    vidioc_s_fmt_sdr_out
    vidioc_try_fmt_sdr_out

    New vb2 buffertype:
    V4L2_BUF_TYPE_SDR_OUTPUT

    New v4l2 capability:
    V4L2_CAP_SDR_OUTPUT

    Signed-off-by: Antti Palosaari
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Prepare to divide videobuf2
    - Separate vb2 trace events from v4l2 trace event.
    - Make wrapper functions that will move to v4l2-side.
    - Make vb2_core_* functions that will remain in core-side.
    - Add a callback function table for buffer operation which makes vb2-core
    to be able to invoke a v4l2-side functions.
    - Rename internal functions as vb2_*.

    Signed-off-by: Junghak Sung
    Signed-off-by: Geunyoung Kim
    Acked-by: Seung-Woo Kim
    Acked-by: Inki Dae
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Junghak Sung
     
  • Simple changes that replace v4l2-specific data with vb2 data
    in videobuf2-core.

    enum v4l2_buf_type --> int
    enum v4l2_memory --> enum vb2_memory
    VIDEO_MAX_FRAME --> VB2_MAX_FRAME
    VIDEO_MAX_PLANES --> VB2_MAX_PLANES
    struct v4l2_fh *owner --> void *owner
    V4L2_TYPE_IS_MULTIPLANAR() --> is_multiplanar
    V4L2_TYPE_IS_OUTPUT() --> is_output

    Signed-off-by: Junghak Sung
    Signed-off-by: Geunyoung Kim
    Acked-by: Seung-Woo Kim
    Acked-by: Inki Dae
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Junghak Sung
     

13 Oct, 2015

1 commit


10 Oct, 2015

2 commits


06 Oct, 2015

1 commit

  • __trace_sched_switch_state() is the last remaining PREEMPT_ACTIVE
    user, move trace_sched_switch() from prepare_task_switch() to
    __schedule() and propagate the @preempt argument.

    Signed-off-by: Peter Zijlstra (Intel)
    Reviewed-by: Thomas Gleixner
    Reviewed-by: Steven Rostedt
    Cc: Linus Torvalds
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

01 Oct, 2015

1 commit

  • Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.

    Add new member variables - bytesused, length, offset, userptr, fd,
    data_offset - to struct vb2_plane in order to cover all information
    of v4l2_plane.
    struct vb2_plane {

    unsigned int bytesused;
    unsigned int length;
    union {
    unsigned int offset;
    unsigned long userptr;
    int fd;
    } m;
    unsigned int data_offset;
    }

    Replace v4l2_buf with new member variables - index, type, memory - which
    are common fields for buffer management.
    struct vb2_buffer {

    unsigned int index;
    unsigned int type;
    unsigned int memory;
    unsigned int num_planes;
    struct vb2_plane planes[VIDEO_MAX_PLANES];

    };

    v4l2 specific fields - flags, field, timestamp, timecode,
    sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
    struct vb2_v4l2_buffer {
    struct vb2_buffer vb2_buf;

    __u32 flags;
    __u32 field;
    struct timeval timestamp;
    struct v4l2_timecode timecode;
    __u32 sequence;
    };

    Signed-off-by: Junghak Sung
    Signed-off-by: Geunyoung Kim
    Acked-by: Seung-Woo Kim
    Acked-by: Inki Dae
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Junghak Sung
     

23 Sep, 2015

1 commit


21 Sep, 2015

1 commit


12 Sep, 2015

1 commit

  • Pull thermal updates from Zhang Rui:

    - use int instead of unsigned long to represent temperature to avoid
    bogus overheat detection when negative temperature reported. From
    Sascha Hauer.

    - export available thermal governors information to user space via
    sysfs. From Wei Ni.

    - introduce new thermal driver for Wildcat Point platform controller
    hub, which uses PCH thermal sensor and associated critical and hot
    trip points. From Tushar Dave.

    - add suuport for Intel Skylake and Denlow platforms in powerclamp
    driver.

    - some small cleanups in thermal core.

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    thermal: Add Intel PCH thermal driver
    thermal: Add comment explaining test for critical temperature
    thermal: Use IS_ENABLED instead of #ifdef
    thermal: remove unnecessary call to thermal_zone_device_set_polling
    thermal: trivial: fix typo in comment
    thermal: consistently use int for temperatures
    thermal: add available policies sysfs attribute
    thermal/powerclamp: add cpu id for denlow platform
    thermal/powerclamp: add cpu id for Skylake u/y
    thermal/powerclamp: add cpu id for skylake h/s

    Linus Torvalds
     

11 Sep, 2015

2 commits

  • Pull blk-cg updates from Jens Axboe:
    "A bit later in the cycle, but this has been in the block tree for a a
    while. This is basically four patchsets from Tejun, that improve our
    buffered cgroup writeback. It was dependent on the other cgroup
    changes, but they went in earlier in this cycle.

    Series 1 is set of 5 patches that has cgroup writeback updates:

    - bdi_writeback iteration fix which could lead to some wb's being
    skipped or repeated during e.g. sync under memory pressure.

    - Simplification of wb work wait mechanism.

    - Writeback tracepoints updated to report cgroup.

    Series 2 is is a set of updates for the CFQ cgroup writeback handling:

    cfq has always charged all async IOs to the root cgroup. It didn't
    have much choice as writeback didn't know about cgroups and there
    was no way to tell who to blame for a given writeback IO.
    writeback finally grew support for cgroups and now tags each
    writeback IO with the appropriate cgroup to charge it against.

    This patchset updates cfq so that it follows the blkcg each bio is
    tagged with. Async cfq_queues are now shared across cfq_group,
    which is per-cgroup, instead of per-request_queue cfq_data. This
    makes all IOs follow the weight based IO resource distribution
    implemented by cfq.

    - Switched from GFP_ATOMIC to GFP_NOWAIT as suggested by Jeff.

    - Other misc review points addressed, acks added and rebased.

    Series 3 is the blkcg policy cleanup patches:

    This patchset contains assorted cleanups for blkcg_policy methods
    and blk[c]g_policy_data handling.

    - alloc/free added for blkg_policy_data. exit dropped.

    - alloc/free added for blkcg_policy_data.

    - blk-throttle's async percpu allocation is replaced with direct
    allocation.

    - all methods now take blk[c]g_policy_data instead of blkcg_gq or
    blkcg.

    And finally, series 4 is a set of patches cleaning up the blkcg stats
    handling:

    blkcg's stats have always been somwhat of a mess. This patchset
    tries to improve the situation a bit.

    - The following patches added to consolidate blkcg entry point and
    blkg creation. This is in itself is an improvement and helps
    colllecting common stats on bio issue.

    - per-blkg stats now accounted on bio issue rather than request
    completion so that bio based and request based drivers can behave
    the same way. The issue was spotted by Vivek.

    - cfq-iosched implements custom recursive stats and blk-throttle
    implements custom per-cpu stats. This patchset make blkcg core
    support both by default.

    - cfq-iosched and blk-throttle keep track of the same stats
    multiple times. Unify them"

    * 'for-4.3/blkcg' of git://git.kernel.dk/linux-block: (45 commits)
    blkcg: use CGROUP_WEIGHT_* scale for io.weight on the unified hierarchy
    blkcg: s/CFQ_WEIGHT_*/CFQ_WEIGHT_LEGACY_*/
    blkcg: implement interface for the unified hierarchy
    blkcg: misc preparations for unified hierarchy interface
    blkcg: separate out tg_conf_updated() from tg_set_conf()
    blkcg: move body parsing from blkg_conf_prep() to its callers
    blkcg: mark existing cftypes as legacy
    blkcg: rename subsystem name from blkio to io
    blkcg: refine error codes returned during blkcg configuration
    blkcg: remove unnecessary NULL checks from __cfqg_set_weight_device()
    blkcg: reduce stack usage of blkg_rwstat_recursive_sum()
    blkcg: remove cfqg_stats->sectors
    blkcg: move io_service_bytes and io_serviced stats into blkcg_gq
    blkcg: make blkg_[rw]stat_recursive_sum() to be able to index into blkcg_gq
    blkcg: make blkcg_[rw]stat per-cpu
    blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats with it
    blkcg: consolidate blkg creation in blkcg_bio_issue_check()
    blk-throttle: improve queue bypass handling
    blkcg: move root blkg lookup optimization from throtl_lookup_tg() to __blkg_lookup()
    blkcg: inline [__]blkg_lookup()
    ...

    Linus Torvalds
     
  • Pull more kvm updates from Paolo Bonzini:
    "ARM:
    - Full debug support for arm64
    - Active state switching for timer interrupts
    - Lazy FP/SIMD save/restore for arm64
    - Generic ARMv8 target

    PPC:
    - Book3S: A few bug fixes
    - Book3S: Allow micro-threading on POWER8

    x86:
    - Compiler warnings

    Generic:
    - Adaptive polling for guest halt"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (49 commits)
    kvm: irqchip: fix memory leak
    kvm: move new trace event outside #ifdef CONFIG_KVM_ASYNC_PF
    KVM: trace kvm_halt_poll_ns grow/shrink
    KVM: dynamic halt-polling
    KVM: make halt_poll_ns per-vCPU
    Silence compiler warning in arch/x86/kvm/emulate.c
    kvm: compile process_smi_save_seg_64() only for x86_64
    KVM: x86: avoid uninitialized variable warning
    KVM: PPC: Book3S: Fix typo in top comment about locking
    KVM: PPC: Book3S: Fix size of the PSPB register
    KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
    KVM: PPC: Book3S HV: Fix race in starting secondary threads
    KVM: PPC: Book3S: correct width in XER handling
    KVM: PPC: Book3S HV: Fix preempted vcore stolen time calculation
    KVM: PPC: Book3S HV: Fix preempted vcore list locking
    KVM: PPC: Book3S HV: Implement H_CLEAR_REF and H_CLEAR_MOD
    KVM: PPC: Book3S HV: Fix bug in dirty page tracking
    KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE
    KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8
    KVM: PPC: Book3S HV: Make use of unused threads when running guests
    ...

    Linus Torvalds
     

09 Sep, 2015

1 commit

  • Pull tracing update from Steven Rostedt:
    "Mostly this is just clean ups and micro optimizations.

    The changes with more meat are:

    - Allowing the trace event filters to filter on CPU number and
    process ids

    - Two new markers for trace output latency were added (10 and 100
    msec latencies)

    - Have tracing_thresh filter function profiling time

    I also worked on modifying the ring buffer code for some future work,
    and moved the adding of the timestamp around. One of my changes
    caused a regression, and since other changes were built on top of it
    and already tested, I had to operate a revert of that change. Instead
    of rebasing, this change set has the code that caused a regression as
    well as the code to revert that change without touching the other
    changes that were made on top of it"

    * tag 'trace-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ring-buffer: Revert "ring-buffer: Get timestamp after event is allocated"
    tracing: Don't make assumptions about length of string on task rename
    tracing: Allow triggers to filter for CPU ids and process names
    ftrace: Format MCOUNT_ADDR address as type unsigned long
    tracing: Introduce two additional marks for delay
    ftrace: Fix function_graph duration spacing with 7-digits
    ftrace: add tracing_thresh to function profile
    tracing: Clean up stack tracing and fix fentry updates
    ring-buffer: Reorganize function locations
    ring-buffer: Make sure event has enough room for extend and padding
    ring-buffer: Get timestamp after event is allocated
    ring-buffer: Move the adding of the extended timestamp out of line
    ring-buffer: Add event descriptor to simplify passing data
    ftrace: correct the counter increment for trace_buffer data
    tracing: Fix for non-continuous cpu ids
    tracing: Prefer kcalloc over kzalloc with multiply

    Linus Torvalds
     

08 Sep, 2015

1 commit


06 Sep, 2015

4 commits

  • Tracepoint for dynamic halt_pool_ns, fired on every potential change.

    Signed-off-by: Wanpeng Li
    Signed-off-by: Paolo Bonzini

    Wanpeng Li
     
  • Pull media updates from Mauro Carvalho Chehab:
    - new DVB frontend drivers: ascot2e, cxd2841er, horus3a, lnbh25
    - new HDMI capture driver: tc358743
    - new driver for NetUP DVB new boards (netup_unidvb)
    - IR support for DVBSky cards (smipcie-ir)
    - Coda driver has gain macroblock tiling support
    - Renesas R-Car gains JPEG codec driver
    - new DVB platform driver for STi boards: c8sectpfe
    - added documentation for the media core kABI to device-drivers DocBook
    - lots of driver fixups, cleanups and improvements

    * tag 'media/v4.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (297 commits)
    [media] c8sectpfe: Remove select on undefined LIBELF_32
    [media] i2c: fix platform_no_drv_owner.cocci warnings
    [media] cx231xx: Use wake_up_interruptible() instead of wake_up_interruptible_nr()
    [media] tc358743: only queue subdev notifications if devnode is set
    [media] tc358743: add missing Kconfig dependency/select
    [media] c8sectpfe: Use %pad to print 'dma_addr_t'
    [media] DocBook media: Fix typo "the the" in xml files
    [media] tc358743: make reset gpio optional
    [media] tc358743: set direction of reset gpio using devm_gpiod_get
    [media] dvbdev: document most of the functions/data structs
    [media] dvb_frontend.h: document the struct dvb_frontend
    [media] dvb-frontend.h: document struct dtv_frontend_properties
    [media] dvb-frontend.h: document struct dvb_frontend_ops
    [media] dvb: Use DVBFE_ALGO_HW where applicable
    [media] dvb_frontend.h: document struct analog_demod_ops
    [media] dvb_frontend.h: Document struct dvb_tuner_ops
    [media] Docbook: Document struct analog_parameters
    [media] dvb_frontend.h: get rid of dvbfe_modcod
    [media] add documentation for struct dvb_tuner_info
    [media] dvb_frontend: document dvb_frontend_tune_settings
    ...

    Linus Torvalds
     
  • Pull nfsd updates from Bruce Fields:
    "Nothing major, but:

    - Add Jeff Layton as an nfsd co-maintainer: no change to existing
    practice, just an acknowledgement of the status quo.

    - Two patches ("nfsd: ensure that...") for a race overlooked by the
    state locking rewrite, causing a crash noticed by multiple users.

    - Lots of smaller bugfixes all over from Kinglong Mee.

    - From Jeff, some cleanup of server rpc code in preparation for
    possible shift of nfsd threads to workqueues"

    * tag 'nfsd-4.3' of git://linux-nfs.org/~bfields/linux: (52 commits)
    nfsd: deal with DELEGRETURN racing with CB_RECALL
    nfsd: return CLID_INUSE for unexpected SETCLIENTID_CONFIRM case
    nfsd: ensure that delegation stateid hash references are only put once
    nfsd: ensure that the ol stateid hash reference is only put once
    net: sunrpc: fix tracepoint Warning: unknown op '->'
    nfsd: allow more than one laundry job to run at a time
    nfsd: don't WARN/backtrace for invalid container deployment.
    fs: fix fs/locks.c kernel-doc warning
    nfsd: Add Jeff Layton as co-maintainer
    NFSD: Return word2 bitmask if setting security label in OPEN/CREATE
    NFSD: Set the attributes used to store the verifier for EXCLUSIVE4_1
    nfsd: SUPPATTR_EXCLCREAT must be encoded before SECURITY_LABEL.
    nfsd: Fix an FS_LAYOUT_TYPES/LAYOUT_TYPES encode bug
    NFSD: Store parent's stat in a separate value
    nfsd: Fix two typos in comments
    lockd: NLM grace period shouldn't block NFSv4 opens
    nfsd: include linux/nfs4.h in export.h
    sunrpc: Switch to using hash list instead single list
    sunrpc/nfsd: Remove redundant code by exports seq_operations functions
    sunrpc: Store cache_detail in seq_file's private directly
    ...

    Linus Torvalds
     
  • Merge patch-bomb from Andrew Morton:

    - a few misc things

    - Andy's "ambient capabilities"

    - fs/nofity updates

    - the ocfs2 queue

    - kernel/watchdog.c updates and feature work.

    - some of MM. Includes Andrea's userfaultfd feature.

    [ Hadn't noticed that userfaultfd was 'default y' when applying the
    patches, so that got fixed in this merge instead. We do _not_ mark
    new features that nobody uses yet 'default y' - Linus ]

    * emailed patches from Andrew Morton : (118 commits)
    mm/hugetlb.c: make vma_has_reserves() return bool
    mm/madvise.c: make madvise_behaviour_valid() return bool
    mm/memory.c: make tlb_next_batch() return bool
    mm/dmapool.c: change is_page_busy() return from int to bool
    mm: remove struct node_active_region
    mremap: simplify the "overlap" check in mremap_to()
    mremap: don't do uneccesary checks if new_len == old_len
    mremap: don't do mm_populate(new_addr) on failure
    mm: move ->mremap() from file_operations to vm_operations_struct
    mremap: don't leak new_vma if f_op->mremap() fails
    mm/hugetlb.c: make vma_shareable() return bool
    mm: make GUP handle pfn mapping unless FOLL_GET is requested
    mm: fix status code which move_pages() returns for zero page
    mm: memcontrol: bring back the VM_BUG_ON() in mem_cgroup_swapout()
    genalloc: add support of multiple gen_pools per device
    genalloc: add name arg to gen_pool_get() and devm_gen_pool_create()
    mm/memblock: WARN_ON when nid differs from overlap region
    Documentation/features/vm: add feature description and arch support status for batched TLB flush after unmap
    mm: defer flush of writable TLB entries
    mm: send one IPI per CPU to TLB flush all entries after unmapping pages
    ...

    Linus Torvalds
     

05 Sep, 2015

1 commit

  • When unmapping pages it is necessary to flush the TLB. If that page was
    accessed by another CPU then an IPI is used to flush the remote CPU. That
    is a lot of IPIs if kswapd is scanning and unmapping >100K pages per
    second.

    There already is a window between when a page is unmapped and when it is
    TLB flushed. This series increases the window so multiple pages can be
    flushed using a single IPI. This should be safe or the kernel is hosed
    already.

    Patch 1 simply made the rest of the series easier to write as ftrace
    could identify all the senders of TLB flush IPIS.

    Patch 2 tracks what CPUs potentially map a PFN and then sends an IPI
    to flush the entire TLB.

    Patch 3 tracks when there potentially are writable TLB entries that
    need to be batched differently

    Patch 4 increases SWAP_CLUSTER_MAX to further batch flushes

    The performance impact is documented in the changelogs but in the optimistic
    case on a 4-socket machine the full series reduces interrupts from 900K
    interrupts/second to 60K interrupts/second.

    This patch (of 4):

    It is easy to trace when an IPI is received to flush a TLB but harder to
    detect what event sent it. This patch makes it easy to identify the
    source of IPIs being transmitted for TLB flushes on x86.

    Signed-off-by: Mel Gorman
    Reviewed-by: Rik van Riel
    Reviewed-by: Dave Hansen
    Acked-by: Ingo Molnar
    Cc: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman