From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.arccn.ru (vpn.arccn.ru [95.182.74.2]) by dpdk.org (Postfix) with SMTP id E11AA3989 for ; Wed, 7 May 2014 14:42:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.arccn.ru (Postfix) with ESMTP id 0E471A0092 for ; Wed, 7 May 2014 16:42:55 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arccn.ru; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:to:mime-version:user-agent:from:from :date:date:message-id; s=dkim; t=1399466566; x=1400330566; bh=Lk dO8F6xAsQxBWlerlbcnKX8A+jidOu6Vl0oit1hOIs=; b=Kh3s8y4InVRLfFV3W0 6tk5baq4XNV7v6kbn+Wy2uTJJIpW4tJicZZ9FcSffrmrn9+AwlFU01k3GEw7w5cW KUW+uGh32Xjz0BEMWmqE5eIed+Hha3rD2U5zAR5kJHzC+UN+Sul8Bkv3wIb0iknQ fwWuvLx2/Zr7TcuG0EJw5jsTo= X-Virus-Scanned: Debian amavisd-new at mail.arccn.ru Received: from mail.arccn.ru ([127.0.0.1]) by localhost (mail.arccn.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YShIF52rC03q for ; Wed, 7 May 2014 16:42:46 +0400 (MSK) Received: from [10.30.40.100] (unknown [10.30.40.100]) by mail.arccn.ru (Postfix) with ESMTPSA id 8B122A0091; Wed, 7 May 2014 16:42:46 +0400 (MSK) Message-ID: <536A2A44.1030801@arccn.ru> Date: Wed, 07 May 2014 16:42:44 +0400 From: Igor Ryzhov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Olivier MATZ , dev@dpdk.org References: <5368A5E0.8090903@arccn.ru> <5369E6AF.4040402@arccn.ru> <536A1B5C.2010201@6wind.com> In-Reply-To: <536A1B5C.2010201@6wind.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] RTE Ring removing 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: Wed, 07 May 2014 12:42:49 -0000 It seems to be a good idea, thank you, Olivier! But a few questions: 1. Will this changes affect performance? 2. In PATCH 2/2 you have a small bug: In file rte_ring.h, in comments describing rte_ring_init function you hav= e: + * @param name + * The size of the ring. But it is name of the ring, not size. Best regards, Igor Ryzhov 07.05.2014 15:39, Olivier MATZ =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Hi Igor, > > On 05/07/2014 09:54 AM, Igor Ryzhov wrote: >> I noticed that in Memzone realization there is a special global variab= le >> "free_memseg" containing pointers on free memory segments. >> An memzone reserve function just finst the best segment for allocation >> from this "free_memseg" variable. >> >> So I think there is a possibility to unreserve already reserved memory >> back to "free_memseg", and impossibility of unreserving memory is just >> because there is no function for that, not because it is impossible in >> principle. >> Am I right? Or there are any restrictions? > > I think that implementing a freeing of memory segment is feasible, but > it would require some work to properly merge freed zones to avoid memor= y > fragmentation. > > Another solution is to allocate/free rings in standard memory (malloc > for instance) instead of rte_memzones. Let me know if the patches I've > just sent on the mailing list solves your issue. > > By the way, I plan to do the same thing for mempools in the coming > weeks but there is much more work. > > Regards, > Olivier >