netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-16 22:15 [PATCH net-next v6 0/9] net-sysfs+forcedeth: stats & debug enhancements David Decotigny
@ 2011-11-16 22:15 ` David Decotigny
  2011-11-16 23:12   ` Ben Hutchings
  0 siblings, 1 reply; 10+ messages in thread
From: David Decotigny @ 2011-11-16 22:15 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: David S. Miller, Ian Campbell, Eric Dumazet, Jeff Kirsher,
	Ben Hutchings, Jiri Pirko, Joe Perches, Szymon Janc,
	Richard Jones, Ayaz Abdulla, David Decotigny

This adds a description of RPS/XPS options and allow them to be
changed at make menuconfig time.

It also fixes following checkpatch syntax warnings:
ERROR: trailing whitespace
+^I  $

ERROR: trailing whitespace
+^I$



Signed-off-by: David Decotigny <david.decotigny@google.com>
---
 net/Kconfig |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/net/Kconfig b/net/Kconfig
index a073148..8e2104e 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -10,7 +10,7 @@ menuconfig NET
 	  The reason is that some programs need kernel networking support even
 	  when running on a stand-alone machine that isn't connected to any
 	  other computer.
-	  
+
 	  If you are upgrading from an older kernel, you
 	  should consider updating your networking tools too because changes
 	  in the kernel and the tools often go hand in hand. The tools are
@@ -217,20 +217,33 @@ source "net/dns_resolver/Kconfig"
 source "net/batman-adv/Kconfig"
 
 config RPS
-	boolean
+	boolean "Enable Receive Packet Steering"
 	depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS
 	default y
+	help
+	  RPS distributes the load of received packet processing
+	  across multiple CPUs. If unsure, say Y.
 
 config RFS_ACCEL
-	boolean
+	boolean "Enable Hardware Acceleration of RFS"
 	depends on RPS && GENERIC_HARDIRQS
 	select CPU_RMAP
 	default y
+	help
+	  This is the hardware version of RPS. On multi-queue network
+	  devices, this configures the hardware to distribute the
+	  received packets across multiple CPUs. If unsure, say Y.
 
 config XPS
-	boolean
+	boolean "Enable Transmit Packet Steering"
 	depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS
 	default y
+	help
+	  For multiqueue devices, XPS selects a transmit queue during
+	  packet transmission based on configuration. This is done by
+	  mapping the CPU transmitting the packet to a queue. XPS can
+	  reduce transmit network latency on SMP systems. If unsure,
+	  say Y.
 
 config HAVE_BPF_JIT
 	bool
@@ -274,7 +287,6 @@ config NET_TCPPROBE
 
 	Documentation on how to use TCP connection probing can be found
 	at:
