From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Ryzhov Subject: Re: RTE Ring removing Date: Wed, 07 May 2014 16:42:44 +0400 Message-ID: <536A2A44.1030801@arccn.ru> References: <5368A5E0.8090903@arccn.ru> <5369E6AF.4040402@arccn.ru> <536A1B5C.2010201@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable To: Olivier MATZ , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <536A1B5C.2010201-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 >