lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Mar 2010 07:30:49 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Changli Gao <xiaosuo@...il.com>
Cc:	Tom Herbert <therbert@...gle.com>,
	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH v7] rps: Receive Packet Steering

Le jeudi 18 mars 2010 à 10:14 +0800, Changli Gao a écrit :
> On Thu, Mar 18, 2010 at 7:50 AM, Tom Herbert <therbert@...gle.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.

This would make RPS foot print quite large, with a rps_map size of 100
shorts -> 200 bytes.

I doubt we need a high precision in weighting, I would limit values to 4
bits (1 -> 16) per cpu.

Anyway, sysfs is limited to PAGE_SIZE. If we provide weight
capabilities, we should also cope with machines with 4096 cpus.

sysfs might be overkill for that (we need one file per cpu)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists