From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 11/11] DIO: optimize cache misses in the submission path Date: Mon, 08 Aug 2011 15:38:03 -0400 Message-ID: References: <1312259893-4548-1-git-send-email-andi@firstfloor.org> <1312259893-4548-12-git-send-email-andi@firstfloor.org> <20110808193231.GM5782@one.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, Andi Kleen To: Andi Kleen Return-path: In-Reply-To: <20110808193231.GM5782@one.firstfloor.org> (Andi Kleen's message of "Mon, 8 Aug 2011 21:32:31 +0200") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Andi Kleen writes: >> 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? Sorry, I meant that we don't know whether the offset & blocksize_mask check is unlikely. Cheers, Jeff