From owner-svn-src-all@FreeBSD.ORG Sun Aug 11 12:01:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E83DD59; Sun, 11 Aug 2013 12:01:24 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD422217; Sun, 11 Aug 2013 12:01:23 +0000 (UTC) Received: by mail-ee0-f42.google.com with SMTP id b45so2967168eek.29 for ; Sun, 11 Aug 2013 05:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=M5Hi/hMAl8+m925svgpiXwRYWBDX+KE0Cuv5IMD6bK4=; b=WurDbLdMmZkttzCHcG00DCgPmj+mkobA6CW7haPCeI87JzBU5npybNqnjT0nRzKUJ7 5tRmTJgwrOkc40SpCC2fEl6C/jI2l2sW7ko/7vsCNGpx1GBaRt2SuL6VsecojIvRYLrN z0gsmHuSF6Q7DZtCmX3BRPWXNUEh5LoZPBzLZcE7YtgS6cX17lS3VCE3K93fF+i8yWbI zwxxJ+arGKdzhzUBdrhV6+iH4DSh+i3dJmfgeC9evaEPqI0mlZ78ZNYODWVnnv8FAg2N wUaiNanbCtC4RBfjM6npQQV2Yg0GR8Q1D+1a1JfFZZhBaSbPe4YtETS7HnzPulTbq0/1 U7Hg== X-Received: by 10.15.27.133 with SMTP id p5mr20883443eeu.65.1376222481834; Sun, 11 Aug 2013 05:01:21 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([37.229.21.195]) by mx.google.com with ESMTPSA id f49sm42002038eec.7.2013.08.11.05.01.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 11 Aug 2013 05:01:20 -0700 (PDT) Sender: Alexander Motin Message-ID: <52077D0D.8090607@FreeBSD.org> Date: Sun, 11 Aug 2013 15:01:17 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130616 Thunderbird/17.0.6 MIME-Version: 1.0 To: Scott Long Subject: Re: svn commit: r253460 - head/sys/dev/mps References: <201307190012.r6J0Cg1r027645@svn.freebsd.org> In-Reply-To: <201307190012.r6J0Cg1r027645@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2013 12:01:24 -0000 On 19.07.2013 03:12, Scott Long wrote: > Author: scottl > Date: Fri Jul 19 00:12:41 2013 > New Revision: 253460 > URL: http://svnweb.freebsd.org/changeset/base/253460 > > Log: > Overhaul error, information, and debug logging. > > Obtained from: Netflix > MFC after: 3 days > > Modified: > head/sys/dev/mps/mps.c > head/sys/dev/mps/mps_mapping.c > head/sys/dev/mps/mps_pci.c > head/sys/dev/mps/mps_sas.c > head/sys/dev/mps/mps_sas_lsi.c > head/sys/dev/mps/mps_table.c > head/sys/dev/mps/mps_user.c > head/sys/dev/mps/mpsvar.h This change created significant CPU overhead under high I/O rate (350K IOPS) because several functions inside mpssas_log_command() are now writing into the buffer that is just discarded after that. The following simple patch seems fixes the situation for me: Index: mps_sas.c =================================================================== --- mps_sas.c (revision 254181) +++ mps_sas.c (working copy) @@ -304,7 +304,7 @@ mpssas_log_command(struct mps_command *cm, u_int l char str[192]; char path_str[64]; - if (cm == NULL) + if (cm == NULL || (cm->cm_sc->mps_debug & level) == 0) return; sbuf_new(&sb, str, sizeof(str), 0); -- Alexander Motin