19 Jan, 2021

1 commit


15 Jan, 2021

3 commits

  • Vendor hooks required explicitly defining macros or inline functions
    to handle the non-GKI build case (!CONFIG_ANDROID_VENDOR_HOOKS). Added
    support for generating them automatically so the macros are no longer
    required.

    Both models are now supported so we can transition.

    Bug: 177416721
    Signed-off-by: Todd Kjos
    Change-Id: I01acc389d315a5d509b0c48116854342a42e1058

    Todd Kjos
     
  • Fixes use of %p format for u64 (should be %llx)

    Fixes: e091aa59b956 ("ANDROID: tracing: Add register read and write
    tracing support")
    Signed-off-by: Todd Kjos
    Change-Id: I4cd3a179e08a3fb682db6d9bb8530d504eb71720

    Todd Kjos
     
  • CFI has additional overhead on indirect branches to modules as the
    target is not known at kernel compile-time. This has been demonstrated
    to cause problematic performance regressions on benchmarks using GKI
    together with modularized scheduler callbacks attached to restricted
    vendor hooks.

    To restore some of the performance back, let's disable CFI around the
    restricted hook call sites and issue a raw indirect call in fast paths.

    We should be able to drop this patch when/if the arm64 static_call
    port lands upstream [1] as this would make tracepoints circumvent some
    of the CFI checks using text patching, but that still remain to be
    proven.

    [1] https://lore.kernel.org/linux-arm-kernel/20201028184114.6834-1-ardb@kernel.org/

    Bug: 168521642
    Change-Id: I7cd59f582b12fed15be64059f08122f96786e650
    Signed-off-by: Quentin Perret

    Quentin Perret
     

14 Jan, 2021

2 commits

  • In order to debug critical domain and device power issues, it may be
    necessary to disallow certain idle states at runtime. Enable a vendor
    hook to check if a domain idle state is allowed for powering down the
    domain.

    Bug: 175718935
    Signed-off-by: Lina Iyer
    Change-Id: I403c0c7d272439fb338bbf54a346861559385047

    Lina Iyer
     
  • Add following vendor hooks in ftrace oops path to allow
    vendor modules to get ftrace buffer data.

    1) android_vh_ftrace_oops_enter
    2) android_vh_ftrace_size_check
    3) android_vh_ftrace_format_check
    4) android_vh_ftrace_dump_buffer
    5) android_vh_ftrace_oops_exit

    Ftrace dump on oops can be controlled with kernel command
    line parameter ftrace_dump_on_oops.

    Bug: 177387994
    Change-Id: I898026bfc3e5c5c5ab1eaa0e86a019a6a720408e
    Signed-off-by: Prateek Sood
    Signed-off-by: Mukesh Ojha

    Prateek Sood
     

13 Jan, 2021

2 commits

  • Fix an issue for non-GKI builds found by the 0-day test bot:

    kernel/sched/fair.c: In function 'select_task_rq_fair':
    >> kernel/sched/fair.c:6766:6: error: implicit declaration of function
    'trace_android_rvh_select_task_rq_fair_enabled';
    did you mean 'trace_android_rvh_select_task_rq_fair'?
    6766 | if (trace_android_rvh_select_task_rq_fair_enabled())
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | trace_android_rvh_select_task_rq_fair
    cc1: some warnings being treated as errors

    Reported-by: kernel test robot
    Fixes: c7ba09ce6aa5 ("ANDROID: sched/fair: Sync task util for strf hook")
    Signed-off-by: Todd Kjos
    Change-Id: I1b15b9ada83dc5b2678cef3910a7aedc0d19f174

    Todd Kjos
     
  • Since the sugov traces were added in kernel/sched/cpufreq_schedutil.c,
    move it from power.h to sched.h.
    And move the tracepoint to where the change happens.

    Bug: 174488007
    Test: build pass and boot to home
    Signed-off-by: Jimmy Shiu
    Change-Id: Ibe18f04773c28be84db3619b1a4253bf08f0e289
    Signed-off-by: Will McVicker

    Jimmy Shiu
     

12 Jan, 2021

1 commit


09 Jan, 2021

