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>] [day] [month] [year] [list]
Date:	Thu, 15 Nov 2012 17:01:11 +0100
From:	Javier Domingo <javierdo1@...il.com>
To:	netdev@...r.kernel.org
Subject: Network soft and hard irqs statistics

Hello all,

I am migrating some statistics we use in our research group to v3.6.
This I don't think it will be usefull for anyone, as they measure
softirqs, hardirqs, times on them, etc.

We modified net_device structure to contain a structure that has
several field of statistics.

Patched the e1000 and tg3 drivers to measure hardirq times, and
polling times. We also patched net_rx_action (the softirq) to check if
we get out per budget, per jiffies and netif_receive_skb to measure
times and how many packets are captured.

At the moment, we have been working with a external module that
accessed this vars, creating proc entries, and allowing us to reset
those measures.

Now, I am trying to make it the most standard way, with the intention
that when I talk to my boss, he will allow me to release the code.

The main aim of this is to get some feedback about the interest this
can have and to ask a few questions:

-> Where may I create the proc entry? we currently use
/proc/net/stats/<netdev>. I have also thought introducing that entry
in fs/proc/proc_net.c, but I am not too sure which conventions there
are...

-> When migrating the net_rx_action, I found that we used this line:
if(cpus_equal(mask,irq_desc[timedev->irq].affinity))
before counting if we get out by budget or by jiffies to (I suppose)
check that the softirq was the one assigned to this processor. Is that
needed? I mean the softirq is run in just one of them... I don't
really understand why it is important, so if anyone can explain me, I
would be glad.

-> We have patched the hardirqs in the driver, and the polling times
too. I know the hardirqs are the only place in which we can measure
them, but would it be posible to, instead of measuring the polls in
e1000_clean (for example) measuring in dev.c net_rx_action, measure
them around n->poll() call?
   Have been doing like this because they told me that the context
change was important... But I am not too sure on how important it is,
if someone could give me any tip on this.

-> In tg3.c I have seen that there are several hardirq function,
though we usually only patched tg3_interrupt_tagged, I have patched
all of them (for what they might be). Why are so many of them? Is that
due to preparation for multiqueue cards?

I hope someone can attend my doubts, and that I dont have asked too
many newbie questions.

Best regards,

Javier Domingo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