From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikanth K Subject: Re: [PATCH 07/13] block: avoid indirect calls to enter cfq io scheduler Date: Tue, 26 May 2009 14:32:27 +0530 Message-ID: <807b3a220905260202u11a9a9f8wd1874fce82d6b313@mail.gmail.com> References: <1243236668-3398-1-git-send-email-jens.axboe@oracle.com> <1243236668-3398-14-git-send-email-jens.axboe@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, chris.mason@oracle.com, david@fromorbit.com, hch@infradead.org, akpm@linux-foundation.org, jack@suse.cz, yanmin_zhang@linux.intel.com, Nikanth Karthikesan To: Jens Axboe Return-path: Received: from qw-out-2122.google.com ([74.125.92.24]:2159 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445AbZEZJC1 (ORCPT ); Tue, 26 May 2009 05:02:27 -0400 In-Reply-To: <1243236668-3398-14-git-send-email-jens.axboe@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 25, 2009 at 1:00 PM, Jens Axboe wrote: > > They can be expensive, since CPUs generally do not branch predict > well for them. > Cant gcc take care of this? Comparing a pointer and then calling the function directly without using the pointer! Wont this increase the text size of the kernel and possibly degrade performance? Do you have any measurement of the improvement? Is this kind of optimization being used elsewhere? Thanks Nikanth