From owner-freebsd-mips@freebsd.org Sat Oct 31 18:11:35 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7FEBA1B225 for ; Sat, 31 Oct 2015 18:11:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 905D814E1 for ; Sat, 31 Oct 2015 18:11:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igdg1 with SMTP id g1so32500395igd.1 for ; Sat, 31 Oct 2015 11:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FVv7odk/RcnvW5MtbE06G7P/gUlep3xKRO5NE4tLjqg=; b=tiKmV1nfvTt+gwowiE3ItXBQkX8xQ70slY/q151HnYEKSHeuq+0b/RT6bqrgdWUEcr Uyeqg8skMN4NBnDPlBaABK/tXuMcvtKs/vZ1d6CVhsxiEZohumOSIV4wJ7I6/55AV2S/ 5HMaLm+trGArTRKXNKZ/D3T+IfbWGDy5r8i0HeajwNsT4ac+opAW3udfzlf/jplZs7Te iiQOdXG3hSH5P37R5HcN07ua4Q5B2bxgDlN9xuxiYE+vg3koBWOCK4MWkDwT/ZnnTnOl /pt6UkmymBfrcB9U0mCdmJPr7nM00Fftyn7m++helbcyddg+1k1SqMMhVCl5wTFlXqL+ O99w== MIME-Version: 1.0 X-Received: by 10.50.79.232 with SMTP id m8mr4062386igx.22.1446315094858; Sat, 31 Oct 2015 11:11:34 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Sat, 31 Oct 2015 11:11:34 -0700 (PDT) In-Reply-To: <563500FC.8020201@grosbein.net> References: <56348063.3090508@grosbein.net> <56348239.3050701@grosbein.net> <563500FC.8020201@grosbein.net> Date: Sat, 31 Oct 2015 14:11:34 -0400 Message-ID: Subject: Re: CPU underload From: Adrian Chadd To: Eugene Grosbein Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2015 18:11:35 -0000 Hi, I don't see any DELAY in my testing, nor MipsUserIntr, so yeah, I must be doing something different. I am testing on QCA9558, not AR9344 though. My AR9344 isn't with me atm. Just run 'top'; what's showing? Are there other processes running? Is devd doing something stupid? Does 'dmesg' show the switch ports flapping or something? My CPU is definitely pegged during these tests. Since yours isn't then yeah, something odd is going on. Can you post the output of 'vmstat 1' whilst you're running your tests? -adrian On 31 October 2015 at 13:57, Eugene Grosbein wrote: > On 31.10.2015 19:52, Adrian Chadd wrote: >> hi, >> >> there's a mips callchain kernel option. Sorry, I'm on my mac atm so I >> can't tell you. look in sys/conf/options for callchain, callgraph, >> etc. It's a build option. >> >> Just rebuild your kernel with that and check. > > Please tell me how do you test bridging performance. > I've tried to test inter-vlan bridging using FTP transit traffic > and it is still not very fast, although a bit faster than forwarding: > 37MByte/s according to systat -ifstat. > > The system still has half of CPU cycles idle and > "if_inc_counter" has surprisingly high counters: > > PMC: [INSTR_EXECUTED] Samples: 5181 (100.0%) , 447 unresolved > > %SAMP IMAGE FUNCTION CALLERS > 9.1 kernel MipsUserIntr > 7.6 kernel if_inc_counter vlan_transmit:1.8 ether_nh_input:1.1 arge_tx_locked:0.6 if_transmit:0.5 > 5.2 kernel DELAY > 4.2 kernel ether_nh_input netisr_dispatch_src > 4.1 kernel _bus_dmamap_load_buf _bus_dmamap_load_mbuf_sg > 3.9 kernel arge_start_locked arge_start > 3.4 kernel _bus_dmamap_sync arge_start_locked:1.2 arge_newbuf:0.9 arge_rx_locked:0.8 > 3.1 kernel memcpy > 2.8 kernel critical_exit if_inc_counter > 2.5 kernel critical_enter > 2.0 kernel arge_newbuf arge_rx_locked > 2.0 kernel bus_dmamap_sync_buf > 1.8 kernel netisr_dispatch_src netisr_dispatch > 1.8 kernel _bus_dmamap_load_mbu bus_dmamap_load_mbuf_sg > 1.7 kernel vlan_transmit > 1.6 kernel bus_dmamap_load_mbuf arge_newbuf:1.0 arge_start_locked:0.6 > 1.5 kernel arge_rx_locked arge_intr > 1.5 kernel mipsNN_pdcache_inv_r > 1.5 kernel generic_bs_barrier > 1.5 kernel _bus_dmamap_unload arge_tx_locked:0.8 arge_newbuf:0.7 > 1.5 kernel arge_tx_locked arge_intr > 1.4 kernel bzero > 1.4 kernel mb_ctor_pack uma_zalloc_arg > 1.4 libc.so.7 bsearch pmcstat_symbol_search > 1.4 kernel if_transmit vlan_transmit > 1.3 kernel memcmp > 1.2 libpmc.so. pmclog_read pmcstat_process_log > 1.2 kernel vlan_input ether_demux > 1.2 kernel mipsNN_pdcache_wb_ra > 1.2 kernel arge_start if_start > 1.2 kernel m_adj arge_newbuf > 1.1 kernel _rm_rlock vlan_input > 1.0 kernel uma_zalloc_arg arge_newbuf > 0.9 kernel trap MipsUserGenException > 0.9 kernel ar934x_chip_ddr_flus arge_flush_ddr > 0.9 kernel _bus_dmamap_addseg > 0.8 kernel uma_zfree_arg mb_free_ext > 0.8 kernel m_freem arge_tx_locked > CONVERSION STATISTICS:unlock vlan_input > #samples/total 179577 > #samples/unknown-function 5253 > #callchain/dubious-frames 17747 >