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 CDDEE43FEE for ; Fri, 10 May 2024 11:33:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90B14402C4; Fri, 10 May 2024 11:33:27 +0200 (CEST) Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by mails.dpdk.org (Postfix) with ESMTP id ABDB2402BB for ; Fri, 10 May 2024 11:33:26 +0200 (CEST) Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a59ad344f7dso376087566b.0 for ; Fri, 10 May 2024 02:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715333606; x=1715938406; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=WEC4FiorRQcktpK7jhNImQP+Emz6VsTZ/yE6CmHOV64=; b=jXS4nXEkJXh4MtL4YfJVCufaqs8RD+SqoWwixpSyV0WgcxD5kdpnDruaDJIf6kjWJp W30M68H5QM+4mxDOCBvP6qpWax68c3L4+tSg1KsPL6VBZhFlr8cL0fRnQ7o1SQ4osdq9 auf0YdSkXzKOEhP5RCbyX+ExPouIa6W5Og7YPqeepBeMz7oU3+DSB6qumKWKLDKiKjMw lfrQQ3Uj4Xk0dO4MA8UDDNDlqflJzoDr/+cpfKWGFmV+TLxB9WDbTJ5ub2o9VCBxEp9B eecQOsBZ/okjH9OdgjQfsR/LI0Fxq61wUc/VItL4xvwifb0hNl6BSpv7kVR0xMdgk4IB jSPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715333606; x=1715938406; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WEC4FiorRQcktpK7jhNImQP+Emz6VsTZ/yE6CmHOV64=; b=doBYLhLPS1icTPeC8ZpHRv0PUhGzf7ttpYtXiGhpqwmxxFgHMEh8j5gv+QMI23XUiR 9SEeI7mZm9Mq8HWGbbqOdsVryBntFbT6McFfhjqY755jJVfZ29MKlNapjjMXiPJfWkch PG5MTQfXkbf88Tpz10MWP8EMLUlEhtf6EcIVUhwzu3nevmiQo8KC5hi5GQvlHUyZ0Typ KMyd4/u5QX3sCBGl4PTk6hPaF0IAI8MWTxRnbE34CsMICyd15+Iozdn/Zt1uwd1NSBpa kng1z+0wbyRX0RVRRWEkDM9H/9NA2c0FJVEiAjxTgpZk7XUUpZsUTjCkoORo20b9Zg9R L8RA== X-Gm-Message-State: AOJu0YzDfflJfTesuDNHcE7kxD9PP1oSzh2GzbHXOL36EYa+xsHUwE3N 5FsccY7hQ+X3s9LimB8FmstaW9SyGKqn7EFFqxHnRNnSj/JH/eRvK8VEynhyg2/Fns0JbGR3S95 VgpLX2nyX748UqzLuaWNrxCxDseytYvylad440Q== X-Google-Smtp-Source: AGHT+IEviLzLazZ8fWuTvURSxAGgon5W/xFkKzovKQpKr2h7qTzOKXny+V7TB+9h0Y1VmS5MI0Dp1aTN7Q0ze8lwtO0= X-Received: by 2002:a17:907:7755:b0:a59:bdb0:e9eb with SMTP id a640c23a62f3a-a5a2d680e14mr121757966b.77.1715333605960; Fri, 10 May 2024 02:33:25 -0700 (PDT) MIME-Version: 1.0 From: Antonio Di Bacco Date: Fri, 10 May 2024 11:33:15 +0200 Message-ID: Subject: Failure while allocating 1GB hugepages To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org I have 16 hugepages available per NUMA on a 4 NUMA system: [user@node-1 hugepages]$ cat /sys/devices/system/node/*/hugepages/hugepages-1048576kB/free_hugepages 16 16 16 16 Using the following program with dpdk 21.11, sometimes I can allocate a few pages but most of the time I cannot. I tried also to remove rtemap_* under /dev/hugepages. rte_memzone_reserve_aligned is always supposed to use a new page? #include #include #include #include #include int main(int argc, char **argv) { const struct rte_memzone *mz; int ret; printf("pid: %d\n", getpid()); // Initialize EAL ret = rte_eal_init(argc, argv); if (ret < 0) { fprintf(stderr, "Error with EAL initialization\n"); return -1; } for (int socket = 0; socket < 4; socket++) { for (int i = 0; i < 16; i++) { // Allocate memory using rte_memzone_reserve_aligned char name[32]; sprintf(name, "my_memzone%d-%d", i, socket); mz = rte_memzone_reserve_aligned(name, 1ULL << 30, socket, RTE_MEMZONE_IOVA_CONTIG, 1ULL << 30); if (mz == NULL) { printf("errno %s\n", rte_strerror(rte_errno)); fprintf(stderr, "Memory allocation failed\n"); rte_eal_cleanup(); return -1; } printf("Memory allocated with name %s at socket %d physical address: %p, addr %p addr64 %lx size: %zu\n", name, mz->socket_id, (mz->iova), mz->addr, mz->addr_64, mz->len); } } // Clean up EAL rte_eal_cleanup(); return 0; }