Thread (9 messages) 9 messages, 4 authors, 2009-07-29

Re: [RFC] Idea about increasing efficency of skb allocation in network devices

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2009-07-29 10:47:39

On Wed, Jul 29, 2009 at 10:20:55AM +0200, Brice Goglin wrote:
Neil Horman wrote:
quoted
quoted
quoted
Is there an easy way to get this NUMA node from the application socket
descriptor?
      
Thats not easy, this information can change for every packet (think of
bonding setups, whith aggregation of devices on different NUMA nodes)

We could add a getsockopt() call to peek this information from the next
data to be read from socket (returns node id where skb data is sitting,
hoping that NIC driver hadnt copybreak it (ie : allocate a small skb and
copy the device provided data on it before feeding packet to network stack))

    
Would a proc or debugfs interface perhaps be helpful here?  Something that
perhaps showed a statistical distribution of how many packets were received by
each process on each irq (operating under the assumption that each rx queue has
its own msi irq, giving us an easy identifier).
  
It could be intereting. But unprivileged user processes cannot read
/proc/irq/*/smp_affinity, so they would not be able to translate your
procfs information into a binding hint.
I don't think you'd need read access to the irq affinity files.  If the above
debugfs/proc information were exported to indicate which numa node or cpu the
allocated skb were local to, that could be used by the process to set its
scheduler affintiy via taskset.

Neil
Brice
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help