From: Steve Hartmann Date: Mon, 25 Aug 2014 17:40:06 +0000 Message-ID: References: <53F6E307.7050606@xenomai.org> <53FAF809.5030004@xenomai.org> <53FB3090.7020905@xenomai.org> In-Reply-To: <53FB3090.7020905@xenomai.org> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai] ENOMEM returned from rt_task_create and rt_sem_create List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philippe Gerum , "xenomai@xenomai.org" On 8/25/14 7:48 AM, "Philippe Gerum" wrote: >On 08/25/2014 01:33 PM, Steve Hartmann wrote: >>=20 >>=20 >> On 8/25/14 3:47 AM, "Philippe Gerum" wrote: >>=20 >>> On 08/22/2014 01:44 PM, Steve Hartmann wrote: >>>> >>>> >>>> On 8/22/14 1:28 AM, "Philippe Gerum" wrote: >>>> >>>>> On 08/21/2014 10:04 PM, Steve Hartmann wrote: >>>>>> Hi folks, >>>>>> >>>>>> I am using linux 3.2.21 + xenomai 2.6.2.1 on intel core i7. This >>>>>>is a >>>>>> user land application. >>>>>> >>>>>> This code I am having issues with was working pretty well until I >>>>>> added >>>>>> some more semaphores. As it runs right now, it will call >>>>>> rt_sem_create >>>>>> 544 times, then call a single rt_task_create. There are also about >>>>>>15 >>>>>> mutexes created also. I didn't count it, but somewhere around 520 >>>>>>or >>>>>> so >>>>>> semaphores, I start getting ENOMEM returned from both of these >>>>>> methods. >>>>>> >>>>>> Is there a way I can increase whatever memory pool these are pulling >>>>>> from? It is feasible to rewrite the code so I use less semaphores, >>>>>> but >>>>>> if it is not detrimental, I would like to just raise whatever limit >>>>>>it >>>>>> is that I am running into. >>>>>> >>>>> >>>>> >>>>> Raising CONFIG_XENO_OPT_SYS_HEAPSZ should fix this issue. >>>>> >>>>> --=20 >>>>> Philippe. >>>> >>>> Thanks for the reply. >>>> >>>> That's what I thought too. I doubled it to 512 and saw no effect. I >>>> also >>>> doubled the value of CONFIG_XENO_OPT_GLOBAL_SEM_HEAP and >>>> CONFIG_XENO_OPT_SEM_HEAPSZ to see if they had any effect - they did >>>>not. >>>> >>>> >>> >>> This could be the number of registry slots then, try raising >>> CONFIG_XENO_OPT_REGISTRY_NRSLOTS. >>> >>> --=20 >>> Philippe. >>=20 >> Thanks, I will try that today. However, in all the calls to >> rt_sem_create, I pass NULL to the name parameter. Should the semaphores >> still be taking up registry slots even if unnamed? >>=20 > >When created from user-space, they will. This way we get a valid >internal identifier on an anon object, for referring to it from userland. > >--=20 >Philippe. That fixed it. Thank you so much for your help! Steven