15 Aug, 2018

1 commit

  • Pull documentation update from Jonathan Corbet:
    "This was a moderately busy cycle for docs, with the usual collection
    of small fixes and updates.

    We also have new ktime_get_*() docs from Arnd, some kernel-doc fixes,
    a new set of Italian translations (non so se vale la pena, ma non fa
    male - speriamo bene), and some extensive early memory-management
    documentation improvements from Mike Rapoport"

    * tag 'docs-4.19' of git://git.lwn.net/linux: (52 commits)
    Documentation: corrections to console/console.txt
    Documentation: add ioctl number entry for v4l2-subdev.h
    Remove gendered language from management style documentation
    scripts/kernel-doc: Escape all literal braces in regexes
    docs/mm: add description of boot time memory management
    docs/mm: memblock: add overview documentation
    docs/mm: memblock: add kernel-doc description for memblock types
    docs/mm: memblock: add kernel-doc comments for memblock_add[_node]
    docs/mm: memblock: update kernel-doc comments
    mm/memblock: add a name for memblock flags enumeration
    docs/mm: bootmem: add overview documentation
    docs/mm: bootmem: add kernel-doc description of 'struct bootmem_data'
    docs/mm: bootmem: fix kernel-doc warnings
    docs/mm: nobootmem: fixup kernel-doc comments
    mm/bootmem: drop duplicated kernel-doc comments
    Documentation: vm.txt: Adding 'nr_hugepages_mempolicy' parameter description.
    doc:it_IT: translation for kernel-hacking
    docs: Fix the reference labels in Locking.rst
    doc: tracing: Fix a typo of trace_stat
    mm: Introduce new type vm_fault_t
    ...

    Linus Torvalds
     

27 Jul, 2018

1 commit


26 Jul, 2018

1 commit

  • systrace used for tracing for Android systems has carried a patch for
    many years in the Android tree that traces when the cpufreq limits
    change. With the help of this information, systrace can know when the
    policy limits change and can visually display the data. Lets add
    upstream support for the same.

    Signed-off-by: Ruchi Kandoi
    Signed-off-by: Joel Fernandes (Google)
    Acked-by: Viresh Kumar
    Acked-by: Steven Rostedt (VMware)
    Signed-off-by: Rafael J. Wysocki

    Ruchi Kandoi
     

23 Jul, 2018

2 commits


03 Jul, 2018

1 commit

  • Despite being mentioned at Documentation/trace/ftrace.rst as a
    rst file, this file was still a text one, with several issues.

    Convert it to ReST and add it to the trace index:
    - Mark the document title as such;
    - Identify and indent the literal blocks;
    - Use the proper markups for table.

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Steven Rostedt (VMware)
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

22 Jun, 2018

1 commit


16 Jun, 2018

2 commits

  • As we move stuff around, some doc references are broken. Fix some of
    them via this script:
    ./scripts/documentation-file-ref-check --fix

    Manually checked if the produced result is valid, removing a few
    false-positives.

    Acked-by: Takashi Iwai
    Acked-by: Masami Hiramatsu
    Acked-by: Stephen Boyd
    Acked-by: Charles Keepax
    Acked-by: Mathieu Poirier
    Reviewed-by: Coly Li
    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • The script:
    ./scripts/documentation-file-ref-check --fix

    Gives multiple hints for broken references on some files.
    Manually use the one that applies for some files.

    Acked-by: Steven Rostedt (VMware)
    Acked-by: James Morris
    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

07 Jun, 2018

1 commit

  • Pull tracing updates from Steven Rostedt:
    "One new feature was added to ftrace, which is the trace_marker now
    supports triggers. For example:

    # cd /sys/kernel/debug/tracing
    # echo 'snapshot' > events/ftrace/print/trigger
    # echo 'cause snapshot' > trace_marker

    The rest of the changes are various clean ups and also one stable fix
    that was added late in the cycle"

    * tag 'trace-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (21 commits)
    tracing: Use match_string() instead of open coding it in trace_set_options()
    branch-check: fix long->int truncation when profiling branches
    ring-buffer: Fix typo in comment
    ring-buffer: Fix a bunch of typos in comments
    tracing/selftest: Add test to test simple snapshot trigger for trace_marker
    tracing/selftest: Add test to test hist trigger between kernel event and trace_marker
    tracing/selftest: Add selftests to test trace_marker histogram triggers
    ftrace/selftest: Fix reset_trigger() to handle triggers with filters
    ftrace/selftest: Have the reset_trigger code be a bit more careful
    tracing: Document trace_marker triggers
    tracing: Allow histogram triggers to access ftrace internal events
    tracing: Prevent further users of zero size static arrays in trace events
    tracing: Have zero size length in filter logic be full string
    tracing: Add trigger file for trace_markers tracefs/ftrace/print
    tracing: Do not show filter file for ftrace internal events
    tracing: Add brackets in ftrace event dynamic arrays
    tracing: Have event_trace_init() called by trace_init_tracefs()
    tracing: Add __find_event_file() to find event files without restrictions
    tracing: Do not reference event data in post call triggers
    tracepoints: Fix the descriptions of tracepoint_probe_register{_prio}
    ...

    Linus Torvalds
     

