[DRBD-cvs] r1510 - in trunk/drbd: . linux

svn at svn.drbd.org svn at svn.drbd.org
Thu Aug 26 16:43:51 CEST 2004


Author: phil
Date: 2004-08-26 16:43:49 +0200 (Thu, 26 Aug 2004)
New Revision: 1510

Modified:
   trunk/drbd/drbd_main.c
   trunk/drbd/linux/drbd_config.h
Log:
Disabled the sendpage() statistics report by default.


Modified: trunk/drbd/drbd_main.c
===================================================================
--- trunk/drbd/drbd_main.c	2004-08-26 14:19:54 UTC (rev 1509)
+++ trunk/drbd/drbd_main.c	2004-08-26 14:43:49 UTC (rev 1510)
@@ -908,6 +908,8 @@
 {
 	int sent,ok;
 	int len   = size;
+
+#ifdef SHOW_SENDPAGE_USAGE
 	unsigned long now = jiffies;
 	static unsigned long total = 0;
 	static unsigned long fallback = 0;
@@ -915,19 +917,16 @@
 
 	/* report statistics every hour,
 	 * if we had at least one fallback.
-	 * XXX remove this statistics again,
-	 * or introduce some set of interessting per device real statistics,
-	 * and report them every hour...
-	 * currently these are global counters only.
 	 */
 	++total;
 	if (fallback && time_before(last_rep+3600*HZ, now)) {
 		last_rep = now;
 		printk(KERN_INFO DEVICE_NAME
-		       ": sendpage() omitted: %lu/%lu "
-		       "[XFS' broken IO requests?]\n", fallback, total);
+		       ": sendpage() omitted: %lu/%lu\n", fallback, total);
 	}
+#endif
 
+
 	spin_lock(&mdev->send_task_lock);
 	mdev->send_task=current;
 	spin_unlock(&mdev->send_task_lock);
@@ -941,9 +940,10 @@
 	if ( (page_count(page) < 1) || PageSlab(page) ) {
 		/* e.g. XFS meta- & log-data is in slab pages, which have a
 		 * page_count of 0 and/or have PageSlab() set...
-		 * FIXME: This is a workaround.
 		 */
+#ifdef SHOW_SENDPAGE_USAGE
 		++fallback;
+#endif
 		sent =  _drbd_no_send_page(mdev, page, offset, size);
 		if (likely(sent > 0)) len -= sent;
 		goto out;

Modified: trunk/drbd/linux/drbd_config.h
===================================================================
--- trunk/drbd/linux/drbd_config.h	2004-08-26 14:19:54 UTC (rev 1509)
+++ trunk/drbd/linux/drbd_config.h	2004-08-26 14:43:49 UTC (rev 1510)
@@ -63,4 +63,7 @@
 // don't enable this, unless you can cope with gigabyte syslogs :)
 //#define DUMP_EACH_PACKET
 
+// Dump every hour the usage / not usage of zero copy IO 
+//#define SHOW_SENDPAGE_USAGE
+
 #endif



More information about the drbd-cvs mailing list