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 9139F43F12; Fri, 26 Apr 2024 09:51:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E94343C65; Fri, 26 Apr 2024 09:51:05 +0200 (CEST) Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by mails.dpdk.org (Postfix) with ESMTP id 58CBA40284 for ; Thu, 25 Apr 2024 12:14:22 +0200 (CEST) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-222a9eae9a7so392269fac.3 for ; Thu, 25 Apr 2024 03:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714040061; x=1714644861; darn=dpdk.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=CsPJCggvCkAmq7d6jWrqNJhMHoJHw475g82Sq8g6xUg=; b=LlltqXUUgi7Zu+7MHLiF0RYrfBvexXX5SgheDLAXha7/QSqCeu9Ak93Txs2Y2g7+Rl pndmzMouw3MRN16zdq+jxqbETy9lvZODn0CjY5lQfIO3AIijmovoCIdkIUN2NYaMelCt wrSNtyCzvj5nXSeEI25E8mRKCUMewMwp1rstuEMV/EiimPMVFD36h2yHDRdrEOm30Ebp U00JwzNjdB/BmrOpoX2oQsx6jMA7meEuYBW1VIQWwKQa+hFfEQoz05TwB/f12c+kODem tYooL1j9ueHzrpfBhSmj3j5CuRoMqQ4yWhHqlKiJcuXceJ92+vWCmpeG5qu6sU+FFxCW 4phw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714040061; x=1714644861; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CsPJCggvCkAmq7d6jWrqNJhMHoJHw475g82Sq8g6xUg=; b=URd577NS9/dqXsJqnX/OudIjxjjeUBh2Ytfe+t+ewJ8iuBfF43ZVYGwIAXdWPpuRF6 HPFbygPUQb8evZlGXST2XJc/4WAC/m8aYvycjIo6gOmgrfqVCklGHShAOR/xFqmN8io3 uXt91e0SfK5JUIzEm+ZFReIHkha3wjKMKrpQH3tOS2EKp3t4b0kKJEUUw1gNgkKDNeYp 9C890k12br5aCHbZsDixRN0qjp5bKjZHpqfcSXYK4UTPHaQ6iScdqnYDfyCgqxV49HJ9 9N7rNBB39CniJJbum3PfZ1OoEVlDfNl3V49aycEY8U7M4g9+raHH8/UxHJdntEurTbMa R9ug== X-Gm-Message-State: AOJu0Yy6qsgvzqAyRTZ4ZtDkRE/3cZUv2phS0qjg/5wNHi2cE5gT72XI CobuUHxsX0sodbWvbEHCRSxxIDYCBmbfoeH55/Mz5cFIFhBnit5lB/IVLUGr0yoU3tS/D9FWRZG g7ELCi5dhVVc1s2vI8+eSnObLIiJ8sw== X-Google-Smtp-Source: AGHT+IFnxUJxg1db9QfRmw9W6t+/61+iNOZBm3xj2yHsStjEOoppBJkz+tj6P3ojbrfb5UFP/MPyQ9BQJvtlU5qvQ0U= X-Received: by 2002:a05:6870:c112:b0:222:7000:8b28 with SMTP id f18-20020a056870c11200b0022270008b28mr5936737oad.32.1714040061268; Thu, 25 Apr 2024 03:14:21 -0700 (PDT) MIME-Version: 1.0 From: Nirmal Sarkar Date: Thu, 25 Apr 2024 15:44:09 +0530 Message-ID: Subject: DPDK hugepage issue in docker containter To: dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000fb9c260616e90cf6" X-Mailman-Approved-At: Fri, 26 Apr 2024 09:51:04 +0200 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 --000000000000fb9c260616e90cf6 Content-Type: text/plain; charset="UTF-8" I am running DPDK application inside docker container bound to a Numa Node. The command to bring up the docker container, I am using the command below: docker run -itd \ --privileged \ --name ${DOCKER_NAME} \ --rm \ --network=${DOCKER_NETWORK} \ --cpuset-cpus="${CPU_SET}" \ -e TEST_INTERFACE="${INTERFACE}" \ -e DPDK_FILE_PREFIX="${PREFIX}" \ -e DPDK_HUGE_MEM="${HUGE_MEM}" \ -v /sys/bus/pci/drivers:/sys/bus/pci/drivers \ -v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages \ -v /sys/devices/system/node:/sys/devices/system/node \ -v /dev/hugepages:/dev/hugepages \ ${DOCKER_IMAGE} Once the docker comes up, the application executes the following steps: 1. cleans up residual hugepage # *./dpdk-hugepages.py -c* 2. unmounts hugepage filesystem # *./dpdk-hugepages.py -u* 3. sets up hugepage size, reserves hugepage and mounts hugepage filesystem # *./dpdk-hugepages.py -p 1G -r G -m* 4. does the DPDK EAL init. During EAL init, I am getting an error: *EAL: Not enough memory available on socket 1! Requested: , available: 0MB* As per my understanding - inside the docker container *step-2* unmounts /dev/hugepages and with *step-3* it is not properly mounted back to /dev/hugepages though the command does not give any explicit error with mount. To test my understanding - I created a file in host /dev/hugepages and I could see/access the file inside docker. When I executed *step-2* and *step-3*, /dev/hugepages content is not visible from the docker container. Hence it looks to me *step-2* is not required at all. Please correct me if I am wrong and also mention the correct steps to unmount/mount hugepages inside docker. Regards, Nirmal Sarkar --000000000000fb9c260616e90cf6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am running DPDK application inside docker container = bound to a Numa Node.
The command to bring up the docker container, I am using the com= mand below:
docker run -itd \
=C2=A0 =C2=A0 --privileged \
=C2=A0 =C2= =A0 --name ${DOCKER_NAME} \
=C2=A0 =C2=A0 --rm = \
=C2=A0 =C2=A0 --network=3D${DOCKER_NETWORK} \<= /font>
=C2=A0 =C2=A0 --cpuset-cpus=3D"${CPU_SET}&q= uot; \
=C2=A0 =C2=A0 -e TEST_INTERFACE=3D"$= {INTERFACE}" \
=C2=A0 =C2=A0 -e DPDK_FILE_P= REFIX=3D"${PREFIX}" \
=C2=A0 =C2=A0 -e= DPDK_HUGE_MEM=3D"${HUGE_MEM}" \
=C2= =A0 =C2=A0 -v /sys/bus/pci/drivers:/sys/bus/pci/drivers \
= =C2=A0 =C2=A0 -v /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepage= s \
=C2=A0 =C2=A0 -v /sys/devices/system/node:/s= ys/devices/system/node \
=C2=A0 =C2=A0 -v /dev/h= ugepages:/dev/hugepages \
=C2=A0 =C2=A0 ${DOCKER= _IMAGE}

