Skip to contentSkip to conversation

reduce blk queue and I/O capability printk to KERN_DEBUG?

DISCUSSION Matt Domsch 2 participants 4 messages Apr 30, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

Jens,

Any reason why this message isn't being printed at KERN_DEBUG or thereabouts, as the comment immediately before it notes it's for debugging purposes, and it's only interesting to kernel developers not end users?

Thanks,
Matt

Signature · 17 lines
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

===== drivers/block/ll_rw_blk.c 1.244 vs edited =====
--- 1.244/drivers/block/ll_rw_blk.c	Tue Apr 27 08:11:32 2004
+++ edited/drivers/block/ll_rw_blk.c	Fri Apr 30 14:46:57 2004
@@ -284,7 +284,7 @@
 	 * keep this for debugging for now...
 	 */
 	if (dma_addr != BLK_BOUNCE_HIGH && q != last_q) {
-		printk("blk: queue %p, ", q);
+		printk(KERN_DEBUG "blk: queue %p, ", q);
 		if (dma_addr == BLK_BOUNCE_ANY)
 			printk("no I/O memory limit\n");
 		else
#1 lore raw
Quoted 20 lines · Matt Domsch

Jens,

Any reason why this message isn't being printed at KERN_DEBUG or thereabouts, as the comment immediately before it notes it's for debugging purposes, and it's only interesting to kernel developers not end users?

Thanks,
Matt

Signature · 6 lines
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

===== drivers/block/ll_rw_blk.c 1.244 vs edited =====

drivers/block/ll_rw_blk.c line 290

Quoted 8 lines
drivers/block/ll_rw_blk.c +1 -1
@@ -284,7 +284,7 @@
 	 * keep this for debugging for now...
 	 */
 	if (dma_addr != BLK_BOUNCE_HIGH && q != last_q) {
-		printk("blk: queue %p, ", q);
+		printk(KERN_DEBUG "blk: queue %p, ", q);
 		if (dma_addr == BLK_BOUNCE_ANY)
 			printk("no I/O memory limit\n");
 		else

It should just be deleted. As you note, it is a debug message. I originally added it so we would have some clues as to dma capability for bug reports. There never was any, the check can go :)

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 3 lines · Jens Axboe

It should just be deleted. As you note, it is a debug message. I originally added it so we would have some clues as to dma capability for bug reports. There never was any, the check can go :)

OK, please ack the below for Andrew then.

Remove blk: queue xxxx I/O limit xxxx messages printed by all block devices

This was a debug message and is no longer needed.

===== drivers/block/ll_rw_blk.c 1.244 vs edited =====

drivers/block/ll_rw_blk.c +0 -11
@@ -280,17 +280,6 @@
 	} else
 		q->bounce_gfp = GFP_NOIO;
 
-	/*
-	 * keep this for debugging for now...
-	 */
-	if (dma_addr != BLK_BOUNCE_HIGH && q != last_q) {
-		printk("blk: queue %p, ", q);
-		if (dma_addr == BLK_BOUNCE_ANY)
-			printk("no I/O memory limit\n");
-		else
-			printk("I/O limit %luMb (mask 0x%Lx)\n", mb, (long long) dma_addr);
-	}
-
 	q->bounce_pfn = bounce_pfn;
 	last_q = q;
 }
Signature · 4 lines
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#3 lore raw
Quoted 4 lines · Matt Domsch
Quoted 3 lines · Jens Axboe

It should just be deleted. As you note, it is a debug message. I originally added it so we would have some clues as to dma capability for bug reports. There never was any, the check can go :)

Second try, let's remove the unused variables.

Please ack the below for Andrew then.
Likewise for 2.4 please?

Remove blk: queue xxxx I/O limit xxxx messages printed by all block devices

This was a debug message and is no longer needed.

===== drivers/block/ll_rw_blk.c 1.244 vs edited =====

drivers/block/ll_rw_blk.c +0 -14
@@ -265,8 +265,6 @@
 void blk_queue_bounce_limit(request_queue_t *q, u64 dma_addr)
 {
 	unsigned long bounce_pfn = dma_addr >> PAGE_SHIFT;
-	unsigned long mb = dma_addr >> 20;
-	static request_queue_t *last_q;
 
 	/*
 	 * set appropriate bounce gfp mask -- unfortunately we don't have a
@@ -280,19 +278,7 @@
 	} else
 		q->bounce_gfp = GFP_NOIO;
 
-	/*
-	 * keep this for debugging for now...
-	 */
-	if (dma_addr != BLK_BOUNCE_HIGH && q != last_q) {
-		printk("blk: queue %p, ", q);
-		if (dma_addr == BLK_BOUNCE_ANY)
-			printk("no I/O memory limit\n");
-		else
-			printk("I/O limit %luMb (mask 0x%Lx)\n", mb, (long long) dma_addr);
-	}
-
 	q->bounce_pfn = bounce_pfn;
-	last_q = q;
 }
 
 EXPORT_SYMBOL(blk_queue_bounce_limit);