1 commit


08 Jan, 2021

3 commits


07 Jan, 2021

1 commit

  • Add vendor hook tracepoints to track when cpu util gets
    updated and when freq is choosen.

    Bug: 174488007
    Signed-off-by: Saravana Kannan
    Signed-off-by: Rohit Gupta
    Signed-off-by: Jonathan Avila
    Signed-off-by: Jimmy Shiu
    Change-Id: Ibb22fd0337a2539820a05b1e6b54b09aeaebd040
    Signed-off-by: Will McVicker

    Jimmy Shiu
     

05 Jan, 2021

1 commit

  • When entering cluster-wide or system-wide power mode, Exynos cpu
    power management driver checks the next hrtimer events of cpu
    composing the power domain to prevent unnecessary attempts to enter
    the power mode. Since struct cpuidle_device has next_hrtimer, it
    can be solved by passing cpuidle device as a parameter of vh.

    In order to improve responsiveness, it is necessary to prevent
    entering the deep idle state in boosting scenario. So, vendor
    driver should be able to control the idle state.

    Due to above requirements, the parameters required for idle enter
    and exit different, so the vendor hook is separated into
    cpu_idle_enter and cpu_idle_exit.

    Bug: 176198732

    Change-Id: I2262ba1bae5e6622a8e76bc1d5d16fb27af0bb8a
    Signed-off-by: Park Bumgyu

    Park Bumgyu
     

29 Dec, 2020

1 commit

  • * aosp/upstream-f2fs-stable-linux-5.10.y:
    f2fs: compress: fix compression chksum
    f2fs: fix shift-out-of-bounds in sanity_check_raw_super()
    f2fs: fix race of pending_pages in decompression
    f2fs: fix to account inline xattr correctly during recovery
    f2fs: inline: fix wrong inline inode stat
    f2fs: inline: correct comment in f2fs_recover_inline_data
    f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
    f2fs: convert to F2FS_*_INO macro
    f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size
    f2fs: don't allow any writes on readonly mount
    f2fs: avoid race condition for shrinker count
    f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE
    f2fs: add compress_mode mount option
    f2fs: Remove unnecessary unlikely()
    f2fs: init dirty_secmap incorrectly
    f2fs: remove buffer_head which has 32bits limit
    f2fs: fix wrong block count instead of bytes
    f2fs: use new conversion functions between blks and bytes
    f2fs: rename logical_to_blk and blk_to_logical
    f2fs: fix kbytes written stat for multi-device case
    f2fs: compress: support chksum
    f2fs: fix to avoid REQ_TIME and CP_TIME collision
    f2fs: change to use rwsem for cp_mutex
    f2fs: Handle casefolding with Encryption
    fscrypt: Have filesystems handle their d_ops
    libfs: Add generic function for setting dentry_ops
    f2fs: Remove the redundancy initialization
    f2fs: remove writeback_inodes_sb in f2fs_remount
    f2fs: fix double free of unicode map
    f2fs: fix compat F2FS_IOC_{MOVE,GARBAGE_COLLECT}_RANGE
    f2fs: avoid unneeded data copy in f2fs_ioc_move_range()
    f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl
    f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl
    f2fs: move ioctl interface definitions to separated file
    f2fs: fix to seek incorrect data offset in inline data file
    f2fs: call f2fs_get_meta_page_retry for nat page

    Bug: 174873661
    Signed-off-by: Jaegeuk Kim
    Change-Id: I1edcbc31855a7b9d5fd5623ad0fd420e4885eaf2

    Jaegeuk Kim
     

24 Dec, 2020

1 commit

  • Add a tracepoint for pause and resume which measures the
    duration of time to perform the entire operation, the
    cpus acted upon with this event, and the current state
    of the active cpu mask. This should be sufficient
    for testing pause performance.

    Bug: 175959069
    Change-Id: I9fc269c7d09ac78ec31612d3c552044b72b0e6e3
    Signed-off-by: Stephen Dickey

    Stephen Dickey
     

22 Dec, 2020

2 commits


16 Dec, 2020

1 commit


15 Dec, 2020

1 commit


11 Dec, 2020

1 commit


