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 4602C42C96; Mon, 12 Jun 2023 11:55:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7B2A40689; Mon, 12 Jun 2023 11:55:18 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C5C4E4014F for ; Mon, 12 Jun 2023 11:55:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686563717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UAxU8cdl3VntAtmYa8rcl/F9j1KYX3nXdrybjt7M7EY=; b=H6uKg08MuTsepFDxGdLKpRWqwXSCRob5/W3Y1XUdatkukZ4EXuRMSsDdBczo7qc4cXJfiG gWb+xKJTBOVUu3+zLK7Pe/6iyye2rDzvSeYePcKoM5+crOyglSy4UjIqFLQxM5Q9XEk0Sc a+ifBM6WBnJSQkvNJkou5GZ3tlPr1Hg= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-79-pJqA6a3pPOGECNo_EpuTuQ-1; Mon, 12 Jun 2023 05:55:15 -0400 X-MC-Unique: pJqA6a3pPOGECNo_EpuTuQ-1 Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-25bc00f15c0so788251a91.0 for ; Mon, 12 Jun 2023 02:55:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686563715; x=1689155715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UAxU8cdl3VntAtmYa8rcl/F9j1KYX3nXdrybjt7M7EY=; b=c4JHNHMRWalI0EYNFLnNRRdGnDHymYTH0hqRO6iO1SaI3QvdxRT8uoG9hHKi2E4i6E Bpa+u41tHUM53nQ911iPe4a0182lkjJOozvVFSz8VQs8BqYuacYm1gYjLwjjyKgLySjO d/Gp7LyG+DKO0ewLNf+HDhLU1+030NwQMTXlTFfA3niHsid6BIIUMF7oysfk6+AiG8qj APRMhRL8fHwuLYWb5WQyaM0XBOQ8MSggkmfVYobDP0TC+dPSi+N2ghhdqRA96e9flR6t yFmUK8e4tDMcotBkNJhxyWAPGbtT7l//QFY/JyAO2bxJo6r2VG8xT+8PiqzCKxGVMLBS 23sA== X-Gm-Message-State: AC+VfDyInl+jl5h99yIEQCDUgB/VYwRdiocd6riih4tfr5TjBM2k7ieA 8PWU1rdjNaI5d+fI7OEuEIDnE2765ZvY23/Sk+jiXrBdOk+x2aos8JCRYwM9TvPD4Utwt8vha+9 ZMibKytzGT+S1LBVsjhsv43WK/fs= X-Received: by 2002:a17:90a:1de:b0:256:675f:1d49 with SMTP id 30-20020a17090a01de00b00256675f1d49mr10518459pjd.0.1686563714822; Mon, 12 Jun 2023 02:55:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6W1njb0hximRNSIhhT/ZnpsricQXloJ00sliMo9C0HiX3jZh/ffa2Iy9gU1VWjU5yTucmYi7Az+e5/0ioKy64= X-Received: by 2002:a17:90a:1de:b0:256:675f:1d49 with SMTP id 30-20020a17090a01de00b00256675f1d49mr10518448pjd.0.1686563714502; Mon, 12 Jun 2023 02:55:14 -0700 (PDT) MIME-Version: 1.0 References: <20230529112130.11198-1-changfengnan@bytedance.com> <92f02161-eedc-9187-3719-420edf074d80@intel.com> In-Reply-To: <92f02161-eedc-9187-3719-420edf074d80@intel.com> From: David Marchand Date: Mon, 12 Jun 2023 11:55:03 +0200 Message-ID: Subject: Re: [External] Re: [PATCH v4] eal: fix eal init may failed when too much continuous memsegs under legacy mode To: "Burakov, Anatoly" Cc: Fengnan Chang , Lin Li , dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Jun 12, 2023 at 11:48=E2=80=AFAM Burakov, Anatoly wrote: > > On 6/9/2023 9:35 AM, Fengnan Chang wrote: > > David Marchand =E4=BA=8E2023=E5=B9=B46=E6= =9C=888=E6=97=A5=E5=91=A8=E5=9B=9B 04:33=E5=86=99=E9=81=93=EF=BC=9A > >> > >> On Mon, May 29, 2023 at 1:23=E2=80=AFPM Fengnan Chang > >> wrote: > >>> > >>> Under legacy mode, if the number of continuous memsegs greater > >>> than RTE_MAX_MEMSEG_PER_LIST, eal init will failed even though > >>> another memseg list is empty, because only one memseg list used > >>> to check in remap_needed_hugepages. > >>> Fix this by make remap_segment return how many segments mapped, > >>> remap_segment try to map most contiguous segments it can, if > >>> exceed it's capbility, remap_needed_hugepages will continue to > >>> map other left pages. > >>> > >>> For example: > >>> hugepage configure: > >>> cat /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_huge= pages > >>> 10241 > >>> 10239 > >>> > >>> startup log: > >>> EAL: Detected memory type: socket_id:0 hugepage_sz:2097152 > >>> EAL: Detected memory type: socket_id:1 hugepage_sz:2097152 > >>> EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:20= 97152 > >>> EAL: Creating 4 segment lists: n_segs:8192 socket_id:1 hugepage_sz:20= 97152 > >>> EAL: Requesting 13370 pages of size 2MB from socket 0 > >>> EAL: Requesting 7110 pages of size 2MB from socket 1 > >>> EAL: Attempting to map 14220M on socket 1 > >>> EAL: Allocated 14220M on socket 1 > >>> EAL: Attempting to map 26740M on socket 0 > >>> EAL: Could not find space for memseg. Please increase 32768 and/or 65= 536 in > >>> configuration. > >>> EAL: Couldn't remap hugepage files into memseg lists > >>> EAL: FATAL: Cannot init memory > >>> EAL: Cannot init memory > >> > >> We are missing a Fixes: tag and this is backport material, right? > > Yes, this patch need cc stable@dpdk.org > >> > >> > >>> > >>> Signed-off-by: Fengnan Chang > >>> Signed-off-by: Lin Li > >> > >> Can I update Lin Li existing entry in .mailmap? Or is this a different= person? > > Please help update in .mailmap, same person, thanks. > >> > >> > >>> Signed-off-by: Burakov Anatoly > >> Anatoly Burakov* > >> > >>> Reviewed-by: Anatoly Burakov > >> > >> Strange to have both SoB and Review tag from Anatoly. > > Maybe just leave SoB ? cc @ Anatoly > > The signoff is there because I suggested an alternative implementation > in comments. I'm OK with just leaving Review :) Good, that was what I had understood. I updated accordingly when applying. Thanks. --=20 David Marchand