From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Boldin Subject: Re: [PATCH v4 1/5] vhost: eventfd_link: moving ioctl to a function Date: Mon, 18 May 2015 12:16:32 +0300 Message-ID: References: <1427123731-15654-1-git-send-email-pboldin@mirantis.com> <1427994080-10163-1-git-send-email-pboldin@mirantis.com> <1427994080-10163-2-git-send-email-pboldin@mirantis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" To: "Xie, Huawei" Return-path: Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id EAE9A9A8F for ; Mon, 18 May 2015 11:16:32 +0200 (CEST) Received: by wgfl8 with SMTP id l8so28250193wgf.2 for ; Mon, 18 May 2015 02:16:32 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, May 18, 2015 at 9:06 AM, Xie, Huawei wrote: > On 5/7/2015 9:17 PM, Pavel Boldin wrote: > > > On Thu, May 7, 2015 at 10:57 AM, Xie, Huawei huawei.xie@intel.com>> wrote: > On 4/3/2015 1:02 AM, Pavel Boldin wrote: > > Move ioctl `EVENTFD_COPY' handler code to an inline function. > Pavel: > There is no necessity to inline this function. > Xie, there is even no necessity to split this in a five piece patchseries. > I did that solely for the purpose of clean reading. > > There is no necessity to inline any single-used functions as long the > compiler is decent. But I prefer to instruct compiler to do this explictly > so there is no call/ret path in the generated code. > > The purpose of inline or not is not for friendly reading. inline is for > performance only. > Well, an optimizing compiler `inline's all the `static' functions that are called only once in the file. So, this `inline' is purely for readability of the code. This makes user aware that the function will be `inline'd anyway. Pavel > > > > /huawei > > >