From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from compass.polito.it (compass.polito.it [130.192.55.110]) by dpdk.org (Postfix) with ESMTP id B77052BF2 for ; Fri, 1 Apr 2016 10:18:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id 944581001DB for ; Fri, 1 Apr 2016 10:18:32 +0200 (CEST) Authentication-Results: compass.polito.it (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=studenti.polito.it DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= studenti.polito.it; h=content-type:content-type:cc:to:from:from :subject:subject:message-id:date:date:references:in-reply-to :received:mime-version:received:received:received; s=y2k10; t= 1459498709; bh=fYRiBc6wt+u/PRe8uhqyHWR2fgUOEV3101FrEzOw4cg=; b=Q pmAyL1k5ePiF/gCpO29NegQ6aef/f0keGQPKGkspElsBAygLtmtNInFz1gHvNt20 ELXj+uB/Uhv1Jdxsk2UKQKhT603OnqM/oGBOoycjuidGeikMtMIiolbRWugzWxdW 8zWZEUR6dIUEZQclLcz/FVv5uqBTyPuWcnozQ6SC0I= X-Virus-Scanned: amavisd-new at studenti.polito.it X-Spam-Flag: NO X-Spam-Score: -5.862 X-Spam-Level: X-Spam-Status: No, score=-5.862 tagged_above=-100 required=3.5 tests=[ALL_TRUSTED=-5, AWL=0.637, BAYES_00=-1.5, HTML_MESSAGE=0.001] autolearn=ham Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Et7yoFaFUdLR for ; Fri, 1 Apr 2016 10:18:29 +0200 (CEST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id 6BE721001D9 for ; Fri, 1 Apr 2016 10:18:29 +0200 (CEST) Received: by mail-lb0-f181.google.com with SMTP id qe11so67286585lbc.3 for ; Fri, 01 Apr 2016 01:18:29 -0700 (PDT) X-Gm-Message-State: AD7BkJIVannUwm2AQM/qcidqj5xI7R7SJsLKQCyvIT75bN4VX/fj3IqoTzLTon5TCDhXmjR86ZJyeYqXqXYFow== MIME-Version: 1.0 X-Received: by 10.112.209.99 with SMTP id ml3mr1271119lbc.26.1459498708939; Fri, 01 Apr 2016 01:18:28 -0700 (PDT) Received: by 10.25.0.198 with HTTP; Fri, 1 Apr 2016 01:18:28 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Apr 2016 10:18:28 +0200 X-Gmail-Original-Message-ID: Message-ID: From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= To: "Burakov, Anatoly" Cc: "dev@dpdk.org" , "Gonzalez Monroy, Sergio" , "Richardson, Bruce" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Question about cd10c42eb5bc ("mem: fix ivshmem freeing") X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 08:18:32 -0000 Sure: http://dpdk.org/ml/archives/dev/2016-April/036884.html, On Wed, Mar 30, 2016 at 2:10 PM, Burakov, Anatoly wrote: > Hi Mauricio, > > > > Good points. Would you be willing to prepare a patch to fix these issues? > > > > Thanks, > > Anatoly > > > > *From:* Mauricio V=C3=A1squez [mailto:mauricio.vasquezbernal@studenti.pol= ito.it] > > *Sent:* Wednesday, March 30, 2016 10:13 AM > *To:* Burakov, Anatoly > *Cc:* dev@dpdk.org; Gonzalez Monroy, Sergio < > sergio.gonzalez.monroy@intel.com>; Richardson, Bruce < > bruce.richardson@intel.com> > *Subject:* Re: Question about cd10c42eb5bc ("mem: fix ivshmem freeing") > > > > Hi Anatoly, > > Thank you very much, I did not take into account that detail. > > I have two additional concerns about it: > > 1. I think it is possible to have a race condition. The memzone is marked > as not freeable after it has been added to the ivshmem device, then it is > possible to free the memzone just after it has been added to the metadat= a > but before it is marked as not freeable. > > Shouldn't the memzone be marked before adding the memzone to the ivshmem > device? > > > > 2. Are the #ifdefs necessary?, we already are in a file that will only > compiled when ivshmem is enabled. > > Thanks, > > Mauricio Vasquez, > > > > > > On Wed, Mar 30, 2016 at 10:29 AM, Burakov, Anatoly < > anatoly.burakov@intel.com> wrote: > > Hi Mauricio, > > > > You=E2=80=99re not missing anything. It would be done this way, if the me= mzone > parameter wasn=E2=80=99t const. But it is const, so we have to find the m= emzone in > config to edit it. > > > > Thanks, > > Anatoly > > > > *From:* Mauricio V=C3=A1squez [mailto:mauricio.vasquezbernal@studenti.pol= ito.it] > > *Sent:* Wednesday, March 30, 2016 9:22 AM > *To:* dev@dpdk.org > *Cc:* Gonzalez Monroy, Sergio ; > Richardson, Bruce ; Burakov, Anatoly < > anatoly.burakov@intel.com> > *Subject:* Question about cd10c42eb5bc ("mem: fix ivshmem freeing") > > > > Dear All, > > I was looking at that patch, I can understand its functionality but not > its implementation.. > > Why to calculate idx?, Just doing "mz->ioremap_addr =3D mz->phys_addr" wo= uld > not be sufficient? After all, the goal is to mark the memzone as used by > ivshmem to forbid freeing it. > > Please corrected if I am missing something. > > Thank you, > > Mauricio Vasquez, > > >