From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B8D8A053A for ; Wed, 5 Aug 2020 15:42:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6B7D1C029; Wed, 5 Aug 2020 15:42:54 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 2D7A72BF2 for ; Wed, 5 Aug 2020 15:42:53 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id c15so4529515wrs.11 for ; Wed, 05 Aug 2020 06:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=reply-to:subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9qPQ3CbyEY88gNzbl3QiduADFQT8LmqNWosaxzpgoxM=; b=QCWBk/moIsdzXpvxQsXvnBqnHEIlLyCI4b1hPz+ICeRFGpaLfw/3BC+0Mf7ne4+/Kl SdKIdOo7n9L9yhcnrzZ1QMrPlcS1XRE0bPade9unYediLZCfev3kHzPnRbJU0gmKHDoF VMwXNEeH+9mTdF6KX2tLi+9nWFJcf4eyg+qtN0AL3CjpBXp7OMs43n+Tdj+Z1ajoWd6L GNHDrNCa3IbU3nALvPBSUxM4gaIcUEINgukwnDeS+vx69t+wNNasiUPX9hwR7q2d/0+T 2Rjyhm8F8XV2u34qzB1kXRQuvq/ojqejoEb2kSnsZz208x0UFuXcL0Qv8ZH+2HnG6jCR WeLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9qPQ3CbyEY88gNzbl3QiduADFQT8LmqNWosaxzpgoxM=; b=av1D4CjMEyZXmbRMm+L3dj3J8avwoP90GcDFTbBtzNEYMGfjKSSjNgBCICkeayi/f5 Avgjtr9q3d6vcu0hMlwRHTtdijaPfkd+EP65xJ4CkMCXhgEl8op4CpCMVEnMs694oacy XKQhnpFuTSHgCK/yuURx0WNGKw1XWvUD3hrCNQlIrGSyr30yY6y04XHIHHvURfXbpryw qsiNaJL4/Pb8VUazWGr0Q7hZzjuJ7lpMvv0T1Peg84fgzVhgxhxGcI16iDypRZ8gH0v1 GXTqBeguAGLUuCjZQc1LO46l2PZfvhvA/Rvc1ZPZNeBHJFjsIj4NIBD/5MpbbXfBVCFT z4mA== X-Gm-Message-State: AOAM533bN+aAQP7oNA1MXZAIx4q53EaBkLnNK2mKPL/0MAXHL/F4hNR4 1l58k00KudmGdLhmrdWsm8p3GNdheYQ= X-Google-Smtp-Source: ABdhPJzRUILSRtNfdK4orf3nSWq4hWLg+cXdzOwKBuyxuX6xg1gau7tl3XzrZYtrGbAx+UkUoNjTqw== X-Received: by 2002:adf:bc54:: with SMTP id a20mr2850442wrh.227.1596634972438; Wed, 05 Aug 2020 06:42:52 -0700 (PDT) Received: from ?IPv6:2a01:e0a:410:bb00:1829:7379:df21:bd9? ([2a01:e0a:410:bb00:1829:7379:df21:bd9]) by smtp.gmail.com with ESMTPSA id w132sm2847440wma.32.2020.08.05.06.42.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Aug 2020 06:42:51 -0700 (PDT) To: Nick Connolly , Anatoly Burakov Cc: dev@dpdk.org, stable@dpdk.org References: <20200805122640.13884-1-nick.connolly@mayadata.io> From: Nicolas Dichtel Organization: 6WIND Message-ID: Date: Wed, 5 Aug 2020 15:42:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200805122640.13884-1-nick.connolly@mayadata.io> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [PATCH] mem: fix allocation failure on non-NUMA kernel X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: nicolas.dichtel@6wind.com List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Le 05/08/2020 à 14:26, Nick Connolly a écrit : > Running dpdk-helloworld on Linux with lib numa present, > but no kernel support for NUMA (CONFIG_NUMA=n) causes > ret_service_init() to fail with EAL: error allocating > rte services array. > > alloc_seg() calls get_mempolicy to verify that the allocation > has happened on the correct socket, but receives ENOSYS from > the kernel and fails the allocation. > > The allocated socket should only be verified if check_numa() is true. > > Fixes: 2a96c88be83e ("mem: ease init in a docker container") I'm wondering if the bug existed before this commit. Before this commit, it was: move_pages(getpid(), 1, &addr, NULL, &cur_socket_id, 0); if (cur_socket_id != socket_id) { /* error */ Isn't it possible to hit this error case if CONFIG_NUMA is unset in the kernel? [snip] > + if (check_numa()) { > + ret = get_mempolicy(&cur_socket_id, NULL, 0, addr, > + MPOL_F_NODE | MPOL_F_ADDR); > + if (ret < 0) { > + RTE_LOG(DEBUG, EAL, "%s(): get_mempolicy: %s\n", > + __func__, strerror(errno)); > + goto mapped; > + } else if (cur_socket_id != socket_id) { > + RTE_LOG(DEBUG, EAL, > + "%s(): allocation happened on wrong socket (wanted %d, got %d)\n", > + __func__, socket_id, cur_socket_id); > + goto mapped; > + } > + } else { > + if (rte_socket_count() > 1) > + RTE_LOG(DEBUG, EAL, "%s(): not checking socket for allocation (wanted %d)\n", > + __func__, socket_id); nit: maybe an higher log level like WARNING? Regards, Nicolas