From mboxrd@z Thu Jan 1 00:00:00 1970 From: Malahal Naineni Subject: Re: [PATCH] block: set the bounce_pfn to the actual DMA limit rather than to max memory Date: Fri, 24 Sep 2010 12:20:59 -0700 Message-ID: <20100924192059.GA550@us.ibm.com> References: <4C9CAE68.4060706@fusionio.com> <20100924170532.GA29071@us.ibm.com> <4C9CEDE5.902@fusionio.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4C9CEDE5.902@fusionio.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Jens Axboe Cc: "dm-devel@redhat.com" , "linux-scsi@vger.kernel.org" List-Id: linux-scsi@vger.kernel.org Jens Axboe [jaxboe@fusionio.com] wrote: > > This patch also _fixed_ our problem. So we are fine with either patch, > > but this patch is preferred as it enables more request merges. Also, > > both patches maybe needed for some configurations. > > Plus it doesn't needlessly bounce, that's the real problem you want to > fix. I have applied this thread patch to for-2.6.37/core, thanks. There is a shortcut check in blk_queue_bounce() that uses blk_max_pfn to return without doing anything. blk_max_pfn is not updated when we do hot-plug memory add, so bounce buffers are NOT really used in our case (thankfully)! Here is the code that may need some fix in future: if (!(q->limits.bounce_gfp & GFP_DMA)) { if (queue_bounce_pfn(q) >= blk_max_pfn) return; Thank you so much for applying this patch. Thanks, Malahal.