Once the docker comes up, t= he application executes the following steps:
1. cleans up=C2=A0residual hugepage=C2=A0 #=C2=A0= ./dpdk-hugepages.py -c=
2. unmounts hugepage filesyst= em #=C2=A0./dpdk-hugepag= es.py -u
3. sets up hugepage size, reserves hugepage and mounts hugepage filesyste= m #=C2=A0./dpdk-hugepage= s.py -p 1G -r <some-value>G -m
4. does the DPDK = EAL init.

During EAL init, I am getting an error: = EAL: Not enough memory avail= able on socket 1! Requested: <specified-value>, available: 0MB

As pe= r my understanding - inside the docker container step-2 unmounts /de= v/hugepages and with=C2=A0step-3=C2=A0it is not properly mounted bac= k to /dev/hugepages though the command does not give any explicit error wit= h mount.
To test my understandi= ng -=C2=A0I created a= file in host /dev/hugepages and I could see/access the file inside=C2=A0do= cker. When I executed step-2 and step-3, /dev/hugepages conte= nt is not visible from the docker container.=C2=A0Hence it looks to me step-2 is not requ= ired at all.

Please correct me if I am wrong and also mention the co= rrect steps to unmount/mount hugepages inside docker.

Regards,
Nirmal Sarkar




--000000000000fb9c260616e90cf6--