From: Changli Gao <xiaosuo@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] rps: add flow director support
Date: Mon, 12 Apr 2010 22:27:04 +0800 [thread overview]
Message-ID: <u2m412e6f7f1004120727ga219ab9dr75ee522fba6f63c6@mail.gmail.com> (raw)
In-Reply-To: <z2o65634d661004120634h8336409er33af1fb75c2a9d1b@mail.gmail.com>
On Mon, Apr 12, 2010 at 9:34 PM, Tom Herbert <therbert@google.com> wrote:
> On Sun, Apr 11, 2010 at 2:42 PM, Changli Gao <xiaosuo@gmail.com> wrote:
>> add rps flow director support
>>
>> with rps flow director, users can do weighted packet dispatching among CPUs.
>> For example, CPU0:CPU1 is 1:3 for eth0's rx-0:
>>
> "Flow director" is a misnomer here in that it has no per flow
> awareness, that is what RFS provides. Please use a different name.
Flow here is a bundle of flow, not the original meaning. How about
"rps_buckets" and "rps_bucket_x"?
>
>> localhost linux # echo 4 > /sys/class/net/eth0/queues/rx-0/rps_flows
>> localhost linux # echo 0 > /sys/class/net/eth0/queues/rx-0/rps_flow_0
>> localhost linux # echo 1 > /sys/class/net/eth0/queues/rx-0/rps_flow_1
>> localhost linux # echo 1 > /sys/class/net/eth0/queues/rx-0/rps_flow_2
>> localhost linux # echo 1 > /sys/class/net/eth0/queues/rx-0/rps_flow_3
>>
> It might be better to put this in its own directory
I have thought that before, but since they control the same data in
kernel as rps_cpus does, I put them in the same directory.
> and also do it per
> CPU instead of hash entry. This should result in a lot fewer entries
> and I'm not sure how you would deal with holes in the hash table for
> unspecified entries. Also, it would be nice not to have to specify a
> number of entries. Maybe something like:
>
> localhost linux # echo 1 > /sys/class/net/eth0/queues/rx-0/rps_cpu_map/0
> localhost linux # echo 3 > /sys/class/net/eth0/queues/rx-0/rps_cpu_map/1
>
> To specify CPU 0 with weight 1, CPU 1 with weight 3.
>
Your way is more simple and straightforward. My idea has it own advantage:
1. control the rate precision through rps_flows.
2. do dynamic weighted packet dispatching by migrating some flows from
some CPUs to other CPUs. During this operations, only the flows
migrated are affected, and OOO only occurs in these flows.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
next prev parent reply other threads:[~2010-04-12 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-11 21:42 [PATCH] rps: add flow director support Changli Gao
2010-04-11 16:05 ` Eric Dumazet
2010-04-12 3:58 ` Changli Gao
2010-04-12 13:34 ` Tom Herbert
2010-04-12 14:27 ` Changli Gao [this message]
2010-04-12 17:13 ` Tom Herbert
2010-04-13 3:11 ` Changli Gao
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=u2m412e6f7f1004120727ga219ab9dr75ee522fba6f63c6@mail.gmail.com \
--to=xiaosuo@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
/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).