-	
 	  http://www.linuxfoundation.org/collaborate/workgroups/networking/tcpprobe
 
 	To compile this code as a module, choose M here: the
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-16 22:15 ` [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options David Decotigny
@ 2011-11-16 23:12   ` Ben Hutchings
  2011-11-17  1:54     ` David Decotigny
  0 siblings, 1 reply; 10+ messages in thread
From: Ben Hutchings @ 2011-11-16 23:12 UTC (permalink / raw)
  To: David Decotigny
  Cc: netdev, linux-kernel, David S. Miller, Ian Campbell, Eric Dumazet,
	Jeff Kirsher, Jiri Pirko, Joe Perches, Szymon Janc, Richard Jones,
	Ayaz Abdulla, Tom Herbert

On Wed, 2011-11-16 at 14:15 -0800, David Decotigny wrote:
> This adds a description of RPS/XPS options and allow them to be
> changed at make menuconfig time.

I'm not sure why you think this is necessary.

[...]
>  config RPS
> -	boolean
> +	boolean "Enable Receive Packet Steering"
>  	depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS
>  	default y
> +	help
> +	  RPS distributes the load of received packet processing
> +	  across multiple CPUs. If unsure, say Y.
>  
>  config RFS_ACCEL
> -	boolean
> +	boolean "Enable Hardware Acceleration of RFS"
>  	depends on RPS && GENERIC_HARDIRQS
>  	select CPU_RMAP
>  	default y
> +	help
> +	  This is the hardware version of RPS. On multi-queue network
> +	  devices, this configures the hardware to distribute the
> +	  received packets across multiple CPUs. If unsure, say Y.
[...]

There is some confusion/conflation between RPS and RFS in both code and
documentation.

RPS originaly referred to spreading out RX packet processing based on a
flow hash.  Most multiqueue devices do this in hardware, which is
commonly referred to as RSS.  RSS can be enabled independently of any
networking core features.

RFS refers to directing RX packet processsing of specific flows based on
where the corresponding sockets have been used.  RFS acceleration means
that the driver and hardware help with this by changing hardware queue
selection for specific flows.

The RPS Kconfig option controls both RPS and RFS, and various references
to 'RPS' in the code really cover RFS as well.

The RFS_ACCEL Kconfig option enables RFS to support acceleration, and
like most offload features it has no effect without a driver that
specifically supports that.  The option only exists to abstract the
slightly odd dependency on GENERIC_HARDIRQS, and I don't think it should
be manually controllable.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-16 23:12   ` Ben Hutchings
@ 2011-11-17  1:54     ` David Decotigny
  2011-11-17  2:54       ` Ben Hutchings
  0 siblings, 1 reply; 10+ messages in thread
From: David Decotigny @ 2011-11-17  1:54 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: netdev, linux-kernel, David S. Miller, Ian Campbell, Eric Dumazet,
	Jeff Kirsher, Jiri Pirko, Joe Perches, Szymon Janc, Richard Jones,
	Ayaz Abdulla, Tom Herbert

On Wed, Nov 16, 2011 at 3:12 PM, Ben Hutchings
<bhutchings@solarflare.com> wrote:
> On Wed, 2011-11-16 at 14:15 -0800, David Decotigny wrote:
>> This adds a description of RPS/XPS options and allow them to be
>> changed at make menuconfig time.
>
> I'm not sure why you think this is necessary.

On my copy, make menuconfig doesn't let me change these CONFIG_ items,
unless I add the string after "boolean", which this patch does. I
agree, the help I added after is pure cosmetic.

>>  config RFS_ACCEL
[...]
> RFS refers to directing RX packet processsing of specific flows based on

Oops, you are right. I got confused and somehow read "RPS" instead of
"RFS" here. Thank you for the great explanation!