06 Jun, 2018

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the "big" char and misc driver patches for 4.18-rc1.

    It's not a lot of stuff here, but there are some highlights:

    - coreboot driver updates

    - soundwire driver updates

    - android binder updates

    - fpga big sync, mostly documentation

    - lots of minor driver updates

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits)
    vmw_balloon: fixing double free when batching mode is off
    MAINTAINERS: Add driver-api/fpga path
    fpga: clarify that unregister functions also free
    documentation: fpga: move fpga-region.txt to driver-api
    documentation: fpga: add bridge document to driver-api
    documentation: fpga: move fpga-mgr.txt to driver-api
    Documentation: fpga: move fpga overview to driver-api
    fpga: region: kernel-doc fixes
    fpga: bridge: kernel-doc fixes
    fpga: mgr: kernel-doc fixes
    fpga: use SPDX
    fpga: region: change api, add fpga_region_create/free
    fpga: bridge: change api, don't use drvdata
    fpga: manager: change api, don't use drvdata
    fpga: region: don't use drvdata in common fpga code
    Drivers: hv: vmbus: Removed an unnecessary cast from void *
    ver_linux: Drop redundant calls to system() to test if file is readable
    ver_linux: Move stderr redirection from function parameter to function body
    misc: IBM Virtual Management Channel Driver (VMC)
    rpmsg: Correct support for MODULE_DEVICE_TABLE()
    ...

    Linus Torvalds
     

05 Jun, 2018

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "There's been a fair amount of work in the docs tree this time around,
    including:

    - Extensive RST conversions and organizational work in the
    memory-management docs thanks to Mike Rapoport.

    - An update of Documentation/features from Andrea Parri and a script
    to keep it updated.

    - Various LICENSES updates from Thomas, along with a script to check
    SPDX tags.

    - Work to fix dangling references to documentation files; this
    involved a fair number of one-liner comment changes outside of
    Documentation/

    ... and the usual list of documentation improvements, typo fixes, etc"

    * tag 'docs-4.18' of git://git.lwn.net/linux: (103 commits)
    Documentation: document hung_task_panic kernel parameter
    docs/admin-guide/mm: add high level concepts overview
    docs/vm: move ksm and transhuge from "user" to "internals" section.
    docs: Use the kerneldoc comments for memalloc_no*()
    doc: document scope NOFS, NOIO APIs
    docs: update kernel versions and dates in tables
    docs/vm: transhuge: split userspace bits to admin-guide/mm/transhuge
    docs/vm: transhuge: minor updates
    docs/vm: transhuge: change sections order
    Documentation: arm: clean up Marvell Berlin family info
    Documentation: gpio: driver: Fix a typo and some odd grammar
    docs: ranoops.rst: fix location of ramoops.txt
    scripts/documentation-file-ref-check: rewrite it in perl with auto-fix mode
    docs: uio-howto.rst: use a code block to solve a warning
    mm, THP, doc: Add document for thp_swpout/thp_swpout_fallback
    w1: w1_io.c: fix a kernel-doc warning
    Documentation/process/posting: wrap text at 80 cols
    docs: admin-guide: add cgroup-v2 documentation
    Revert "Documentation/features/vm: Remove arch support status file for 'pte_special'"
    Documentation: refcount-vs-atomic: Update reference to LKMM doc.
    ...

    Linus Torvalds
     

29 May, 2018

1 commit


14 May, 2018

