From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org
Cc: wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
daniel.wagner-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org,
joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
skinsbursky-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org,
tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v1 5/5] cgroup: net_cls: Rework update socket logic
Date: Fri, 26 Oct 2012 03:42:20 -0400 (EDT) [thread overview]
Message-ID: <20121026.034220.576309730816593287.davem@davemloft.net> (raw)
In-Reply-To: <20121025190734.GE15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
From: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Date: Thu, 25 Oct 2012 15:07:34 -0400
> On Thu, Oct 25, 2012 at 04:16:59PM +0200, Daniel Wagner wrote:
>> From: Daniel Wagner <daniel.wagner-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org>
>>
>> The cgroup logic part of net_cls is very similar as the one in
>> net_prio. Let's stream line the net_cls logic with the net_prio one.
>>
>> The net_prio update logic was changed by following commit (note there
>> were some changes necessary later on)
>>
>> commit 406a3c638ce8b17d9704052c07955490f732c2b8
>> Author: John Fastabend <john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> Date: Fri Jul 20 10:39:25 2012 +0000
>>
>> net: netprio_cgroup: rework update socket logic
>>
>> Instead of updating the sk_cgrp_prioidx struct field on every send
>> this only updates the field when a task is moved via cgroup
>> infrastructure.
>>
>> This allows sockets that may be used by a kernel worker thread
>> to be managed. For example in the iscsi case today a user can
>> put iscsid in a netprio cgroup and control traffic will be sent
>> with the correct sk_cgrp_prioidx value set but as soon as data
>> is sent the kernel worker thread isssues a send and sk_cgrp_prioidx
>> is updated with the kernel worker threads value which is the
>> default case.
>>
>> It seems more correct to only update the field when the user
>> explicitly sets it via control group infrastructure. This allows
>> the users to manage sockets that may be used with other threads.
>>
>> Since classid is now updated when the task is moved between the
>> cgroups, we don't have to call sock_update_classid() from various
>> places to ensure we always using the latest classid value.
>>
>> [v2: Use iterate_fd() instead of open coding]
>>
> Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Applied.
prev parent reply other threads:[~2012-10-26 7:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 14:16 [PATCH v1 0/5] Rework net_cls update socket logic Daniel Wagner
2012-10-25 14:16 ` [PATCH v1 2/5] cgroup: net_cls: Fix local variable type decleration Daniel Wagner
2012-10-25 18:35 ` Neil Horman
[not found] ` <20121025183516.GB15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:41 ` David Miller
2012-10-25 14:16 ` [PATCH v1 3/5] cgroup: net_cls: Remove rcu_read_lock/unlock Daniel Wagner
[not found] ` <1351174619-5096-4-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:42 ` Neil Horman
[not found] ` <20121025184252.GC15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller
[not found] ` <1351174619-5096-1-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 14:16 ` [PATCH v1 1/5] cgroup: net_prio: Mark local used function static Daniel Wagner
[not found] ` <1351174619-5096-2-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:28 ` Neil Horman
2012-10-26 7:41 ` David Miller
2012-10-25 14:16 ` [PATCH v1 4/5] cgroup: net_cls: Pass in task to sock_update_classid() Daniel Wagner
[not found] ` <1351174619-5096-5-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:11 ` Tejun Heo
2012-10-25 18:43 ` Neil Horman
[not found] ` <20121025184316.GD15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller
2012-10-25 14:16 ` [PATCH v1 5/5] cgroup: net_cls: Rework update socket logic Daniel Wagner
[not found] ` <1351174619-5096-6-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 19:07 ` Neil Horman
[not found] ` <20121025190734.GE15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121026.034220.576309730816593287.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=daniel.wagner-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org \
--cc=jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=john.r.fastabend-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=skinsbursky-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).