From: Changli Gao <xiaosuo@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH v7] rps: Receive Packet Steering
Date: Thu, 18 Mar 2010 10:14:16 +0800 [thread overview]
Message-ID: <412e6f7f1003171914t42db5dccvce0040c8c643a36d@mail.gmail.com> (raw)
In-Reply-To: <4BA16AB8.3090800@google.com>
On Thu, Mar 18, 2010 at 7:50 AM, Tom Herbert <therbert@google.com> wrote:
>
>>>
>>> # echo "0 1 0 1 0 1 1 1 1 1" >/sys/class/net/eth0/queues/rx-0/rps_map
>>> # cat /sys/class/net/eth0/queues/rx-0/rps_cpus
>>> 3
>>> # cat /sys/class/net/eth0/queues/rx-0/rps_map
>>> 0 1 0 1 0 1 1 1 1 1
>>> # echo 3 >/sys/class/net/eth0/queues/rx-0/rps_cpus
>>> # cat /sys/class/net/eth0/queues/rx-0/rps_map
>>> 0 1
>>
>> Alternatively, the rps_map could be specified explicitly, which will
>> allow weighting. For example "0 0 0 0 2 10 10 10" would select CPUs
>> 0, 2, 10 for the map with weights four, one, and three respectively.
>> This would go back to have sysfs files with multiple values in them,
>> so it might not be the right interface.
>
> Here is a patch for this...
>
> Allow specification of CPUs in rps to be done with a vector instead of a bit map. This allows relative weighting of CPUs in the map by repeating ones to give higher weight.
>
> For example "echo 0 0 0 3 4 4 4 4 > /sys/class/net/eth0/queues/rx-0/rps_cpus"
>
> assigns CPUs 0, 3, and 4 to the RPS mask with relative weights 3, 1, and 4 respectively.
>
If the weight of CPU0 is 100, I have to repeat 0 100 times. How about
using the * to simplify the weight.
The above examples will be "echo 0*3 3 4*4 >
/sys/class/net/eth0/queues/rx-0/rps_cpus"
--
Regards,
Changli Gao(xiaosuo@gmail.com)
next prev parent reply other threads:[~2010-03-18 2:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 20:13 [PATCH v7] rps: Receive Packet Steering Tom Herbert
2010-03-12 21:28 ` Eric Dumazet
2010-03-12 23:08 ` Tom Herbert
2010-03-16 18:03 ` Tom Herbert
2010-03-16 21:00 ` Eric Dumazet
2010-03-16 21:13 ` David Miller
2010-03-17 1:54 ` Changli Gao
2010-03-17 7:07 ` Eric Dumazet
2010-03-17 7:59 ` Changli Gao
2010-03-17 14:09 ` Eric Dumazet
2010-03-17 15:01 ` Tom Herbert
2010-03-17 15:34 ` Eric Dumazet
2010-03-17 23:50 ` Tom Herbert
2010-03-18 2:14 ` Changli Gao [this message]
2010-03-18 6:30 ` Eric Dumazet
2010-03-18 6:20 ` Eric Dumazet
2010-03-18 6:48 ` Changli Gao
2010-03-18 20:37 ` Eric Dumazet
2010-03-18 21:23 ` Stephen Hemminger
2010-03-17 4:26 ` David Miller
2010-03-12 22:20 ` Stephen Hemminger
2010-03-12 22:32 ` David Miller
2010-03-12 22:23 ` Stephen Hemminger
2010-03-12 22:33 ` David Miller
2010-03-12 23:05 ` Tom Herbert
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=412e6f7f1003171914t42db5dccvce0040c8c643a36d@mail.gmail.com \
--to=xiaosuo@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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).