No conflicts.
Showing the changes to kernel (4 of 265 files). Show all
Unified · Split
| @@ -63,7 +63,8 @@ static inline int stack_map_data_size(struct bpf_map *map) · 62 unmodified lines | |||
| 63 | 63 | ||
| 64 | static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) | 64 | static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) |
| 65 | { | 65 | { |
| 66 | u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; | 66 | u64 elem_size = sizeof(struct stack_map_bucket) + |
| 67 | (u64)smap->map.value_size; | ||
| 67 | int err; | 68 | int err; |
| 68 | 69 | ||
| 69 | smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, | 70 | smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, |
| @@ -3707,6 +3707,29 @@ static noinline int visit_groups_merge(struct perf_cpu_context *cpuctx, · 3706 unmodified lines | |||
| 3707 | return 0; | 3707 | return 0; |
| 3708 | } | 3708 | } |
| 3709 | 3709 | ||
| 3710 | static inline bool event_update_userpage(struct perf_event *event) | ||
| 3711 | { | ||
| 3712 | if (likely(!atomic_read(&event->mmap_count))) | ||
| 3713 | return false; | ||
| 3714 | |||
| 3715 | perf_event_update_time(event); | ||
| 3716 | perf_set_shadow_time(event, event->ctx); | ||
| 3717 | perf_event_update_userpage(event); | ||
| 3718 | |||
| 3719 | return true; | ||
| 3720 | } | ||
| 3721 | |||
| 3722 | static inline void group_update_userpage(struct perf_event *group_event) | ||
| 3723 | { | ||
| 3724 | struct perf_event *event; | ||
| 3725 | |||
| 3726 | if (!event_update_userpage(group_event)) | ||
| 3727 | return; | ||
| 3728 | |||
| 3729 | for_each_sibling_event(event, group_event) | ||
| 3730 | event_update_userpage(event); | ||
| 3731 | } | ||
| 3732 | |||
| 3710 | static int merge_sched_in(struct perf_event *event, void *data) | 3733 | static int merge_sched_in(struct perf_event *event, void *data) |
| 3711 | { | 3734 | { |
| 3712 | struct perf_event_context *ctx = event->ctx; | 3735 | struct perf_event_context *ctx = event->ctx; |
| @@ -3725,14 +3748,15 @@ static int merge_sched_in(struct perf_event *event, void *data) · 12 unmodified lines | |||
| 3725 | } | 3748 | } |
| 3726 | 3749 | ||
| 3727 | if (event->state == PERF_EVENT_STATE_INACTIVE) { | 3750 | if (event->state == PERF_EVENT_STATE_INACTIVE) { |
| 3751 | *can_add_hw = 0; | ||
| 3728 | if (event->attr.pinned) { | 3752 | if (event->attr.pinned) { |
| 3729 | perf_cgroup_event_disable(event, ctx); | 3753 | perf_cgroup_event_disable(event, ctx); |
| 3730 | perf_event_set_state(event, PERF_EVENT_STATE_ERROR); | 3754 | perf_event_set_state(event, PERF_EVENT_STATE_ERROR); |
| 3755 | } else { | ||
| 3756 | ctx->rotate_necessary = 1; | ||
| 3757 | perf_mux_hrtimer_restart(cpuctx); | ||
| 3758 | group_update_userpage(event); | ||
| 3731 | } | 3759 | } |
| 3732 | |||
| 3733 | *can_add_hw = 0; | ||
| 3734 | ctx->rotate_necessary = 1; | ||
| 3735 | perf_mux_hrtimer_restart(cpuctx); | ||
| 3736 | } | 3760 | } |
| 3737 | 3761 | ||
| 3738 | return 0; | 3762 | return 0; |
| @@ -6324,6 +6348,8 @@ accounting: · 2585 unmodified lines | |||
| 6324 | 6348 | ||
| 6325 | ring_buffer_attach(event, rb); | 6349 | ring_buffer_attach(event, rb); |
| 6326 | 6350 | ||
| 6351 | perf_event_update_time(event); | ||
| 6352 | perf_set_shadow_time(event, event->ctx); | ||
| 6327 | perf_event_init_userpage(event); | 6353 | perf_event_init_userpage(event); |
| 6328 | perf_event_update_userpage(event); | 6354 | perf_event_update_userpage(event); |
| 6329 | } else { | 6355 | } else { |
| @@ -173,16 +173,22 @@ static ssize_t sched_scaling_write(struct file *filp, const char __user *ubuf, · 172 unmodified lines | |||
| 173 | size_t cnt, loff_t *ppos) | 173 | size_t cnt, loff_t *ppos) |
| 174 | { | 174 | { |
| 175 | char buf[16]; | 175 | char buf[16]; |
| 176 | unsigned int scaling; | ||
| 176 | 177 | ||
| 177 | if (cnt > 15) | 178 | if (cnt > 15) |
| 178 | cnt = 15; | 179 | cnt = 15; |
| 179 | 180 | ||
| 180 | if (copy_from_user(&buf, ubuf, cnt)) | 181 | if (copy_from_user(&buf, ubuf, cnt)) |
| 181 | return -EFAULT; | 182 | return -EFAULT; |
| 183 | buf[cnt] = '\0'; | ||
| 182 | 184 | ||
| 183 | if (kstrtouint(buf, 10, &sysctl_sched_tunable_scaling)) | 185 | if (kstrtouint(buf, 10, &scaling)) |
| 184 | return -EINVAL; | 186 | return -EINVAL; |
| 185 | 187 | ||
| 188 | if (scaling >= SCHED_TUNABLESCALING_END) | ||
| 189 | return -EINVAL; | ||
| 190 | |||
| 191 | sysctl_sched_tunable_scaling = scaling; | ||
| 186 | if (sched_update_scaling()) | 192 | if (sched_update_scaling()) |
| 187 | return -EINVAL; | 193 | return -EINVAL; |
| 188 | 194 | ||
| @@ -4936,8 +4936,12 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) · 4935 unmodified lines | |||
| 4936 | /* update hierarchical throttle state */ | 4936 | /* update hierarchical throttle state */ |
| 4937 | walk_tg_tree_from(cfs_rq->tg, tg_nop, tg_unthrottle_up, (void *)rq); | 4937 | walk_tg_tree_from(cfs_rq->tg, tg_nop, tg_unthrottle_up, (void *)rq); |
| 4938 | 4938 | ||
| 4939 | if (!cfs_rq->load.weight) | 4939 | /* Nothing to run but something to decay (on_list)? Complete the branch */ |
| 4940 | if (!cfs_rq->load.weight) { | ||
| 4941 | if (cfs_rq->on_list) | ||
| 4942 | goto unthrottle_throttle; | ||
| 4940 | return; | 4943 | return; |
| 4944 | } | ||
| 4941 | 4945 | ||
| 4942 | task_delta = cfs_rq->h_nr_running; | 4946 | task_delta = cfs_rq->h_nr_running; |
| 4943 | idle_task_delta = cfs_rq->idle_h_nr_running; | 4947 | idle_task_delta = cfs_rq->idle_h_nr_running; |