Loading include/linux/cgroup-defs.h +1 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ struct cgroup_subsys_state { atomic_t online_cnt; /* percpu_ref killing and RCU release */ struct rcu_head rcu_head; struct work_struct destroy_work; struct rcu_work destroy_rwork; /* * PI: the parent css. Placed here for cache proximity to following Loading kernel/cgroup/cgroup.c +7 −14 Original line number Diff line number Diff line Loading @@ -4514,10 +4514,10 @@ static struct cftype cgroup_base_files[] = { * and thus involve punting to css->destroy_work adding two additional * steps to the already complex sequence. */ static void css_free_work_fn(struct work_struct *work) static void css_free_rwork_fn(struct work_struct *work) { struct cgroup_subsys_state *css = container_of(work, struct cgroup_subsys_state, destroy_work); struct cgroup_subsys_state *css = container_of(to_rcu_work(work), struct cgroup_subsys_state, destroy_rwork); struct cgroup_subsys *ss = css->ss; struct cgroup *cgrp = css->cgroup; Loading Loading @@ -4563,15 +4563,6 @@ static void css_free_work_fn(struct work_struct *work) } } static void css_free_rcu_fn(struct rcu_head *rcu_head) { struct cgroup_subsys_state *css = container_of(rcu_head, struct cgroup_subsys_state, rcu_head); INIT_WORK(&css->destroy_work, css_free_work_fn); queue_work(cgroup_destroy_wq, &css->destroy_work); } static void css_release_work_fn(struct work_struct *work) { struct cgroup_subsys_state *css = Loading Loading @@ -4621,7 +4612,8 @@ static void css_release_work_fn(struct work_struct *work) mutex_unlock(&cgroup_mutex); call_rcu(&css->rcu_head, css_free_rcu_fn); INIT_RCU_WORK(&css->destroy_rwork, css_free_rwork_fn); queue_rcu_work(cgroup_destroy_wq, &css->destroy_rwork); } static void css_release(struct percpu_ref *ref) Loading Loading @@ -4755,7 +4747,8 @@ static struct cgroup_subsys_state *css_create(struct cgroup *cgrp, err_list_del: list_del_rcu(&css->sibling); err_free_css: call_rcu(&css->rcu_head, css_free_rcu_fn); INIT_RCU_WORK(&css->destroy_rwork, css_free_rwork_fn); queue_rcu_work(cgroup_destroy_wq, &css->destroy_rwork); return ERR_PTR(err); } Loading Loading
include/linux/cgroup-defs.h +1 −1 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ struct cgroup_subsys_state { atomic_t online_cnt; /* percpu_ref killing and RCU release */ struct rcu_head rcu_head; struct work_struct destroy_work; struct rcu_work destroy_rwork; /* * PI: the parent css. Placed here for cache proximity to following Loading
kernel/cgroup/cgroup.c +7 −14 Original line number Diff line number Diff line Loading @@ -4514,10 +4514,10 @@ static struct cftype cgroup_base_files[] = { * and thus involve punting to css->destroy_work adding two additional * steps to the already complex sequence. */ static void css_free_work_fn(struct work_struct *work) static void css_free_rwork_fn(struct work_struct *work) { struct cgroup_subsys_state *css = container_of(work, struct cgroup_subsys_state, destroy_work); struct cgroup_subsys_state *css = container_of(to_rcu_work(work), struct cgroup_subsys_state, destroy_rwork); struct cgroup_subsys *ss = css->ss; struct cgroup *cgrp = css->cgroup; Loading Loading @@ -4563,15 +4563,6 @@ static void css_free_work_fn(struct work_struct *work) } } static void css_free_rcu_fn(struct rcu_head *rcu_head) { struct cgroup_subsys_state *css = container_of(rcu_head, struct cgroup_subsys_state, rcu_head); INIT_WORK(&css->destroy_work, css_free_work_fn); queue_work(cgroup_destroy_wq, &css->destroy_work); } static void css_release_work_fn(struct work_struct *work) { struct cgroup_subsys_state *css = Loading Loading @@ -4621,7 +4612,8 @@ static void css_release_work_fn(struct work_struct *work) mutex_unlock(&cgroup_mutex); call_rcu(&css->rcu_head, css_free_rcu_fn); INIT_RCU_WORK(&css->destroy_rwork, css_free_rwork_fn); queue_rcu_work(cgroup_destroy_wq, &css->destroy_rwork); } static void css_release(struct percpu_ref *ref) Loading Loading @@ -4755,7 +4747,8 @@ static struct cgroup_subsys_state *css_create(struct cgroup *cgrp, err_list_del: list_del_rcu(&css->sibling); err_free_css: call_rcu(&css->rcu_head, css_free_rcu_fn); INIT_RCU_WORK(&css->destroy_rwork, css_free_rwork_fn); queue_rcu_work(cgroup_destroy_wq, &css->destroy_rwork); return ERR_PTR(err); } Loading