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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to