From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f176.google.com (mail-wj0-f176.google.com [209.85.210.176]) by dpdk.org (Postfix) with ESMTP id 4DF212A66 for ; Thu, 8 Dec 2016 19:19:43 +0100 (CET) Received: by mail-wj0-f176.google.com with SMTP id tk12so100105746wjb.3 for ; Thu, 08 Dec 2016 10:19:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=nCbgSUr3X+fOzy1ek598yk71A2S+iPrH7OUYHgyjfZM=; b=yRgrkVvvT+Cp5M4AgeeN2BD7cWiyBUCYd3bmaMgWJjanvU/lMxb3XqWoTFaIPzmIkA H2PVmHQmiUZzaRLTp0VsI1CnVOP2SseqtIKpV65eQTFv+J3vGlfic6u98y7smtqNNNsm GZTTec7oqEAjLtn7DKnLOnVPaJiqr2Yqc6syvzvp5QAQTw2Vhw6nMU1pLLvgQANp3yZa hjqshB0YrEfQ3HfrrLhwfzPDsUzGjrMJcS5feU8lUvbnbI+l6UJIs4y9Aq1Zhai4r0Y7 gOsR0ikiOM0ZNVcPL62cbklXYbbPPknRBzrZ7a9m/Xy7CkQxvJukVihoKK1tWeMcoYkC SPAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=nCbgSUr3X+fOzy1ek598yk71A2S+iPrH7OUYHgyjfZM=; b=QCu7Kd1sN1TPOwB6oPs3J1nAX88hzIrh21ZpkaMjrPK9ODpctClQaKmUTtH5MIbIGN 3lK92Pp9Hd/faVJv3ZUyK5B8aCMz/TLZdNEZLlFXewpdk2llTKU2MkwTZJSvNu0bM+H8 vIe0xQiNTXeGA76hlKu+2vToBPorzRDVoXk8shlR9HPmDSmk8tCvHBybZTv3qlXbMh6I y3VNGytYHMR5ObUeydim52Bwkj0Dq2RwDu1yPOAnWJn+5abRJZoui2tTHUY811RCyhJ2 KCow17EKDxEyZXmePhYiULu2J+UiIOO+USZgHtbBcjSXGEJ/K4QEopR8CtjXdqwcIx7F 9PAw== X-Gm-Message-State: AKaTC01kv/jI/14xXbcw1WDFA9PMUhIBbG50BCLUMUH4gxlmXYS76W6wcIzOCyKk7+6uECt3 X-Received: by 10.194.178.170 with SMTP id cz10mr64152349wjc.224.1481221183039; Thu, 08 Dec 2016 10:19:43 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id e5sm16547868wma.12.2016.12.08.10.19.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 10:19:42 -0800 (PST) From: Thomas Monjalon To: Jianfeng Tan Cc: dev@dpdk.org, david.marchand@6wind.com, pmatilai@redhat.com, bruce.richardson@intel.com Date: Thu, 08 Dec 2016 19:19:41 +0100 Message-ID: <1697449.uzq8KWsvfF@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1480700936-8450-1-git-send-email-jianfeng.tan@intel.com> References: <1472693507-11369-1-git-send-email-jianfeng.tan@intel.com> <1480700936-8450-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] eal: restrict cores auto detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 18:19:43 -0000 2016-12-02 17:48, Jianfeng Tan: > This patch uses pthread_getaffinity_np() to narrow down used > cores when none of below options is specified: > * coremask (-c) > * corelist (-l) > * and coremap (--lcores) > > The purpose of this patch is to leave out these core related options > when DPDK applications are deployed under container env, so that > users do not need decide the core related parameters when developing > applications. Instead, when applications are deployed in containers, > use cpu-set to constrain which cores can be used inside this container > instance. And DPDK application inside containers just rely on this > auto detect mechanism to start polling threads. > > Note: previously, some users are using isolated CPUs, which could > be excluded by default. Please add commands like taskset to use > those cores. > > Test example: > $ taskset 0xc0000 ./examples/helloworld/build/helloworld -m 1024 Bruce, what do you think of this version? It requires taskset only if -c, -l and --lcores are not used. > static int master_lcore_parsed; > static int mem_parsed; > +static int core_specified; I think it's better to keep the word "parsed" as others.