Ram quota emergency allocation freed...not sure why.

Bob Stewart robjsstewart at ...196...
Sun Jan 17 19:28:25 CET 2016


Hi,

I'm running 15.11 with a base-hw kernel on a TI Am335x SoC.

I modified an existing application I had previously created, whose 
design had an object which accessed processors external to the host 
running Genode, via mmio.  The modification involved implementing the 
external processor access code in a driver and creating clients to 
access the driver using the same server/client coding pattern used in 
most Genode drivers.  (This would give me control over the running 
priority of the driver and hence the response time of the driver code.) 
The driver would dynamically use the libc library for file access.

In the scenario I have, five drivers are running providing uart, timer, 
gpio, mmc, and pwm services. Now with this additional driver (named 
pruss_drv) running, I experience hard to follow messages related to ram 
quota allocations in the sys log (which is attached) as follows:

1. Core hands over the available RAM amount to init as shown in this log 
message-
/int main(): transferred 501 MB to init
/(This is correct and expected./)
/
2. When the new driver runs, after all the other drivers are launched, 
an insufficient quota  message is  issued-
/Insufficient quota for transfer: init -> pruss_drv//
////have 40960, need 143360
         [init] not enough quota for a donation of 143360 bytes
         [init -> pruss_drv] resource_request: ram_quota=143360

/(Question about this output is what are these numbers telling me? Are 
these byte or KByte quantities
or what? The total ram quota requests in all the components in the run 
script is about 35 MBytes so there should be well over 400 MBytes 
available to init at this point. And, changing the ram quotas in the run 
script or the  ram quota requested in the associated server connection 
does not change the value of these numbers, which I would have thought 
it would.)

3/./ Then messages indicating that the emergency ram allocation had to 
be freed to satisfy the drivers request for ram-/
         [init -> pruss_drv] virtual void 
Genode::Platform_env::release(): used before
         freeing emergency=503808
         [init -> pruss_drv] virtual void 
Genode::Platform_env::release(): used after f
            reeing emergency=495616
         [init] child "pruss_drv" requests resources: ram_quota=143360
/(Question: What situation has occurred to require this action for this 
new driver when the other five drivers that have just been installed did 
not invoke such an action? Again there should be plenty of ram available 
for allocation at this point in the execution. And, what units are these 
numbers in?)/

/4. Finally, another request for ram from the new driver is logged-/
         [init -> pruss_drv] resource_request: ram_quota=45056
         [init] child "pruss_drv" requests resources: ram_quota=45056
/(Question: I assume this is for information only and not an indication 
of abnormal behavior and that the allocation was actually made. Is that 
correct?)/

/After these unexpected log messages the output from the new driver is 
as expected and it appears that the initialization code in the driver 
executed correctly. In the initialization, a pair of disk files, 
specified in config settings, are correctly read via libc_ffat and 
loaded into the external processors instruction memories and begin there 
execution/. /So the driver appears to be running correctly, at least 
initially./

/Thanks in advance for any response.
         Bob Stewart/
///

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20160117/b7143b86/attachment.html>
-------------- next part --------------
Starting kernel ...                                                           
                                                                              