1 commit

  • The driver prints pcsr twice: the first time it uses specifier %px to
    print hexadecimal pcsr value and the second time uses specifier %pS for
    output kernel symbols.

    As suggested by Kees, using %pS should be sufficient and %px isn't
    necessary; the reason is if the pcsr is a kernel space address, we can
    easily get to know the code line from %pS format, on the other hand, if
    the pcsr value doesn't fall into kernel space range (e.g. if the CPU is
    stuck in firmware), %pS also gives out pcsr hexadecimal value.

    So this commit removes useless %px and update section "Output format"
    in the document for alignment between the code and document.

    Suggested-by: Kees Cook
    Cc: Mathieu Poirier
    Signed-off-by: Leo Yan
    Reviewed-by: Kees Cook
    Signed-off-by: Mathieu Poirier
    Signed-off-by: Greg Kroah-Hartman

    Leo Yan
     

28 Apr, 2018

4 commits


26 Apr, 2018

1 commit

  • Revert commits

    92af4dcb4e1c ("tracing: Unify the "boot" and "mono" tracing clocks")
    127bfa5f4342 ("hrtimer: Unify MONOTONIC and BOOTTIME clock behavior")
    7250a4047aa6 ("posix-timers: Unify MONOTONIC and BOOTTIME clock behavior")
    d6c7270e913d ("timekeeping: Remove boot time specific code")
    f2d6fdbfd238 ("Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior")
    d6ed449afdb3 ("timekeeping: Make the MONOTONIC clock behave like the BOOTTIME clock")
    72199320d49d ("timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock")

    As stated in the pull request for the unification of CLOCK_MONOTONIC and
    CLOCK_BOOTTIME, it was clear that we might have to revert the change.

    As reported by several folks systemd and other applications rely on the
    documented behaviour of CLOCK_MONOTONIC on Linux and break with the above
    changes. After resume daemons time out and other timeout related issues are
    observed. Rafael compiled this list:

    * systemd kills daemons on resume, after >WatchdogSec seconds
    of suspending (Genki Sky). [Verified that that's because systemd uses
    CLOCK_MONOTONIC and expects it to not include the suspend time.]

    * systemd-journald misbehaves after resume:
    systemd-journald[7266]: File /var/log/journal/016627c3c4784cd4812d4b7e96a34226/system.journal
    corrupted or uncleanly shut down, renaming and replacing.
    (Mike Galbraith).

    * NetworkManager reports "networking disabled" and networking is broken
    after resume 50% of the time (Pavel). [May be because of systemd.]

    * MATE desktop dims the display and starts the screensaver right after
    system resume (Pavel).

    * Full system hang during resume (me). [May be due to systemd or NM or both.]

    That happens on debian and open suse systems.

    It's sad, that these problems were neither catched in -next nor by those
    folks who expressed interest in this change.

    Reported-by: Rafael J. Wysocki
    Reported-by: Genki Sky ,
    Reported-by: Pavel Machek
    Signed-off-by: Thomas Gleixner
    Cc: Dmitry Torokhov
    Cc: John Stultz
    Cc: Jonathan Corbet
    Cc: Kevin Easton
    Cc: Linus Torvalds
    Cc: Mark Salyzyn
    Cc: Michael Kerrisk
    Cc: Peter Zijlstra
    Cc: Petr Mladek
    Cc: Prarit Bhargava
    Cc: Sergey Senozhatsky
    Cc: Steven Rostedt

    Thomas Gleixner
     

17 Apr, 2018

1 commit


11 Apr, 2018

1 commit

  • Pull tracing updates from Steven Rostedt:
    "New features:

    - Tom Zanussi's extended histogram work.

    This adds the synthetic events to have histograms from multiple
    event data Adds triggers "onmatch" and "onmax" to call the
    synthetic events Several updates to the histogram code from this

    - Allow way to nest ring buffer calls in the same context

    - Allow absolute time stamps in ring buffer

    - Rewrite of filter code parsing based on Al Viro's suggestions

    - Setting of trace_clock to global if TSC is unstable (on boot)

    - Better OOM handling when allocating large ring buffers

    - Added initcall tracepoints (consolidated initcall_debug code with
    them)

    And other various fixes and clean ups"

    * tag 'trace-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (68 commits)
    init: Have initcall_debug still work without CONFIG_TRACEPOINTS
    init, tracing: Have printk come through the trace events for initcall_debug
    init, tracing: instrument security and console initcall trace events
    init, tracing: Add initcall trace events
    tracing: Add rcu dereference annotation for test func that touches filter->prog
    tracing: Add rcu dereference annotation for filter->prog
    tracing: Fixup logic inversion on setting trace_global_clock defaults
    tracing: Hide global trace clock from lockdep
    ring-buffer: Add set/clear_current_oom_origin() during allocations
    ring-buffer: Check if memory is available before allocation
    lockdep: Add print_irqtrace_events() to __warn
    vsprintf: Do not preprocess non-dereferenced pointers for bprintf (%px and %pK)
    tracing: Uninitialized variable in create_tracing_map_fields()
    tracing: Make sure variable string fields are NULL-terminated
    tracing: Add action comparisons when testing matching hist triggers
    tracing: Don't add flag strings when displaying variable references
    tracing: Fix display of hist trigger expressions containing timestamps
    ftrace: Drop a VLA in module_exists()
    tracing: Mention trace_clock=global when warning about unstable clocks
    tracing: Default to using trace_global_clock if sched_clock is unstable
    ...

    Linus Torvalds
     

