public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH  2.6.19] Adding branch to remove possible unnecessary inst
@ 2006-12-31  6:03 yc_zhou
  2007-01-02  8:32 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: yc_zhou @ 2006-12-31  6:03 UTC (permalink / raw)
  To: axboe, linux-kernel, axboe

Function blk_queue_bounce_limit using dma flag to determine whether
assigned a certain value for member of request_queue_t. But the
assignment is unconditionally after the flag is set. It introduce
possible unnecessary instructions.


Signed-Off-By: Yingchao Zhou <yc_zhou@ncic.ac.cn>

---
--- linux-2.6.19/block/ll_rw_blk.c.orig 2006-12-31 13:35:22.307742904 +0800
+++ linux-2.6.19/block/ll_rw_blk.c 2006-12-31 13:34:05.032490528 +0800
@@ -606,11 +606,13 @@ void blk_queue_bounce_limit(request_queu
know of a way to test this here. */
if (bounce_pfn < (min_t(u64,0xffffffff,BLK_BOUNCE_HIGH) >> PAGE_SHIFT))
dma = 1;
- q->bounce_pfn = max_low_pfn;
+ else
+ q->bounce_pfn = max_low_pfn;
#else
if (bounce_pfn < blk_max_low_pfn)
dma = 1;
- q->bounce_pfn = bounce_pfn;
+ else
+ q->bounce_pfn = bounce_pfn;
#endif
if (dma) {
init_emergency_isa_pool();


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH  2.6.19] Adding branch to remove possible unnecessary inst
  2006-12-31  6:03 [PATCH 2.6.19] Adding branch to remove possible unnecessary inst yc_zhou
@ 2007-01-02  8:32 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2007-01-02  8:32 UTC (permalink / raw)
  To: yc_zhou; +Cc: linux-kernel

On Sun, Dec 31 2006, yc_zhou wrote:
> Function blk_queue_bounce_limit using dma flag to determine whether
> assigned a certain value for member of request_queue_t. But the
> assignment is unconditionally after the flag is set. It introduce
> possible unnecessary instructions.

Your patch is white space damaged, it makes it hard to read and
impossible to apply.

Note that blk_queue_bounce_limit() is an initialization function, so not
much gained from optimizing on that.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-02  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-31  6:03 [PATCH 2.6.19] Adding branch to remove possible unnecessary inst yc_zhou
2007-01-02  8:32 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox