From owner-freebsd-mips@freebsd.org Sat Oct 31 12:52:18 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 0B001A2145A for ; Sat, 31 Oct 2015 12:52:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (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 CC3511C8C for ; Sat, 31 Oct 2015 12:52:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igpw7 with SMTP id w7so25643164igp.1 for ; Sat, 31 Oct 2015 05:52:17 -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=NEqFZLH9l02T9cNKo5tfNqao8OvxdM1SPneljDAgumo=; b=NKCaVFXFIJM2f5joIxMxZWp0EJWv6laootPQFhLdFMbzpI+f5T7RblA6a759KjEWQ5 n/voGFD1T2nJENdpZeyHTXi0Lz8rY2NEUpJ499joNwtIfYw/TpDUBCW3UR52C7T3h3mG KXB/58OhA5cKkVHRLH6Xvf7afRG4uFD/7SMDF9CfFSvVBXAwqJWrWlBKzxrJ8OLbWHvJ vyhgn5NRidTeSTDir/PeDUNR7Gc5UjH83C/ERTWy8nzsJBEvBOflYlN+KR77t79duoVe paufwpIfvx70VMhTn7KnNQEnR/C37tUKmbXPcWsbRh/n7f1zhzgl2cf31mxDrP02OLRb B+4A== MIME-Version: 1.0 X-Received: by 10.50.155.41 with SMTP id vt9mr2899862igb.22.1446295937150; Sat, 31 Oct 2015 05:52:17 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Sat, 31 Oct 2015 05:52:17 -0700 (PDT) In-Reply-To: <56348239.3050701@grosbein.net> References: <56348063.3090508@grosbein.net> <56348239.3050701@grosbein.net> Date: Sat, 31 Oct 2015 08:52:17 -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 12:52:18 -0000 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. I haven't tried with fastforward. What else are you doing? pf? ipfw? -adrian On 31 October 2015 at 04:56, Eugene Grosbein wrote: > On 31.10.2015 15:48, Eugene Grosbein wrote: >> Hi! >> >> I'm trying to get familiar with PMC and uncover reason of MIPS32 >> CPU being underloaded - about 50% - while performing traffic forwarding. >> >> It seems, kernel code abuses DELAY function as "pmcstat -S instructions -T" shows: > > [skip] > >> And why so heavy usage of _libmd_SHA256_Transf ? > > Well, it seems to be kern.random.harvest is guity for SHA256 abuse. > I've set sysctl kern.random.harvest.mask=0 and now it' gone: > > PMC: [INSTR_EXECUTED] Samples: 7490 (100.0%) , 0 unresolved > > %SAMP IMAGE FUNCTION CALLERS > 4.6 kernel ip_fastforward > 4.5 kernel memcpy > 4.4 kernel DELAY > 3.9 kernel arge_start_locked > 3.8 kernel _bus_dmamap_load_buf > 3.2 kernel ether_nh_input > 3.1 kernel if_inc_counter > 3.0 kernel arge_intr > 3.0 kernel ether_output > 2.9 kernel _bus_dmamap_sync > 2.6 kernel bzero > 2.6 kernel critical_enter > 2.4 kernel critical_exit > 2.3 kernel bus_dmamap_sync_buf > 2.2 kernel _rw_runlock_cookie > 2.1 kernel rn_match > 1.9 kernel __rw_rlock > 1.7 kernel netisr_dispatch_src > 1.5 kernel spinlock_exit > 1.5 kernel uma_zalloc_arg > 1.5 kernel generic_bs_barrier > 1.4 kernel _bus_dmamap_load_mbu > 1.4 kernel arge_newbuf > 1.4 kernel _rm_rlock > 1.4 kernel m_adj > 1.4 libpmc.so. pmclog_read > 1.4 kernel mipsNN_pdcache_wb_ra > 1.4 kernel arpresolve > 1.3 kernel bcmp > 1.3 kernel ether_demux > 1.3 kernel mipsNN_pdcache_inv_r > 1.3 kernel _bus_dmamap_unload > 1.2 kernel uma_zfree_arg > 1.2 kernel if_transmit > 1.2 kernel bus_dmamap_load_mbuf > 1.1 kernel _rm_runlock > 1.0 kernel rtfree > CONVERSION STATISTICS:oc1_fib > #exec/elf 1 > #samples/total 102761 > #samples/unknown-function 2939 > #callchain/dubious-frames 23 > > Still too many of DELAYs. > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"