Will update this commit message. I don't know how patchwork handles
the follow-ups (it didn't work yesterday), so I'm afraid I will have
to send yet another batch of updates...

Regards,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
       [not found] <cover.1321496595.git.david.decotigny@google.com>
@ 2011-11-17  2:39 ` David Decotigny
  2011-11-17  2:58   ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: David Decotigny @ 2011-11-17  2:39 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: David S. Miller, Ian Campbell, Eric Dumazet, Jeff Kirsher,
	Ben Hutchings, Jiri Pirko, Joe Perches, Szymon Janc,
	Richard Jones, Ayaz Abdulla, David Decotigny

This adds a description of RPS/XPS options and allow them to be
changed at make menuconfig time.

It also fixes following checkpatch syntax warnings:
ERROR: trailing whitespace
+^I  $

ERROR: trailing whitespace
+^I$



Signed-off-by: David Decotigny <david.decotigny@google.com>
---
 net/Kconfig |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/net/Kconfig b/net/Kconfig
index a073148..991379e 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -10,7 +10,7 @@ menuconfig NET
 	  The reason is that some programs need kernel networking support even
 	  when running on a stand-alone machine that isn't connected to any
 	  other computer.
-	  
+
 	  If you are upgrading from an older kernel, you
 	  should consider updating your networking tools too because changes
 	  in the kernel and the tools often go hand in hand. The tools are
@@ -217,20 +217,32 @@ source "net/dns_resolver/Kconfig"
 source "net/batman-adv/Kconfig"
 
 config RPS
-	boolean
+	boolean "Enable Receive Packet Steering"
 	depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS
 	default y
+	help
+	  RPS distributes the load of received packet processing
+	  across multiple CPUs. If unsure, say Y.
 
 config RFS_ACCEL
-	boolean
+	boolean "Enable Hardware Acceleration of RFS"
 	depends on RPS && GENERIC_HARDIRQS
 	select CPU_RMAP
 	default y
+	help
+	  Allow drivers for multiqueue hardware with flow filter
+	  tables to accelerate RFS. If unsure, say Y.
 
 config XPS
-	boolean
+	boolean "Enable Transmit Packet Steering"
 	depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS
 	default y
+	help
+	  For multiqueue devices, XPS selects a transmit queue during
+	  packet transmission based on configuration. This is done by
+	  mapping the CPU transmitting the packet to a queue. XPS can
+	  reduce transmit network latency on SMP systems. If unsure,
+	  say Y.
 
 config HAVE_BPF_JIT
 	bool
@@ -274,7 +286,6 @@ config NET_TCPPROBE
 
 	Documentation on how to use TCP connection probing can be found
 	at:
-	
 	  http://www.linuxfoundation.org/collaborate/workgroups/networking/tcpprobe
 
 	To compile this code as a module, choose M here: the
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  1:54     ` David Decotigny
@ 2011-11-17  2:54       ` Ben Hutchings
  2011-11-17  2:59         ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Ben Hutchings @ 2011-11-17  2:54 UTC (permalink / raw)
  To: David Decotigny
  Cc: netdev, linux-kernel, David S. Miller, Ian Campbell, Eric Dumazet,
	Jeff Kirsher, Jiri Pirko, Joe Perches, Szymon Janc, Richard Jones,
	Ayaz Abdulla, Tom Herbert

On Wed, 2011-11-16 at 17:54 -0800, David Decotigny wrote:
> On Wed, Nov 16, 2011 at 3:12 PM, Ben Hutchings
> <bhutchings@solarflare.com> wrote:
> > On Wed, 2011-11-16 at 14:15 -0800, David Decotigny wrote:
> >> This adds a description of RPS/XPS options and allow them to be
> >> changed at make menuconfig time.
> >
> > I'm not sure why you think this is necessary.
> 
> On my copy, make menuconfig doesn't let me change these CONFIG_ items,
> unless I add the string after "boolean", which this patch does. I
> agree, the help I added after is pure cosmetic.
[...]

I know, but I'm asking why you think it's necessary to make them
optional.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  2:39 ` [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options David Decotigny
@ 2011-11-17  2:58   ` David Miller
  2011-11-17  3:04     ` David Decotigny
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2011-11-17  2:58 UTC (permalink / raw)
  To: david.decotigny
  Cc: netdev, linux-kernel, ian.campbell, eric.dumazet,
	jeffrey.t.kirsher, bhutchings, jpirko, joe, szymon, rick.jones2,
	AAbdulla

From: David Decotigny <david.decotigny@google.com>
Date: Wed, 16 Nov 2011 18:39:05 -0800

> This adds a description of RPS/XPS options and allow them to be
> changed at make menuconfig time.

These aren't meant to be selectable.

They are expressing internal dependencies so we don't have to crap
up the code with the complicated dependency conditional test.

They are meant to be turned on, unconditionally, when the dependencies
are met.  They are not meant to be controllable by the user.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  2:54       ` Ben Hutchings
@ 2011-11-17  2:59         ` David Miller
  2011-11-17  3:19           ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2011-11-17  2:59 UTC (permalink / raw)
  To: bhutchings
  Cc: david.decotigny, netdev, linux-kernel, ian.campbell, eric.dumazet,
	jeffrey.t.kirsher, jpirko, joe, szymon, rick.jones2, AAbdulla,
	therbert

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 17 Nov 2011 02:54:03 +0000

> On Wed, 2011-11-16 at 17:54 -0800, David Decotigny wrote:
>> On Wed, Nov 16, 2011 at 3:12 PM, Ben Hutchings
>> <bhutchings@solarflare.com> wrote:
>> > On Wed, 2011-11-16 at 14:15 -0800, David Decotigny wrote:
>> >> This adds a description of RPS/XPS options and allow them to be
>> >> changed at make menuconfig time.
>> >
>> > I'm not sure why you think this is necessary.
>> 
>> On my copy, make menuconfig doesn't let me change these CONFIG_ items,
>> unless I add the string after "boolean", which this patch does. I
>> agree, the help I added after is pure cosmetic.
> [...]
> 
> I know, but I'm asking why you think it's necessary to make them
> optional.

They shouldn't be, they are internal dependency descriptions and should
be invisible to the user.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  2:58   ` David Miller
@ 2011-11-17  3:04     ` David Decotigny
  2011-11-17  3:12       ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: David Decotigny @ 2011-11-17  3:04 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, linux-kernel, ian.campbell, eric.dumazet,
	jeffrey.t.kirsher, bhutchings, jpirko, joe, szymon, rick.jones2,
	AAbdulla

On Wed, Nov 16, 2011 at 6:58 PM, David Miller <davem@davemloft.net> wrote:
> From: David Decotigny <david.decotigny@google.com>
> Date: Wed, 16 Nov 2011 18:39:05 -0800
>
>> This adds a description of RPS/XPS options and allow them to be
>> changed at make menuconfig time.
>
> These aren't meant to be selectable.

Ok. I only needed this for our compilation scripts in order to make
sure I didn't have my CONFIG_* wrong in patch 4/9. I don't need this
patch anymore.

David, should I re-send an updated v7 version of this series with this
patch removed? Or is it Ok if I simply mark this patch as rejected in
patchwork and stick to patch series v6?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  3:04     ` David Decotigny
@ 2011-11-17  3:12       ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2011-11-17  3:12 UTC (permalink / raw)
  To: david.decotigny
  Cc: netdev, linux-kernel, ian.campbell, eric.dumazet,
	jeffrey.t.kirsher, bhutchings, jpirko, joe, szymon, rick.jones2,
	AAbdulla

From: David Decotigny <david.decotigny@google.com>
Date: Wed, 16 Nov 2011 19:04:58 -0800

> David, should I re-send an updated v7 version of this series with this
> patch removed? Or is it Ok if I simply mark this patch as rejected in
> patchwork and stick to patch series v6?

I'll try to apply v6 as-is sans patch #3.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options
  2011-11-17  2:59         ` David Miller
@ 2011-11-17  3:19           ` Eric Dumazet
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Dumazet @ 2011-11-17  3:19 UTC (permalink / raw)
  To: David Miller
  Cc: bhutchings, david.decotigny, netdev, linux-kernel, ian.campbell,
	jeffrey.t.kirsher, jpirko, joe, szymon, rick.jones2, AAbdulla,
	therbert

Le mercredi 16 novembre 2011 à 21:59 -0500, David Miller a écrit :

> They shouldn't be, they are internal dependency descriptions and should
> be invisible to the user.

Unless someone has evidence of a performance cost :)

The rps_lock() adds an atomic operation in netif_rx(), even if RPS is
not really used/configured...

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-11-17  3:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1321496595.git.david.decotigny@google.com>
2011-11-17  2:39 ` [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options David Decotigny
2011-11-17  2:58   ` David Miller
2011-11-17  3:04     ` David Decotigny
2011-11-17  3:12       ` David Miller
2011-11-16 22:15 [PATCH net-next v6 0/9] net-sysfs+forcedeth: stats & debug enhancements David Decotigny
2011-11-16 22:15 ` [PATCH net-next v6 3/9] kbuild: document RPS/XPS network Kconfig options David Decotigny
2011-11-16 23:12   ` Ben Hutchings
2011-11-17  1:54     ` David Decotigny
2011-11-17  2:54       ` Ben Hutchings
2011-11-17  2:59         ` David Miller
2011-11-17  3:19           ` Eric Dumazet

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).