06 Apr, 2018

1 commit

  • Kswapd will not wakeup if per-zone watermarks are not failing or if too
    many previous attempts at background reclaim have failed.

    This can be true if there is a lot of free memory available. For high-
    order allocations, kswapd is responsible for waking up kcompactd for
    background compaction. If the zone is not below its watermarks or
    reclaim has recently failed (lots of free memory, nothing left to
    reclaim), kcompactd does not get woken up.

    When __GFP_DIRECT_RECLAIM is not allowed, allow kcompactd to still be
    woken up even if kswapd will not reclaim. This allows high-order
    allocations, such as thp, to still trigger background compaction even
    when the zone has an abundance of free memory.

    Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1803111659420.209721@chino.kir.corp.google.com
    Signed-off-by: David Rientjes
    Acked-by: Vlastimil Babka
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

05 Apr, 2018

1 commit

  • Pull time(r) updates from Thomas Gleixner:
    "A small set of updates for timers and timekeeping:

    - The most interesting change is the consolidation of clock MONOTONIC
    and clock BOOTTIME.

    Clock MONOTONIC behaves now exactly like clock BOOTTIME and does
    not longer ignore the time spent in suspend. A new clock
    MONOTONIC_ACTIVE is provived which behaves like clock MONOTONIC in
    kernels before this change. This allows applications to
    programmatically check for the clock MONOTONIC behaviour.

    As discussed in the review thread, this has the potential of
    breaking user space and we might have to revert this. Knock on wood
    that we can avoid that exercise.

    - Updates to the NTP mechanism to improve accuracy

    - A new kernel internal data structure to aid the ongoing Y2038 work.

    - Cleanups and simplifications of the clocksource code.

    - Make the alarmtimer code play nicely with debugobjects"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    alarmtimer: Init nanosleep alarm timer on stack
    y2038: Introduce struct __kernel_old_timeval
    tracing: Unify the "boot" and "mono" tracing clocks
    hrtimer: Unify MONOTONIC and BOOTTIME clock behavior
    posix-timers: Unify MONOTONIC and BOOTTIME clock behavior
    timekeeping: Remove boot time specific code
    Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior
    timekeeping: Make the MONOTONIC clock behave like the BOOTTIME clock
    timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock
    timekeeping/ntp: Determine the multiplier directly from NTP tick length
    timekeeping/ntp: Don't align NTP frequency adjustments to ticks
    clocksource: Use ATTRIBUTE_GROUPS
    clocksource: Use DEVICE_ATTR_RW/RO/WO to define device attributes
    clocksource: Don't walk the clocksource list for empty override

    Linus Torvalds
     

04 Apr, 2018

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "There's been a fair amount of activity in Documentation/ this time
    around:

    - Lots of work aligning Documentation/ABI with reality, done by
    Aishwarya Pant.

    - The trace documentation has been converted to RST by Changbin Du

    - I thrashed up kernel-doc to deal with a parsing issue and to try to
    make the code more readable. It's still a 20+-year-old Perl hack,
    though.

    - Lots of other updates, typo fixes, and more"

    * tag 'docs-4.17' of git://git.lwn.net/linux: (82 commits)
    Documentation/process: update FUSE project website
    docs: kernel-doc: fix parsing of arrays
    dmaengine: Fix spelling for parenthesis in dmatest documentation
    dmaengine: Make dmatest.rst indeed reST compatible
    dmaengine: Add note to dmatest documentation about supported channels
    Documentation: magic-numbers: Fix typo
    Documentation: admin-guide: add kvmconfig, xenconfig and tinyconfig commands
    Input: alps - Update documentation for trackstick v3 format
    Documentation: Mention why %p prints ptrval
    COPYING: use the new text with points to the license files
    COPYING: create a new file with points to the Kernel license files
    Input: trackpoint: document sysfs interface
    xfs: Change URL for the project in xfs.txt
    char/bsr: add sysfs interface documentation
    acpi: nfit: document sysfs interface
    block: rbd: update sysfs interface
    Documentation/sparse: fix typo
    Documentation/CodingStyle: Add an example for braces
    docs/vm: update 00-INDEX
    kernel-doc: Remove __sched markings
    ...

    Linus Torvalds
     

