From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id 804F36904 for ; Thu, 14 Feb 2019 10:53:23 +0100 (CET) Received: by mail-vs1-f66.google.com with SMTP id t13so3273234vsk.3 for ; Thu, 14 Feb 2019 01:53:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ApH3/8/65cr++Q5b7F0So/ugodPEm59UC0LKhND262Y=; b=o6rO8+Vcm1/ecTuTnikkvUiegVjaJNALOvlJGRL4UEEpvGuHQ5PnE4489wGs0xSVG2 t1dUUJ1hempUtD8sWDE+GxeAbLj94Agg8yMVzoZDmwEDUHh+0dn/J4i9bm4uPvaUwFCV sVtK1AOV1YzZicJ+r53b4rB8WxPl+yvJ9PVY/KUR+C4EcIAy3o8dpULTrm1UusOLaXQz /5sCTZZKfawqoDNbfWi1eH0x3udiLcqlWNIwaj/MkZK+mMlskOslEw9zJ64wLZCLZrVa B+q0Pu8i4LbzHwxG41GofzgwLQ8ktrsfw3malkSlXygr7pQjhpgawTYgX+RJeygpNsYj 7x3w== X-Gm-Message-State: AHQUAuaqMyjJDWYlH/0f/VZ5x0tiICR3wcDil87HWeq1rarmk5cony2X fG8WTaax/od27ctdIp0/R6d6W/Z6IDgd1CEhmty2WQ== X-Google-Smtp-Source: AHgI3IYqibqh1QRjjcXE7qwHoRJ6sewaQFz0bo2rV/SdYQbXsREaJaoLYZMr1lixKXid+PnomNptMpgwKUj9IW4qRXI= X-Received: by 2002:a67:fe0d:: with SMTP id l13mr1505620vsr.39.1550138002840; Thu, 14 Feb 2019 01:53:22 -0800 (PST) MIME-Version: 1.0 References: <1550074412-31285-1-git-send-email-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Thu, 14 Feb 2019 10:53:11 +0100 Message-ID: To: "Burakov, Anatoly" Cc: dev@dpdk.org, Olivier Matz , Kevin Traynor , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [PATCH] eal: restrict ctrl threads to startup cpu affinity X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 09:53:23 -0000 On Thu, Feb 14, 2019 at 10:39 AM Burakov, Anatoly wrote: > On 13-Feb-19 4:13 PM, David Marchand wrote: > > Spawning the ctrl threads on anything that is not part of the eal > > coremask is not that polite to the rest of the system. > > > > Rather than introduce yet another eal options for this, let's take > > the startup cpu affinity as a reference and remove the eal coremask > > from it. > > If no cpu is left, then we default to the master core. > > > > The cpuset is computed once at init before the original cpu affinity. > > > > Fixes: d651ee4919cd ("eal: set affinity for control threads") > > Signed-off-by: David Marchand > > --- > > Hi David, > > Maybe i didn't have enough coffee today and i'm missing something here, > but how is this different? Removing the coremask cores from the cpuset > will effectively "spawn the ctrl threads on anything that is not part of > the EAL coremask" (which is "not that polite to the rest of the > system"), unless the application was run with taskset. > > Is "taskset" the key point here? I.e. by default, we're still "not > polite", unless the user asks nicely? :) > Eheh, sorry, yes. A bit more context then, if you want to clearly pin cpu resources for the processes on your system (let's say having virtual machines and a popular vswitch), I can only think of two solutions. Either you have something to configure your processes to have them call sched_setaffinity/pthread_set_affinity_np, or you use taskset to get them "jailed" without them caring. Before the incriminated commit, we were keeping all threads on the coremask that had been passed, but as Olivier said, we would end up with ctrl threads spanwed on core running dataplane threads as well. Now, the ctrl threads can be spawned anywhere on all & ~coremask, with no way to configure this. I considered adding a new eal option, but I think relying on the current cpu affinity is a better default behavior and I can't see drawbacks at the moment. -- David Marchand