From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 103385909 for ; Fri, 12 Sep 2014 03:27:13 +0200 (CEST) Received: by mail-pd0-f176.google.com with SMTP id y13so80249pdi.7 for ; Thu, 11 Sep 2014 18:32:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Env6POvS9N2vbZWRGCCpTmkY2j1Dwx3A0ForZ12uTjA=; b=OIUYi9D9fL1oGVNrGOicTJm6Yx6aYgLc5as4cn2eUwZhzJciurPI1gh+ZLP5xzlAtj mvmGHme5kE91OdLhBpp4uXUXc7WzaVb2nuMixHFahDbEgkUaur1lxka/nP3Pi9u9yMQv JhWc2Z45gptPL66jIPVt9aK+O/KBvmHKAR6k2rnFVf/6xRUM+jMFJRQIPtOBWaELPJFI surXhc+tXxtowpue991YEYgGs9jhhKXOmxKKIhk5scbYc7dh3XZcsY/OkqgUy7JoSWrM h4Rk/2wSOzQqx/76EQQPelzYmVusY9Aj3mNZz7EN1oeTF/ZrP+Gow9GDCoWA4ll+Bthn gp6A== X-Gm-Message-State: ALoCoQntxNbBnSvLQQUQZJNTQZfsPSMcVf+O6XiaoGSMhdKCeHTcJ+hO9Q1E7PGZLFnuZ71WoxUU X-Received: by 10.66.244.132 with SMTP id xg4mr3431879pac.64.1410485548505; Thu, 11 Sep 2014 18:32:28 -0700 (PDT) Received: from uryu.home.lan ([67.204.147.58]) by mx.google.com with ESMTPSA id g13sm2283111pat.45.2014.09.11.18.32.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Sep 2014 18:32:28 -0700 (PDT) Date: Thu, 11 Sep 2014 18:24:24 -0700 From: Stephen Hemminger To: Hiroshi Shimamoto Message-ID: <20140911182424.59eb943a@uryu.home.lan> In-Reply-To: <7F861DC0615E0C47A872E6F3C5FCDDBD011AC7A6@BPXM14GP.gisp.nec.co.jp> References: <1410445387-4849-1-git-send-email-bruce.richardson@intel.com> <7F861DC0615E0C47A872E6F3C5FCDDBD011AC7A6@BPXM14GP.gisp.nec.co.jp> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 0/3] eal affinitize low priority threads to lcore 0 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: Fri, 12 Sep 2014 01:27:14 -0000 On Thu, 11 Sep 2014 23:47:52 +0000 Hiroshi Shimamoto wrote: > Hi Bruce, > > > Subject: [dpdk-dev] [PATCH 0/3] eal affinitize low priority threads to lcore 0 > > > > This patchset sets things up so that we can affinitize the interrupt, > > vfio management, and hpet timer management threads to lcore 0, so that > > they never interfere with data plane threads. > > I don't think it works well always. > The management threads can be floating all cpus on demand, because those > threads are created before the master thread affinity is set. The kernel > scheduler will take care of it. And we should isolate cpus which data plane > threads are pinned to, so the management threads cannot run on those isolated > cpus data plane thread run. > In some cases, the user may run data plane thread on lcore 0, but with > this patchset the data plane pinned to lcore 0 always run with the > management threads. That doesn't seem good. > > I think this functionality should be conditional. > How about to add a parameter to specify the mask for the management threads > instead of statically assignment to lcore 0? > > thanks, > Hiroshi > > > > > Bruce Richardson (3): > > eal: add core id param to eal_thread_set_affinity > > eal: increase scope of eal_thread_set_affinity > > eal: affinitize low-priority threads to lcore 0 > > > > lib/librte_eal/bsdapp/eal/eal_thread.c | 12 ++++++------ > > lib/librte_eal/common/include/eal_private.h | 10 ++++++++++ > > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 5 +++++ > > lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 6 ++++++ > > lib/librte_eal/linuxapp/eal/eal_thread.c | 12 ++++++------ > > lib/librte_eal/linuxapp/eal/eal_timer.c | 5 +++++ > > 6 files changed, 38 insertions(+), 12 deletions(-) > > > > -- > > 1.9.3 > We just set the non-master DPDK worker threads to be real time by using pthread_set_scheduler. This works very well and makes it clear to Linux scheduler what the intention is. This also improves wakeup behavior from sleeps.