From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH 11/11] DIO: optimize cache misses in the submission path Date: Mon, 8 Aug 2011 21:32:31 +0200 Message-ID: <20110808193231.GM5782@one.firstfloor.org> References: <1312259893-4548-1-git-send-email-andi@firstfloor.org> <1312259893-4548-12-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andi Kleen , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, Andi Kleen To: Jeff Moyer Return-path: Received: from one.firstfloor.org ([213.235.205.2]:39668 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843Ab1HHTcd (ORCPT ); Mon, 8 Aug 2011 15:32:33 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > I bet we could default to using the smaller block size all the time, and > still be able to detect when we don't have to do the sub-block zeroing. > Maybe that would be a good follow-on patch. It doesn't really matter because it's out of the fast path now. > > + /* > > + * Avoid references to bdev if not absolutely needed to give > > + * the early prefetch in the caller enough time. > > + */ > > > > - if (offset & blocksize_mask) { > > + if (unlikely(offset & blocksize_mask)) { > > You can't make this assumption. Userspace controls what size/alignment > of blocks to send in. What assumption do you mean? The code semantics are identical, just the place where I fetch the block size is different (unless I missed something of course) -Andi -- ak@linux.intel.com -- Speaking for myself only.