kernel initialized                                                            
Genode 15.11 <local changes>                                                  
int main(): --- create local services ---                                     
int main(): --- start init ---                                                
int main(): transferred 501 MB to init                                        
int main(): --- init created, waiting for exit condition ---                  
Quota exceeded! amount=12288, size=12288, consumed=12288                      
[init -> uart_drv] int main(int, char**): --- OMAP3 UART driver started ---   
[init -> pwm_drv] --- am33xx pwm driver ---                                   
[init -> ctrl_module] --- Beaglebone Control Module Server ---                
[init -> platform_drv] --- bbb platform driver running ---                    
[init -> sd_card_drv] --- OMAP3 SD card driver ---                            
[init -> bbb_platform_client] --- bbb platform being configured ---           
[init -> ctrl_module] gpio 4 mode 2 dirn=1, pullup or down = 1                
[init -> ctrl_module] gpio 5 mode 2 dirn=1, pullup or down = 1                
[init -> ctrl_module] gpio 22 mode 4 dirn=0, pullup or down = 0               
[init -> ctrl_module] gpio 23 mode 4 dirn=0, pullup or down = 0               
[init -> ctrl_module] gpio 50 mode 6 dirn=0, pullup or down = 0               
[init -> ctrl_module] gpio 51 mode 6 dirn=0, pullup or down = 0               
[init -> ctrl_module] gpio 66 mode 7 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 67 mode 7 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 68 mode 7 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 69 mode 7 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 89 mode 7 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 78 mode 4 dirn=0, pullup or down = 0               
[init -> ctrl_module] gpio 79 mode 4 dirn=1, pullup or down = 0               
[init -> ctrl_module] gpio 110 mode 6 dirn=1, pullup or down = 0              
[init -> ctrl_module] gpio 111 mode 6 dirn=1, pullup or down = 0              
[init -> ctrl_module] gpio 112 mode 6 dirn=1, pullup or down = 0              
[init -> ctrl_module] gpio 113 mode 6 dirn=1, pullup or down = 0              
[init -> bbb_platform_client] Enabled dmtimer 3 freq = 2                      
[init -> bbb_platform_client] Enabled dmtimer 4 freq = 1                      
[init -> bbb_platform_client] Enabled dmtimer 5 freq = 1                      
[init -> bbb_platform_client] Enabled dmtimer 6 freq = 1                      
[init -> bbb_platform_client] Enabled dmtimer 7 freq = 1                      
[init -> bbb_platform_client] Enabled PWM 1                                   
[init -> bbb_platform_client] Enabled PWM 2                                   
[init -> bbb_platform_client] Enabled UART 5                                  
[init -> bbb_platform_client] Enabled MMC 0                                   
[init -> bbb_platform_client] Enabled MMC 1                                   
[init -> bbb_platform_client] Enabled I2C 1                                   
[init -> bbb_platform_client] Enabled PRUSS 0                                 
[init] virtual void Genode::Child_policy::exit(int): child "bbb_platform_clien
t" exited with exit value 0                                                   
[init -> pwm_drv] PWM quota super period 1000000                              
[init -> pwm_drv] PWM quota 99975                                             
[init -> gpio_drv] --- am33xx gpio driver ---                                 
[init -> i2c_drv] --- am33xx i2c driver ---                                   
[init -> pwm_drv] 4 Motors initialized                                        
[init -> gpio_drv] gpio 53 mode O value=0                                     
[init -> gpio_drv] gpio 54 mode O value=0                                     
[init -> gpio_drv] gpio 55 mode O value=0                                     
[init -> gpio_drv] gpio 56 mode O value=0                                     
[init -> pwm_drv] PWM port 0, num 1, period 31250, duty 1562, polarity 1, name
=North                                                                        
[init -> pwm_drv] PWM port 1, num 1, period 31250, duty 1562, polarity 1, name
=South                                                                        
[init -> pwm_drv] PWM port 0, num 2, period 31250, duty 1562, polarity 1, name
=East                                                                         
[init -> pwm_drv] PWM port 1, num 2, period 31250, duty 1562, polarity 1, name
=West                                                                         
[init -> pruss_drv] void init_libc_ffat(): using the libc_ffat plugin         
[init -> pruss_drv] --- am33xx PRU driver ---                                 
[init -> pruss_drv] PRUSS quota super period 1000000                          
[init -> pruss_drv] PRUSS quota 199951                                        
Insufficient quota for transfer: init -> pruss_drv                            
  have 40960, need 143360                                                     
[init] not enough quota for a donation of 143360 bytes                        
[init -> pruss_drv] resource_request: ram_quota=143360                        
[init -> pruss_drv] virtual void Genode::Platform_env::release(): used before 
freeing emergency=503808                                                      
[init -> pruss_drv] virtual void Genode::Platform_env::release(): used after f
reeing emergency=495616                                                       
[init] child "pruss_drv" requests resources: ram_quota=143360                 
[init -> sd_card_drv] CID: 0x1d414453 0x44202020 0x02b16703 0xea00d927        
[init -> sd_card_drv] RCA: 0x59b4                                             
[init -> sd_card_drv] Block::Omap3_driver::Omap3_driver(bool): SDCard driver g
etting mmc1 ready with dma 0                                                  
[init -> sd_card_drv] SD card detected                                        
[init -> sd_card_drv] capacity: 60303 MiB                                     
[init -> pruss_drv] resource_request: ram_quota=45056                         
[init] child "pruss_drv" requests resources: ram_quota=45056                  
[init -> motor_ctl] --- Motor Control application starting ---                
[init -> pruss_drv] Loaded PRU-0 program 123 words                            
[init -> pruss_drv] Loaded PRU-1 program 337 words                            
[init -> motor_ctl] int main(int, char**): Receiver in struct size is 112     
[init -> motor_ctl] int main(int, char**): Receiver in struct size is 80      
[init -> motor_ctl] PRUSS Initialized                                         




More information about the users mailing list