Re: [PATCH 11/11] DIO: optimize cache misses in the submission path

From: Jeff Moyer
Date: Mon Aug 08 2011 - 15:38:33 EST


Andi Kleen <andi@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/