From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Kleikamp Subject: Re: [PATCH v4 09/31] dio: create a dio_aligned() helper function Date: Mon, 03 Dec 2012 21:55:45 -0600 Message-ID: <50BD7441.7010502@oracle.com> References: <50BD2283.2080809@oracle.com> <50BD6C3E.8020809@oracle.com> <20121204033948.GC16230@one.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hch@infradead.org, linux-fsdevel@vger.kernel.org To: Andi Kleen Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:35737 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393Ab2LDDzz (ORCPT ); Mon, 3 Dec 2012 22:55:55 -0500 In-Reply-To: <20121204033948.GC16230@one.firstfloor.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 12/03/2012 09:39 PM, Andi Kleen wrote: > On Mon, Dec 03, 2012 at 09:21:34PM -0600, Dave Kleikamp wrote: >> I'm not sure what's preferable here. As the comment states, the code is >> making an effort to avoid a cache miss by avoiding the reference to bdev >> when possible. If this micro-optimization is worth keeping, then it's a >> question of which is uglier, this new function that modifies blkbits, or >> duplicating this bit of code three times. > > The optimization was a quite measurable win on a large OLTP benchmark. > I think it's worth keeping. Thanks. I think I'll just drop that patch and add a third instance of that code snippet in the later one. The simpler I can keep the patchset, the better. Someone can clean it up later if they have a better idea. Shaggy