From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH v2 7/7] dm snapshot: use bufio prefetch Date: Mon, 13 Jan 2014 17:56:52 -0500 Message-ID: <20140113225651.GA1678@redhat.com> References: <20140113213758.GC3268@redhat.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Mikulas Patocka Cc: dm-devel@redhat.com, "Alasdair G. Kergon" List-Id: dm-devel.ids On Mon, Jan 13 2014 at 5:00pm -0500, Mikulas Patocka wrote: > No. > > This changed patch inefficiently loops in bufio_prefetch_chunks for each > buffer that is read. Yeah, I overlooked the importance of preserving prefetch_area (which explains the unlikely you had). But my intent was to make your code less "special"; your if (DM_PREFETCH_CHUNKS) do { } while() code to avoid the extra indentation is pretty ugly. Given your current code, DM_PREFETCH_CHUNKS is always 12 so why not just remove the check?