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 F3CD1A053A; Wed, 5 Aug 2020 15:42:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 960B72C23; Wed, 5 Aug 2020 15:42:53 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id B7D402BF2 for ; Wed, 5 Aug 2020 15:42:52 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id a5so30791062wrm.6 for ; Wed, 05 Aug 2020 06:42:52 -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=ec7SCx0tP4Uj/lNHJAAKiZN+qcfBxTMvEevWb3isZYwHfGYrhdUOkrJwbw9wRcE1Wh w9MpFAsDFlNojmyKuGOV2lhWfHOl8EjtMAkiwON41HDi7Z9CBQ5uTHBsDfEVCFboRPfb 0xd6f8Z4cdep9QIrjyHr5CXcx5NozIGf8tkiUxFQZ5JgxU+hiZErI0MFRt08q+5o61eQ HapPXCCPL2WRnEDE2wGhFA+l8NbMRUwT68LyeMjwbOPDpASqt/xurCf9WoNeV1+xdYRL IdaTHybQG8hwtsZSugukOix2qAQf0Q2MpOuGSIYnI6I7Mt0IbJXjLFL6oDMxWOBoebA2 Z1Bg== X-Gm-Message-State: AOAM5329kOFZPoU6NQuUPCFtB4/yGDNESVRpaXw6ibaUEF05cHHeSO4Q 0ANXBqNwwo4wOsD2RAi7b9O8FQ== 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-dev] [PATCH] mem: fix allocation failure on non-NUMA kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: nicolas.dichtel@6wind.com List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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