09 Dec, 2020

1 commit


04 Dec, 2020

2 commits

  • Add vendors hooks for to facilitate various scheduler value adds.

    Bug: 173725277
    Change-Id: I4389f2a8121fe7ac49ad4610e25a77bfc38f4660
    Signed-off-by: Shaleen Agrawal
    Signed-off-by: Pavankumar Kondeti

    Shaleen Agrawal
     
  • We have debug infrastructure built on top of preempt/irq disable/enable
    events. This requires modifications to the kernel tracing code. Since
    this is not feasible with GKI, we started with registering to the
    existing preemptirq trace events. However the performance of wide
    variety of use cases are regressed as the rate of preemptirq events
    is super high and generic trace events are slow.

    Since GKI allows optimized trace events via restricted trace hooks,
    add the same for preemptirq event.

    Bug: 174541725
    Change-Id: Ic8d3cdd1c1aa6a9267d0b755694fedffa2ea8e36
    Signed-off-by: Pavankumar Kondeti

    Pavankumar Kondeti
     

03 Dec, 2020

1 commit


02 Dec, 2020

1 commit

  • Create a vendor hook inside of gfp_zone() to modify which allocations
    get to enter ZONE_MOVABLE, by zeroing out __GFP_HIGHMEM inside of the
    trace hook based on certain conditions.

    Separately, create separate trace hooks in the swap-in and readahead
    paths to affect the behavior of the tracehook in gfp_zone().

    Bug: 158645321
    Change-Id: I4a4f0b724267ee120a1e5661f6da5d43d7ef6fc6
    Signed-off-by: Chris Goldsworthy

    Chris Goldsworthy
     

30 Nov, 2020

2 commits


28 Nov, 2020

4 commits


27 Nov, 2020

1 commit

  • android_rvh_sched_nohz_balancer_kick hook allows vendor modules to
    select the busiest CPU in a group during load balance. When the
    load balancer could not pull tasks from this busiest CPU due to
    affinity restriction, the CPU is cleared from env->cpu. This must
    be passed to the vendor module, otherwise we keep selecting the
    exempted CPU as the busiest CPU.

    Bug: 174338902
    Change-Id: Iedaa389a51849da4c3e094d731fe5e39cd909d81
    Signed-off-by: Pavankumar Kondeti

    Pavankumar Kondeti
     

25 Nov, 2020

1 commit

  • The bdi_dev_name() returns a char [64], and
    the __entry->name is a char [32].

    It maybe dangerous to TP_printk("%s", __entry->name)
    after the strncpy().

    CC: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201124165205.GA23937@rlk
    Acked-by: Steven Rostedt (VMware)
    Acked-by: Tejun Heo
    Signed-off-by: Hui Su
    Signed-off-by: Jan Kara

    Hui Su
     

24 Nov, 2020

2 commits

  • The following restrict vendor hooks are added. The vendor hook
    can selectively opt in for the default scheduler behavior by not
    modifying the done argument.

    - android_rvh_sched_newidle_balance: For newly idle load balance.

    - android_rvh_sched_nohz_balancer_kick: For deciding if an idle
    CPU is woken up to do nohz balance or not.

    - android_rvh_find_busiest_queue: For selecting the busiest runqueue
    among the CPUs in the busiest group selected in find_busiest_group.

    - android_rvh_migrate_queued_task: Vendor implementations may require
    both source and destination CPUs runqueue locks to be held while
    calling set_task_cpu() during a task migration. Add a hook when
    a queued task is migration so that vendor implementation can detach
    the task and call set_task_cpu() with both runqueue locks held.

    Bug: 173661641
    Change-Id: I6a09226081061b6433e4231359be252a0f28f04b
    Signed-off-by: Pavankumar Kondeti

    Pavankumar Kondeti
     
  • QC value-add requires the ability to override the value displayed
    by show_cpuinfo_max_freq.

    Bug: 173984660
    Signed-off-by: Todd Kjos
    Change-Id: Ida11256f399f0730bc1228524b9687df3e7b8bf4

    Todd Kjos
     

20 Nov, 2020

2 commits


19 Nov, 2020

1 commit