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 4342DA0A02 for ; Thu, 25 Mar 2021 14:34:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32078140D57; Thu, 25 Mar 2021 14:34:34 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 8EFB94067B for ; Thu, 25 Mar 2021 14:34:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616679271; 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: in-reply-to:in-reply-to:references:references; bh=LvVGltcoGm++eFfHxOEpe/3GPy3ip1Vhq8AFgI+i10s=; b=LwgrUFyCdbBymjDBf6WokOFeWYM8WzIqkyFWi8E5IBvzfF1ySOpTXTQ/Y1yvXxnlTZFNP6 rCeJiLX/AF/qvv1czXK6LKkVgE5Un508i1kShoZUh7NzvTjUqJryYhDTinXS4ZvRuoxRXW wIDdhILmNsh6NMEt1Kqj88IqX1BiL7s= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-uqKt08CgOfqaGvGMza00ug-1; Thu, 25 Mar 2021 09:34:29 -0400 X-MC-Unique: uqKt08CgOfqaGvGMza00ug-1 Received: by mail-vk1-f200.google.com with SMTP id s194so695139vkh.8 for ; Thu, 25 Mar 2021 06:34:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LvVGltcoGm++eFfHxOEpe/3GPy3ip1Vhq8AFgI+i10s=; b=GNU9WOYeTguFSUqJuF8e7KHCX1C9m+rWVU/SdodzJ5ctpB5ikR8PnbK8/YvADYu17l v8hkb9CJZQA6fKiHQ8d38getBkYWf6HG5ruEARjYMixx4m7uH8DFmx3RzqaHN/4oVau6 iuto6kE/tyc+VmUCK2rfe6XzwHqc+XBHn014snp/U7SlJS2SU5a7nLMCnMN/5YfSnjkG CT9P+Nx5lwMTCdC/pxdfZHU6sIMnznoIJu2iAFUj5kdejsPLUvtiO5DIBZ/SFDWOAwOA u7DtotFkreMTNlFv59DnTNV+FfjbM8Kl5sTnteDrsZK76H6KStWvCHTqUyzHxIp2ZzfN MJnQ== X-Gm-Message-State: AOAM530mLP0p10mlgIEpmkufGQszUqA4c4A1LdG0YgHA4KWXLaho23Sc RUYZXIAO1BIYa7Cm3V/t6iEAIycd75UlsaRwh8jjvS90s10JZnIiBWi2K7MBieQSSntwUaYhy4Y hslxMkv7vFyh3U5J4RT6bLXs= X-Received: by 2002:a1f:d283:: with SMTP id j125mr5090484vkg.9.1616679269353; Thu, 25 Mar 2021 06:34:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLf9fK8e6WOmNKH1jyP0nWxWScknAlIuRC9cm3WEbTNA+x9mNIKRwVXqRr4mTYWpjnLhL5gB+EvzPbGku9st8= X-Received: by 2002:a1f:d283:: with SMTP id j125mr5090455vkg.9.1616679269157; Thu, 25 Mar 2021 06:34:29 -0700 (PDT) MIME-Version: 1.0 References: <20210222104131.11979-1-roy.shterman@vastdata.com> In-Reply-To: From: David Marchand Date: Thu, 25 Mar 2021 14:34:17 +0100 Message-ID: To: "Burakov, Anatoly" Cc: Roy Shterman , dev , Yuval Mintz , Aviv Ben David , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] mem: fix free segment when using huge-unlink option X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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" Hello, On Mon, Mar 1, 2021 at 11:44 AM Burakov, Anatoly wrote: > > On 28-Feb-21 1:21 PM, Roy Shterman wrote: > > > > > > On Mon, Feb 22, 2021 at 5:53 PM Burakov, Anatoly > > > wrote: > > > > On 22-Feb-21 10:41 AM, Roy Shterman wrote: > > > When using huge_unlink we unlink the segment right > > > after allocation. Although we unlink the file we keep > > > the fd in fd_list so file still exist just the path deleted. > > > When freeing the hugepage we need to close the fd and assign > > > it with (-1) in fd_list for the page to be released. > > > > > > The current flow fails rte_malloc in the following flow when working > > > with --huge-unlink option: > > > 1. alloc_seg() for segment A - > > > We allocate segment, unlink the path to the segment > > > and keep the file descriptor in fd_list. > > > 2. free_seg() for segment A - > > > We clear the segment metadata and return - without closing fd > > > or assigning (-1) in fd list. > > > 3. alloc_seg() for segment A again - > > > We find segment A as available, try to allocate it, > > > find the old fd in fd_list try to unlink it > > > as part of alloc_seg() but failed because path doesn't exist. > > > > > > The impact of such error is falsly failing rte_malloc() > > > although we have hugepages available. > > > > > > Fixes: d435aad37da7 ("mem: support --huge-unlink mode") > > > > > > Signed-off-by: Roy Shterman > > > > > > Cc: stable@dpdk.org > > > > Provisionally, patch looks fine, but i'll have to have a closer look. > > > > > > Hi Anatoly, > > > > Do I need to send this patch also to stable or it will happen > > automatically if the patch will reach the next release candidate? > > Not automatically, generally you should add a CC to stable for the patch > to be considered as part of stable release. That said, usually Fixed: > tag is also used to determine whether a patch is backport-able, so > having a correctly identified Fixed: tag is a mandatory minimum :) > > > Also I wonder if you had more time to review this one? > > Not yet, but i'll try to make some time this week. Any update? Thanks. -- David Marchand