13 Mar, 2018

1 commit

  • Unify the "boot" and "mono" tracing clocks and document the new behaviour.

    Signed-off-by: Thomas Gleixner
    Cc: Dmitry Torokhov
    Cc: John Stultz
    Cc: Jonathan Corbet
    Cc: Kevin Easton
    Cc: Linus Torvalds
    Cc: Mark Salyzyn
    Cc: Michael Kerrisk
    Cc: Peter Zijlstra
    Cc: Petr Mladek
    Cc: Prarit Bhargava
    Cc: Sergey Senozhatsky
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20180301165150.489635255@linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

11 Mar, 2018

8 commits

  • The default clock if timestamps are used in a histogram is "global".
    If timestamps aren't used, the clock is irrelevant.

    Use the "clock=" param only if you want to override the default
    "global" clock for a histogram with timestamps.

    Link: http://lkml.kernel.org/r/427bed1389c5d22aa40c3e0683e30cc3d151e260.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Rajvi Jingar
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • Add background and details on inter-event hist triggers, including
    hist variables, synthetic events, and actions.

    Link: http://lkml.kernel.org/r/b0414efb66535aa52aa7411f58c3d56724027fce.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Baohong Liu
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • With the addition of variables and actions, it's become necessary to
    provide more detailed error information to users about syntax errors.

    Add a 'last error' facility accessible via the erroring event's 'hist'
    file. Reading the hist file after an error will display more detailed
    information about what went wrong, if information is available. This
    extended error information will be available until the next hist
    trigger command for that event.

    # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
    echo: write error: Invalid argument

    # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist

    ERROR: Couldn't yyy: zzz
    Last command: xxx

    Also add specific error messages for variable and action errors.

    Link: http://lkml.kernel.org/r/64e9c422fc8aeafcc2f7a3b4328c0cffe7969129.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • A common key to use in a histogram is the cpuid - add a new cpu
    'synthetic' field named 'cpu' for that purpose.

    Link: http://lkml.kernel.org/r/89537645bfc957e0d76e2cacf5f0ada88691a6cc.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • Appending .usecs onto a common_timestamp field will cause the
    timestamp value to be in microseconds instead of the default
    nanoseconds. A typical latency histogram using usecs would look like
    this:

    # echo 'hist:keys=pid,prio:ts0=common_timestamp.usecs ...
    # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0 ...

    This also adds an external trace_clock_in_ns() to trace.c for the
    timestamp conversion.

    Link: http://lkml.kernel.org/r/4e813705a170b3e13e97dc3135047362fb1a39f3.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • Add a new option flag indicating whether or not the ring buffer is in
    'absolute timestamp' mode.

    Currently this is only set/unset by hist triggers that make use of a
    common_timestamp. As such, there's no reason to make this writeable
    for users - its purpose is only to allow users to determine
    unequivocally whether or not the ring buffer is in that mode (although
    absolute timestamps can coexist with the normal delta timestamps, when
    the ring buffer is in absolute mode, timestamps written while absolute
    mode is in effect take up more space in the buffer, and are not as
    efficient).

    Link: http://lkml.kernel.org/r/e8aa7b1cde1cf15014e66545d06ac6ef2ebba456.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • Add a line for the log2 modifier, to keep it aligned with
    tracing/README.

    Link: http://lkml.kernel.org/r/a419028bccab155749a4b8702d5b97af75f1578f.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     
  • The hist trigger Documentation takes up a large part of events.txt -
    since it will be getting even larger, move it to a separate file.

    Link: http://lkml.kernel.org/r/92761155ea4f529e590821b1e02207fe8619f248.1516069914.git.tom.zanussi@linux.intel.com

    Signed-off-by: Tom Zanussi
    Signed-off-by: Steven Rostedt (VMware)

    Tom Zanussi
     

08 Mar, 2018

7 commits