From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Xu Subject: xen_evtchn_do_upcall Date: Sun, 21 Oct 2012 21:51:34 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4169225456190317963==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============4169225456190317963== Content-Type: multipart/alternative; boundary=047d7b6da0c4e9a59504cc9c1755 --047d7b6da0c4e9a59504cc9c1755 Content-Type: text/plain; charset=ISO-8859-1 Hi, Is anybody know the purpose of this method (xen_evtchn_do_upcall)? When I run a user level application involved in TCP receiving and the SoftIRQ for eth0 on the same CPU core, everything is OK. But if I run them on 2 different cores, there will be xen_evtchn_do_upcall() existing (maybe when the local_bh_disable() or local_bh_enable() is called) in __inet_lookup_established() routine which costs longer time than the first scenario. Is it due to the synchronization issue between process context and softirq context? Thanks for any reply. 1) | __inet_lookup_established() { 1) | xen_evtchn_do_upcall() { 1) 0.054 us | exit_idle(); 1) | irq_enter() { 1) | rcu_irq_enter() { 1) 0.102 us | rcu_exit_nohz(); 1) 0.431 us | } 1) 0.064 us | idle_cpu(); 1) 1.152 us | } 1) | __xen_evtchn_do_upcall() { 1) 0.119 us | irq_to_desc(); 1) | handle_edge_irq() { 1) 0.107 us | _raw_spin_lock(); 1) | ack_dynirq() { 1) | evtchn_from_irq() { 1) | info_for_irq() { 1) | irq_get_irq_data() { 1) 0.052 us | irq_to_desc(); 1) 0.418 us | } 1) 0.782 us | } 1) 1.135 us | } 1) 0.049 us | irq_move_irq(); 1) 1.800 us | } 1) | handle_irq_event() { 1) 0.161 us | _raw_spin_unlock(); 1) | handle_irq_event_percpu() { 1) | xennet_interrupt() { 1) 0.125 us | _raw_spin_lock_irqsave(); 1) | xennet_tx_buf_gc() { 1) 0.079 us | gnttab_query_foreign_access(); 1) 0.050 us | gnttab_end_foreign_access_ref(); 1) 0.069 us | gnttab_release_grant_reference(); 1) | dev_kfree_skb_irq() { 1) 0.055 us | raise_softirq_irqoff(); 1) 0.472 us | } 1) 0.049 us | gnttab_query_foreign_access(); 1) 0.058 us | gnttab_end_foreign_access_ref(); 1) 0.058 us | gnttab_release_grant_reference(); 1) | dev_kfree_skb_irq() { 1) 0.050 us | raise_softirq_irqoff(); 1) 0.456 us | } 1) 3.714 us | } 1) 0.102 us | _raw_spin_unlock_irqrestore(); 1) 4.857 us | } 1) 0.061 us | note_interrupt(); 1) 5.571 us | } 1) 0.054 us | _raw_spin_lock(); 1) 6.707 us | } 1) 0.083 us | _raw_spin_unlock(); 1) + 10.083 us | } 1) + 10.985 us | } 1) | irq_exit() { 1) | rcu_irq_exit() { 1) 0.087 us | rcu_enter_nohz(); 1) 0.429 us | } 1) 0.049 us | idle_cpu(); 1) 1.088 us | } 1) + 14.551 us | } 1) 0.191 us | } /* __inet_lookup_established */ --047d7b6da0c4e9a59504cc9c1755 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=A0

Is anybody know the purpose of this method (xen_e= vtchn_do_upcall)? When I run a user level application involved in TCP recei= ving and the SoftIRQ for eth0 on the same CPU core, everything is OK. But i= f I run them on 2 different cores, there will be xen_evtchn_do_upcall() exi= sting (maybe when the=A0lo= cal_bh_disable() or=A0local_bh_enable() is cal= led) in=A0__inet_lookup_established() routine which costs longer tim= e than the first scenario. Is it due to the synchronization issue between p= rocess context and softirq context? Thanks for any reply.=A0

