From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH] eal: default to one memory channel if not specified Date: Wed, 14 Oct 2015 14:05:00 +0100 Message-ID: <20151014130500.GA4176@bricha3-MOBL3> References: <561E44DB.9000307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" To: Panu Matilainen Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D85EF8D99 for ; Wed, 14 Oct 2015 15:05:04 +0200 (CEST) Content-Disposition: inline In-Reply-To: <561E44DB.9000307@redhat.com> 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 Wed, Oct 14, 2015 at 03:04:43PM +0300, Panu Matilainen wrote: > 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 - I was going to suggest using 4 as the default value, since the channel spreading should work as designed on systems with either 1, 2 or 4 active channels. However, given the zero-check inside the mempool code, maybe the default should be set there instead of in the EAL. [I just don't think the default should be 1.] Anyone else any other thoughts on this? /Bruce