From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64098 invoked by alias); 10 Dec 2015 03:14:02 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 64064 invoked by uid 89); 10 Dec 2015 03:14:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 10 Dec 2015 03:14:00 +0000 Received: by qgcc31 with SMTP id c31so117503502qgc.3 for ; Wed, 09 Dec 2015 19:13:58 -0800 (PST) X-Received: by 10.140.84.40 with SMTP id k37mr12263791qgd.33.1449717238641; Wed, 09 Dec 2015 19:13:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.39.204 with HTTP; Wed, 9 Dec 2015 19:13:39 -0800 (PST) From: Shane Wayne Date: Thu, 10 Dec 2015 03:14:00 -0000 Message-ID: Subject: Questions on network and block device related IRQ handling To: systemtap@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00254.txt.bz2 Hi all: I've recently doing some research on network and block device related IRQ handling, so I use some database and network cache application as the testbed. I probed the following probes below: netdev receive netdev transmit netdev hard_transmit ioblock request ioblock end irq_handler.entry irq_handler,exit softirq.entry softirq.exit After the profiling, I notice that, when netdev receive is triggered. It always appears within a softirq, and the softirq has a irq_handler in front of it. It mean the sequence is like: irq_handler.entry irq_handler.exit softirq.entry one or several netdev receive softirq.exit And I found that, the irq could happened in any process, even in my application's context, but in most condition, it was found in swapper process. And when it comes to netdev transmit, it seems that this action do not relate with irq? The sequence just happens in the application context. netdev transmit begin netdev hard_transmit begin netdev hard_transmit end netdev transmit end And it doesn't use irq? So here is my question: 1, it seems that irq_handler from network device just be responsible to notify the package arrival, and the actual handling was done by the following soft irq? 2, the irq handling seems could happen in any process, and do not stop current context, but when the server is not heavily loaded, the irq prefer to happen in swapper process? 3, Or just because the swapper take more cpu time when the server was not heavily loaded? 4, does the netdev send or ioblock request really do not need irq's assistant? 5, if this is true, how could we determine when the netdev transmit finish it's job? is the time of netdev hard_transmit end correct? THX~ -- ------------------------------------------------------------ ZHANG Xiao The Institute of Computer Software Engineering and Theory in Xi'an Jiaotong University Master-and-Doctoral Program Student ACM Student Member CCF Student Member IEEE Computer Society Sister Society Associate Member Xi'an Jiaotong University Bachelor of Engineering in Computer Science and Technology The Chinese University of Hong Kong International Asia Study Program in CS/CE/EE/IE