=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0__inet_= lookup_established() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A0xen_evtchn_do_upcall() {
=A01) =A0 0.054 us =A0 =A0| =A0 =A0 = =A0exit_idle();
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0ir= q_enter() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0rcu_irq_enter() {
=A01) =A0 0.102 us =A0 =A0| =A0 =A0 =A0 =A0 =A0rcu_exit_nohz();
=A01) =A0 0.431 us =A0 =A0| =A0 =A0 =A0 =A0}
=A01) =A0 0.= 064 us =A0 =A0| =A0 =A0 =A0 =A0idle_cpu();
=A01) =A0 1.152 us =A0= =A0| =A0 =A0 =A0}
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0__xen_evtchn_do_upcall(= ) {
=A01) =A0 0.119 us =A0 =A0| =A0 =A0 =A0 =A0irq_to_desc();
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0handle_edge_irq()= {
=A01) =A0 0.107 us =A0 =A0| =A0 =A0 =A0 =A0 =A0_raw_spin_lock(= );
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0ack_dynirq() {<= /div>
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0evtchn= _from_irq() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0= =A0 =A0 =A0info_for_irq() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_get_irq_data() {
=A01) =A0 0.052 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0irq_to_= desc();
=A01) =A0 0.418 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0}
=A01) =A0 0.782 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0}
=A01) =A0 1.135 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0}
=A01)= =A0 0.049 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0irq_move_irq();
=A01) =A0 1.800 us =A0 =A0| =A0 =A0 =A0 =A0 =A0}
=A01) =A0 = =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0handle_irq_event() {
=A01) =A0 0.161 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0_raw_spin_unlock();
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0handle_ir= q_event_percpu() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0xennet_= interrupt() {
=A01) =A0 0.125 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0_raw_spin_lock_irqsave();
=A01) =A0 =A0 =A0 =A0 =A0 =A0 = =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0xennet_tx_buf_gc() {
=A01) = =A0 0.079 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gnttab_query_forei= gn_access();
=A01) =A0 0.050 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gnttab_= end_foreign_access_ref();
=A01) =A0 0.069 us =A0 =A0| =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0gnttab_release_grant_reference();
=A01) = =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dev_kfree_= skb_irq() {
=A01) =A0 0.055 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rai= se_softirq_irqoff();
=A01) =A0 0.472 us =A0 =A0| =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0}
=A01) =A0 0.049 us =A0 =A0| =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0gnttab_query_foreign_access();
=A01) =A0 0.058= us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gnttab_end_foreign_access_r= ef();
=A01) =A0 0.058 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gnttab_= release_grant_reference();
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dev_kfree_skb_irq() {
=A01) = =A0 0.050 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0raise_softirq_= irqoff();
=A01) =A0 0.456 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
=
=A01) =A0 3.714 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
=A01) =A0 0.102 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_raw_spin_unloc= k_irqrestore();
=A01) =A0 4.857 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 = =A0 =A0}
=A01) =A0 0.061 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0note_interrupt();
=A01) =A0 5.571 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0}
=A01= ) =A0 0.054 us =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0_raw_spin_lock();
= =A01) =A0 6.707 us =A0 =A0| =A0 =A0 =A0 =A0 =A0}
=A01) =A0 0.083 = us =A0 =A0| =A0 =A0 =A0 =A0 =A0_raw_spin_unlock();
=A01) + 10.083 us =A0 | =A0 =A0 =A0 =A0}
=A01) + 10.985 us = =A0 | =A0 =A0 =A0}
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 = =A0irq_exit() {
=A01) =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 = =A0rcu_irq_exit() {
=A01) =A0 0.087 us =A0 =A0| =A0 =A0 =A0 =A0 = =A0rcu_enter_nohz();
=A01) =A0 0.429 us =A0 =A0| =A0 =A0 =A0 =A0}
=A01) =A0 0.049= us =A0 =A0| =A0 =A0 =A0 =A0idle_cpu();
=A01) =A0 1.088 us =A0 = =A0| =A0 =A0 =A0}
=A01) + 14.551 us =A0 | =A0 =A0}
=A01= ) =A0 0.191 us =A0 =A0| =A0 =A0} /* __inet_lookup_established */
--047d7b6da0c4e9a59504cc9c1755-- --===============4169225456190317963== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4169225456190317963==--