From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 80D558D95 for ; Wed, 14 Oct 2015 14:04:45 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id C23DE19CF71; Wed, 14 Oct 2015 12:04:44 +0000 (UTC) Received: from dhcp195.koti.laiskiainen.org (vpn1-7-71.ams2.redhat.com [10.36.7.71]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9EC4hYh026117; Wed, 14 Oct 2015 08:04:44 -0400 To: David Marchand References: From: Panu Matilainen Message-ID: <561E44DB.9000307@redhat.com> Date: Wed, 14 Oct 2015 15:04:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal: default to one memory channel if not specified X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 12:04:45 -0000 On 10/14/2015 02:45 PM, David Marchand wrote: > Hello Panu, > > On Wed, Oct 14, 2015 at 12:22 PM, Panu Matilainen > wrote: > > Obtaining the correct value, especially from a running system, can > be anything from difficult to plain impossible. Since the value is > merely an optimization and does not affect functionality otherwise, > its pointless to force such a guess on users initially, such things > belong to performance tuning phase. > > Signed-off-by: Panu Matilainen > > --- > lib/librte_eal/common/eal_common_options.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/lib/librte_eal/common/eal_common_options.c > b/lib/librte_eal/common/eal_common_options.c > index 1f459ac..28f10a2 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -104,7 +104,7 @@ eal_reset_internal_config(struct internal_config > *internal_cfg) > > internal_cfg->memory = 0; > internal_cfg->force_nrank = 0; > - internal_cfg->force_nchannel = 0; > + internal_cfg->force_nchannel = 1; > > > Well, not too sure about this default value. > > - mempool code is already checking for the 0 value. Yeah, I noticed it already handles the zero case. > - API already tells for rte_memory_get_nchannel() : > * @return > * The number of memory channels on the system. The value is 0 if > unknown > * or not the same on all devices. ...but missed this one, and thought it'd be "safer" to return some non-zero value since callers might be expecting it to be a valid -n value. > > So, I would let it 0. Right, so just drop the default value, reword commit message accordingly and resend. Will do unless there are other objections. - Panu -