mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Linux 5.4-rc3
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl2jtUYeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGL28H/Akb3JEXNKHCv3MI 89dzKlLgf/W/e0qJirb9/YdcUL462NUFoC0Bg0qLgLFYdhT94Zp5J68C4oZPJfxA /LrTDsHWrbUtTvhxJqMueVT3JTpkF36ZTvTGwLTHzTqexM/o3kuDWjWTTxZlMGbX Uais/ywmmCVCmaX8IJ3GJFGCJse+T1W73VOSo7bm6C+Ruy6Euwasa9kc40uHiPpD 6Xew9j9AJ0xIV96sLzDFOYAXYFQBZnAbFLA+Ho53TiuG78J6MP4Pm9+1VhMyF1uH mgeA5GAfKpqq/QXf32iMU7s7HTdoF5r1UaQJtu+p6BFTGhd7LrDrh4gA/9Wyv7+t 9stS20U= =ima3 -----END PGP SIGNATURE----- Merge 5.4-rc3 into android-mainline Linux 5.4-rc3 Signed-off-by: Greg Kroah-Hartman <[email protected]> Change-Id: Ia87ba662738dd58ddb917e32c1fbd812861e7a46
This commit is contained in:
commit
630839ac24
396 changed files with 3472 additions and 4619 deletions
|
|
@ -3784,11 +3784,23 @@ static void rotate_ctx(struct perf_event_context *ctx, struct perf_event *event)
|
|||
perf_event_groups_insert(&ctx->flexible_groups, event);
|
||||
}
|
||||
|
||||
/* pick an event from the flexible_groups to rotate */
|
||||
static inline struct perf_event *
|
||||
ctx_first_active(struct perf_event_context *ctx)
|
||||
ctx_event_to_rotate(struct perf_event_context *ctx)
|
||||
{
|
||||
return list_first_entry_or_null(&ctx->flexible_active,
|
||||
struct perf_event, active_list);
|
||||
struct perf_event *event;
|
||||
|
||||
/* pick the first active flexible event */
|
||||
event = list_first_entry_or_null(&ctx->flexible_active,
|
||||
struct perf_event, active_list);
|
||||
|
||||
/* if no active flexible event, pick the first event */
|
||||
if (!event) {
|
||||
event = rb_entry_safe(rb_first(&ctx->flexible_groups.tree),
|
||||
typeof(*event), group_node);
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
static bool perf_rotate_context(struct perf_cpu_context *cpuctx)
|
||||
|
|
@ -3813,9 +3825,9 @@ static bool perf_rotate_context(struct perf_cpu_context *cpuctx)
|
|||
perf_pmu_disable(cpuctx->ctx.pmu);
|
||||
|
||||
if (task_rotate)
|
||||
task_event = ctx_first_active(task_ctx);
|
||||
task_event = ctx_event_to_rotate(task_ctx);
|
||||
if (cpu_rotate)
|
||||
cpu_event = ctx_first_active(&cpuctx->ctx);
|
||||
cpu_event = ctx_event_to_rotate(&cpuctx->ctx);
|
||||
|
||||
/*
|
||||
* As per the order given at ctx_resched() first 'pop' task flexible
|
||||
|
|
@ -5673,7 +5685,8 @@ again:
|
|||
* undo the VM accounting.
|
||||
*/
|
||||
|
||||
atomic_long_sub((size >> PAGE_SHIFT) + 1, &mmap_user->locked_vm);
|
||||
atomic_long_sub((size >> PAGE_SHIFT) + 1 - mmap_locked,
|
||||
&mmap_user->locked_vm);
|
||||
atomic64_sub(mmap_locked, &vma->vm_mm->pinned_vm);
|
||||
free_uid(mmap_user);
|
||||
|
||||
|
|
@ -5817,8 +5830,20 @@ accounting:
|
|||
|
||||
user_locked = atomic_long_read(&user->locked_vm) + user_extra;
|
||||
|
||||
if (user_locked > user_lock_limit)
|
||||
if (user_locked <= user_lock_limit) {
|
||||
/* charge all to locked_vm */
|
||||
} else if (atomic_long_read(&user->locked_vm) >= user_lock_limit) {
|
||||
/* charge all to pinned_vm */
|
||||
extra = user_extra;
|
||||
user_extra = 0;
|
||||
} else {
|
||||
/*
|
||||
* charge locked_vm until it hits user_lock_limit;
|
||||
* charge the rest from pinned_vm
|
||||
*/
|
||||
extra = user_locked - user_lock_limit;
|
||||
user_extra -= extra;
|
||||
}
|
||||
|
||||
lock_limit = rlimit(RLIMIT_MEMLOCK);
|
||||
lock_limit >>= PAGE_SHIFT;
|
||||
|
|
@ -11870,6 +11895,10 @@ static int inherit_group(struct perf_event *parent_event,
|
|||
child, leader, child_ctx);
|
||||
if (IS_ERR(child_ctr))
|
||||
return PTR_ERR(child_ctr);
|
||||
|
||||
if (sub->aux_event == parent_event &&
|
||||
!perf_get_aux_event(child_ctr, leader))
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue