From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E483543F4E; Tue, 30 Apr 2024 02:50:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E869402A8; Tue, 30 Apr 2024 02:50:01 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 631B840262 for ; Tue, 30 Apr 2024 02:50:00 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1ec41d82b8bso530295ad.2 for ; Mon, 29 Apr 2024 17:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714438199; x=1715042999; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:to:from:date:from:to:cc:subject:date:message-id :reply-to; bh=uw8ZVoxt12R8TYcJX1E++3p4eAHiq5gBWBD2iICI57w=; b=pP0bk2lzMRr2j28B3jF2LnaPH3oKCCESlnE9XBS6cG+geJprUH3t95rB/v8U3PNuy6 QB3RkCIpyOjl4IYs0Dkb+jWiH5nj0woJQNNWHyOoe6Vz50P8GZOeXnNxubbVVMMusWyr fBZ5BLjkH43bkUd2c4e/4d3KzUJYyonvCPzt6la+O6RjQjaFlr3m4pvNkLL6i50G1TQF VL46QmgmtuiBSXaIeefbr1KM5pBZrqgKXCQxRrOV4lXgFyXc/SG8j21lx7txPQP7aFqX Ox1v8gjwe46EdgwbMQgOel9Q3V8UVWoP75vzJN07prYjUv2a3kPRwXa7dTMlj7VKEN7L t1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714438199; x=1715042999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uw8ZVoxt12R8TYcJX1E++3p4eAHiq5gBWBD2iICI57w=; b=kckCNWNO4n/m+K85vyZiGPdxyRo7D/jPAlEeC5+OARxrpkBFU1SpTZzqugGtXH0M3/ y9OdSdVphXQjxlfO94g3dXwbNq7nSB6HTyT0xM3n6bsaBOfjwqcmwPiQpL7fybt9v/6y bdbHTeM+q3zxia7FXImzz+5AFCbH43oYK+je78GSurZe3rSjJ1/kOqSlHqQI9twx00hl +GKunGnOvzxyY3qEH/1Rz1hxFv9quyV1ioWfr5iUqIukfHJ++aqrZI33dV07N0NmGI7i Nv7QCEsswDnddQOe8AjFlFNRJ1febeTTf8WkPEMAU3vGUISL1n7cJofVYw2rpJVGFqmv PxSQ== X-Gm-Message-State: AOJu0YyVFk0o6dEFvQwKcwXGTqz9OqRcoIlWjilGQ/vc/htqSt1+cYBF YVdFY+yORbN8ru46YfclJvx2GKuG1LSi7iu5Ts9iszbNTG4W6AqF5zkSzbAkcHVxc2YM5TZovc8 h8cI= X-Google-Smtp-Source: AGHT+IHtmJSqPa/I3lyx6Ith1SaEPujpZIPBtAs+UfcrETGFwQt5pYpK26hgffMnt86XBIxe8/wPgg== X-Received: by 2002:a17:903:18d:b0:1eb:f263:d2fc with SMTP id z13-20020a170903018d00b001ebf263d2fcmr3675143plg.54.1714438199374; Mon, 29 Apr 2024 17:49:59 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id t2-20020a170902a5c200b001e26d572f9esm20944482plq.242.2024.04.29.17.49.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 17:49:59 -0700 (PDT) Date: Mon, 29 Apr 2024 17:49:57 -0700 From: Stephen Hemminger To: dev@dpdk.org Subject: Re: [RFC] eal: make lcore_init aware of cgroup Message-ID: <20240429174957.2d218da6@hermes.local> In-Reply-To: <20240429195342.42711-1-stephen@networkplumber.org> References: <20240429195342.42711-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, 29 Apr 2024 12:52:25 -0700 Stephen Hemminger wrote: > Some lcores maybe restricted from being used by DPDK by cgroups. > This should be detected at startup and only those cpu's allowed > to be used by the process should be marked as enabled. > > This is a lightly tested patch, and parsing the cpuset info here > probably needs more checking. It is a response to the problem > reported with error handling. > > Signed-off-by: Stephen Hemminger This won't work right because Cpus_allowed reflects the state of the current affinity mask, which might be reduced for the case of process spawned by another. It shows up as test failure for when EAL main thread (with affinity to cpu 0) spawns another process as a test. The test inherits the affinity of 0 and cpus_allowed is 1 (vs all cpus ff). Need to find a better way to read the cgroup allowed cpus list for case where process is running with restricted cpus.