* [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx @ 2013-10-08 3:05 Gao feng [not found] ` <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Gao feng @ 2013-10-08 3:05 UTC (permalink / raw) To: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA Cc: jhs-jkUAjuhPggJWk0Htik3J/w, davem-fT/PcQaiUtIeIZ0/mPfg9Q, tj-DgEjT+Ai2ygdnm+yROfE0A, nhorman-2XuSBdqkA4R54TAoqtyWWQ, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w, Gao feng Since the tasks have been migrated to the cgroup, there is no need to call task_netprioidx to get task's cgroup id. Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/core/netprio_cgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index d9cd627..9b7cf6c 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c @@ -222,11 +222,10 @@ static void net_prio_attach(struct cgroup_subsys_state *css, struct cgroup_taskset *tset) { struct task_struct *p; - void *v; + void *v = (void *)(unsigned long)css->cgroup->id; cgroup_taskset_for_each(p, css, tset) { task_lock(p); - v = (void *)(unsigned long)task_netprioidx(p); iterate_fd(p->files, 0, update_netprio, v); task_unlock(p); } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid [not found] ` <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2013-10-08 3:05 ` Gao feng [not found] ` <1381201520-25938-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 13:15 ` [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx Neil Horman 2013-10-08 20:52 ` David Miller 2 siblings, 1 reply; 6+ messages in thread From: Gao feng @ 2013-10-08 3:05 UTC (permalink / raw) To: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA Cc: jhs-jkUAjuhPggJWk0Htik3J/w, davem-fT/PcQaiUtIeIZ0/mPfg9Q, tj-DgEjT+Ai2ygdnm+yROfE0A, nhorman-2XuSBdqkA4R54TAoqtyWWQ, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w, Gao feng We can get classid through cgroup_subsys_state, this is directviewing and effective. Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> --- net/sched/cls_cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 867b4a3..16006c9 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c @@ -72,11 +72,11 @@ static void cgrp_attach(struct cgroup_subsys_state *css, struct cgroup_taskset *tset) { struct task_struct *p; - void *v; + struct cgroup_cls_state *cs = css_cls_state(css); + void *v = (void *)(unsigned long)cs->classid; cgroup_taskset_for_each(p, css, tset) { task_lock(p); - v = (void *)(unsigned long)task_cls_classid(p); iterate_fd(p->files, 0, update_classid, v); task_unlock(p); } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1381201520-25938-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid [not found] ` <1381201520-25938-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2013-10-08 13:17 ` Neil Horman 2013-10-08 20:52 ` David Miller 1 sibling, 0 replies; 6+ messages in thread From: Neil Horman @ 2013-10-08 13:17 UTC (permalink / raw) To: Gao feng Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA, jhs-jkUAjuhPggJWk0Htik3J/w, davem-fT/PcQaiUtIeIZ0/mPfg9Q, tj-DgEjT+Ai2ygdnm+yROfE0A, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w On Tue, Oct 08, 2013 at 11:05:20AM +0800, Gao feng wrote: > We can get classid through cgroup_subsys_state, > this is directviewing and effective. > > Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> > --- > net/sched/cls_cgroup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c > index 867b4a3..16006c9 100644 > --- a/net/sched/cls_cgroup.c > +++ b/net/sched/cls_cgroup.c > @@ -72,11 +72,11 @@ static void cgrp_attach(struct cgroup_subsys_state *css, > struct cgroup_taskset *tset) > { > struct task_struct *p; > - void *v; > + struct cgroup_cls_state *cs = css_cls_state(css); > + void *v = (void *)(unsigned long)cs->classid; > > cgroup_taskset_for_each(p, css, tset) { > task_lock(p); > - v = (void *)(unsigned long)task_cls_classid(p); > iterate_fd(p->files, 0, update_classid, v); > task_unlock(p); > } > -- > 1.8.3.1 > > Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid [not found] ` <1381201520-25938-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 13:17 ` Neil Horman @ 2013-10-08 20:52 ` David Miller 1 sibling, 0 replies; 6+ messages in thread From: David Miller @ 2013-10-08 20:52 UTC (permalink / raw) To: gaofeng-BthXqXjhjHXQFUHtdCDX3A Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA, jhs-jkUAjuhPggJWk0Htik3J/w, tj-DgEjT+Ai2ygdnm+yROfE0A, nhorman-2XuSBdqkA4R54TAoqtyWWQ, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w From: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 8 Oct 2013 11:05:20 +0800 > We can get classid through cgroup_subsys_state, > this is directviewing and effective. > > Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx [not found] ` <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 3:05 ` [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid Gao feng @ 2013-10-08 13:15 ` Neil Horman 2013-10-08 20:52 ` David Miller 2 siblings, 0 replies; 6+ messages in thread From: Neil Horman @ 2013-10-08 13:15 UTC (permalink / raw) To: Gao feng Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA, jhs-jkUAjuhPggJWk0Htik3J/w, davem-fT/PcQaiUtIeIZ0/mPfg9Q, tj-DgEjT+Ai2ygdnm+yROfE0A, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w On Tue, Oct 08, 2013 at 11:05:19AM +0800, Gao feng wrote: > Since the tasks have been migrated to the cgroup, > there is no need to call task_netprioidx to get > task's cgroup id. > > Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> > --- > net/core/netprio_cgroup.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c > index d9cd627..9b7cf6c 100644 > --- a/net/core/netprio_cgroup.c > +++ b/net/core/netprio_cgroup.c > @@ -222,11 +222,10 @@ static void net_prio_attach(struct cgroup_subsys_state *css, > struct cgroup_taskset *tset) > { > struct task_struct *p; > - void *v; > + void *v = (void *)(unsigned long)css->cgroup->id; > > cgroup_taskset_for_each(p, css, tset) { > task_lock(p); > - v = (void *)(unsigned long)task_netprioidx(p); > iterate_fd(p->files, 0, update_netprio, v); > task_unlock(p); > } > -- > 1.8.3.1 > > Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx [not found] ` <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 3:05 ` [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid Gao feng 2013-10-08 13:15 ` [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx Neil Horman @ 2013-10-08 20:52 ` David Miller 2 siblings, 0 replies; 6+ messages in thread From: David Miller @ 2013-10-08 20:52 UTC (permalink / raw) To: gaofeng-BthXqXjhjHXQFUHtdCDX3A Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA, jhs-jkUAjuhPggJWk0Htik3J/w, tj-DgEjT+Ai2ygdnm+yROfE0A, nhorman-2XuSBdqkA4R54TAoqtyWWQ, lizefan-hv44wF8Li93QT0dZR+AlfA, daniel.wagner-98C5kh4wR6ohFhg+JK9F0w From: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Date: Tue, 8 Oct 2013 11:05:19 +0800 > Since the tasks have been migrated to the cgroup, > there is no need to call task_netprioidx to get > task's cgroup id. > > Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> Applied. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-08 20:52 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-08 3:05 [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx Gao feng [not found] ` <1381201520-25938-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 3:05 ` [PATCH 2/2] cgroup: cls: remove unnecessary task_cls_classid Gao feng [not found] ` <1381201520-25938-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> 2013-10-08 13:17 ` Neil Horman 2013-10-08 20:52 ` David Miller 2013-10-08 13:15 ` [PATCH 1/2] cgroup: netprio: remove unnecessary task_netprioidx Neil Horman 2013-10-08 20:52 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).