ardupilot/libraries/AP_HAL_Linux
Lucas De Marchi 37f6b51746 AP_HAL_Linux: Scheduler: set stack sizes to 256k
Running the vehicles we check the stack size doesn't grow too much by
enabling the DEBUG_STACK in the scheduler. Even on 64bit boards the
stack is consistent around 4k. Just to be a little conservative, let it
be a little bit more that that: 256kB.

Since we have RT prio and we call mlock(), the memory for the stack of
each thread is locked in memory. This means we are effectively taking
that much memory. The default stack size varies per distro, but it's
common to have 8MB for 64 bit boards and 4MB for 32 bit boards. Here is
the output of ps -L -o 'comm,rtprio,rss $(pidof arducopter-quad)', showing the
RSS of arducopter-quad before and after this change:

Before:
	COMMAND         RTPRIO   RSS
	arducopter-quad     12 46960
	sched-timer         15 46960
	sched-uart          14 46960
	sched-rcin          13 46960
	sched-tonealarm     11 46960
	sched-io            10 46960

After:
	COMMAND         RTPRIO   RSS
	arducopter-quad     12  7320
	sched-timer         15  7320
	sched-uart          14  7320
	sched-rcin          13  7320
	sched-tonealarm     11  7320
	sched-io            10  7320
2016-05-12 13:35:23 -03:00
..
benchmarks waf: ardupilotwaf: prefix build context methods with ap_ 2016-01-22 20:10:29 -02:00
examples Global: rename enum SPIDevice to SPIDeviceType 2016-02-01 14:18:50 -02:00
qflight HAL_Linux: added qflight README.md 2015-12-27 16:12:27 +11:00
AP_HAL_Linux.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
AP_HAL_Linux_Namespace.h AP_HAL_Linux: separate class for tone alarm driver 2016-03-18 21:51:36 -03:00
AP_HAL_Linux_Private.h AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
AnalogIn.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
AnalogIn.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
AnalogIn_ADS1115.cpp AP_HAL_Linux: ADS1115: rename classes to follow other names 2016-02-01 14:18:51 -02:00
AnalogIn_ADS1115.h AP_HAL_Linux: ADS1115: rename classes to follow other names 2016-02-01 14:18:51 -02:00
AnalogIn_IIO.cpp AP_HAL_Linux: AnalogIIO: Remove unused code, add scaling for BBBMINI, rework 2016-01-28 13:44:43 -02:00
AnalogIn_IIO.h AP_HAL_Linux: AnalogIn_IIO: add scale for minlure 2016-02-19 11:55:31 -02:00
AnalogIn_Navio2.cpp AP_HAL_Linux: changed ADC logic a bit for Navio 2 2016-04-27 17:14:21 +03:00
AnalogIn_Navio2.h AP_HAL_Linux: added AnalogIn_Navio2 2016-02-27 03:06:50 -03:00
AnalogIn_Raspilot.cpp AP_HAL_Linux: AnalogIn_Raspilot: rename classes to follow other names 2016-02-01 14:18:51 -02:00
AnalogIn_Raspilot.h AP_HAL_Linux: AnalogIn_Raspilot: rename classes to follow other names 2016-02-01 14:18:51 -02:00
CameraSensor.cpp AP_HAL_Linux: make CameraSensor follow coding style 2015-12-18 17:56:04 +11:00
CameraSensor.h AP_HAL_Linux: make CameraSensor follow coding style 2015-12-18 17:56:04 +11:00
CameraSensor_Mt9v117.cpp AP_HAL_Linux: move mt9v117 patches inside class 2015-12-18 17:56:06 +11:00
CameraSensor_Mt9v117.h AP_HAL_Linux: move mt9v117 patches inside class 2015-12-18 17:56:06 +11:00
CameraSensor_Mt9v117_Patches.cpp AP_HAL_Linux: move mt9v117 patches inside class 2015-12-18 17:56:06 +11:00
ConsoleDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
ConsoleDevice.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Flow_PX4.cpp Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Flow_PX4.h AP_HAL_Linux: Flow_PX4: follow coding style 2015-12-18 17:56:05 +11:00
GPIO.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
GPIO.h AP_HAL_Linux: use Raspberry Pi GPIO for Navio2 2016-02-27 03:06:50 -03:00
GPIO_BBB.cpp AP_HAL_Linux: Fix compiler warning unused hal 2016-04-24 11:09:55 -03:00
GPIO_BBB.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
GPIO_Bebop.cpp AP_HAL_Linux: Add support for Sonar GPIO 2016-05-03 16:43:39 -03:00
GPIO_Bebop.h AP_HAL_Linux: Add support for Sonar GPIO 2016-05-03 16:43:39 -03:00
GPIO_Minnow.cpp AP_HAL_Linux: add GPIO definitions for minlure 2015-10-22 12:04:52 +11:00
GPIO_Minnow.h AP_HAL_Linux: add GPIO definitions for minlure 2015-10-22 12:04:52 +11:00
GPIO_RPI.cpp AP_HAL_Linux: use Raspberry Pi GPIO for Navio2 2016-02-27 03:06:50 -03:00
GPIO_RPI.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
GPIO_Sysfs.cpp AP_HAL_Linux: remove _export_pins() method 2016-01-04 15:12:49 -02:00
GPIO_Sysfs.h AP_HAL_Linux: remove _export_pins() method 2016-01-04 15:12:49 -02:00
HAL_Linux_Class.cpp AP_HAL_Linux: inline I2C bus options for minlure 2016-05-10 16:06:53 -03:00
HAL_Linux_Class.h AP_HAL_Linux: Remove unused extern declaration for HALs 2015-11-20 16:32:17 +09:00
Heat.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Heat_Pwm.cpp Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Heat_Pwm.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
I2CDevice.cpp AP_HAL_Linux: move dirname to I2CDevice core 2016-03-17 02:55:31 -03:00
I2CDevice.h AP_HAL_Linux: I2CDevice: method to read multiple times 2016-02-16 19:49:09 -02:00
I2CDriver.cpp AP_HAL_Linux: Add fake device to I2CDriver 2016-02-16 19:49:09 -02:00
I2CDriver.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
OpticalFlow_Onboard.cpp AP_HAL_Linux: Enable optical flow onboard for BBBMINI 2016-02-08 08:52:10 -02:00
OpticalFlow_Onboard.h OpticalFlow_Onboard: fix body rate calculation 2016-01-15 16:11:19 -02:00
PWM_Sysfs.cpp AP_HAL_Linux: PWM_Sysfs: minor changes to Bebop/mainline integration 2015-12-01 07:07:25 +11:00
PWM_Sysfs.h AP_HAL_Linux: fix warning due to derived PWM_Sysfs 2015-12-02 10:43:43 +11:00
Perf.cpp AP_HAL_Linux: Add Perf Lttng 2016-01-14 19:13:35 -02:00
Perf_Lttng.cpp AP_HAL_Linux: Add Perf Lttng 2016-01-14 19:13:35 -02:00
Perf_Lttng.h AP_HAL_Linux: Add Perf Lttng 2016-01-14 19:13:35 -02:00
Perf_Lttng_TracePoints.h AP_HAL_Linux: Add Perf Lttng 2016-01-14 19:13:35 -02:00
RCInput.cpp AP_HAL_Linux: Fix RCInput::read from stopping at any zero channel 2016-04-26 22:32:07 -03:00
RCInput.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_AioPRU.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_AioPRU.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_DSM.cpp HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
RCInput_DSM.h HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
RCInput_Navio2.cpp AP_HAL_Linux: added RCInput for Navio2 2016-02-27 03:06:50 -03:00
RCInput_Navio2.h AP_HAL_Linux: added RCInput for Navio2 2016-02-27 03:06:50 -03:00
RCInput_PRU.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_PRU.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_RPI.cpp AP_HAL_Linux: RCInput_RPI: revert PWM support 2016-01-18 20:07:42 -02:00
RCInput_RPI.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_Raspilot.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_Raspilot.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_UART.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_UART.h RCInput_UART: remove unused _count, _direction 2016-04-23 23:06:23 -07:00
RCInput_UDP.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_UDP.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_UDP_Protocol.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCInput_ZYNQ.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCInput_ZYNQ.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_AioPRU.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCOutput_AioPRU.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_Bebop.cpp RCOutput_Bebop: Increase max_rpm on Bebop 2 2015-12-27 16:11:36 -02:00
RCOutput_Bebop.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_PCA9685.cpp Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
RCOutput_PCA9685.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_PRU.cpp HAL_Linux: remove unused pru_chan_map from RCOutput 2016-04-23 23:06:24 -07:00
RCOutput_PRU.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_Raspilot.cpp Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
RCOutput_Raspilot.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_Sysfs.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCOutput_Sysfs.h AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCOutput_ZYNQ.cpp AP_HAL_Linux: use init() method without arguments 2015-12-02 14:49:11 -02:00
RCOutput_ZYNQ.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
RCOutput_qflight.cpp HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
RCOutput_qflight.h HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
RPIOUARTDriver.cpp AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
RPIOUARTDriver.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
SPIDevice.cpp AP_HAL_Linux: implement SPIDevice 2016-02-16 19:49:09 -02:00
SPIDevice.h AP_HAL_Linux: implement SPIDevice 2016-02-16 19:49:09 -02:00
SPIDriver.cpp AP_HAL_Linux: enabled SPI-driven LSM9DS1 for Navio 2 2016-05-10 17:24:43 -03:00
SPIDriver.h AP_HAL_Linux: Add fake device to SPIDriver 2016-02-16 19:49:09 -02:00
SPIUARTDriver.cpp AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
SPIUARTDriver.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Scheduler.cpp AP_HAL_Linux: Scheduler: set stack sizes to 256k 2016-05-12 13:35:23 -03:00
Scheduler.h AP_HAL_Linux: Scheduler: debug stack usage 2016-05-12 13:35:23 -03:00
Semaphores.cpp AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
Semaphores.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
SerialDevice.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Storage.cpp HAL_Linux: cope with non-root for Replay 2016-05-07 18:27:17 +10:00
Storage.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Storage_FRAM.cpp AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
Storage_FRAM.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
TCPServerDevice.cpp AP_HAL_Linux: use millis/micros/panic functions 2015-11-20 12:31:04 +09:00
TCPServerDevice.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Thread.cpp AP_HAL_Linux: Thread: allow to set stack size 2016-05-12 13:35:23 -03:00
Thread.h AP_HAL_Linux: Thread: allow to set stack size 2016-05-12 13:35:23 -03:00
ToneAlarm.cpp AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
ToneAlarm.h AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
ToneAlarm_Raspilot.cpp AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
ToneAlarm_Raspilot.h AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
UARTDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UARTDevice.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
UARTDriver.cpp HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
UARTDriver.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
UARTQFlight.cpp HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
UARTQFlight.h HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
UDPDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UDPDevice.h AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Util.cpp AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
Util.h AP_HAL_Linux: rename ToneAlarmDriver to follow other names 2016-03-18 21:51:37 -03:00
Util_RPI.cpp AP_HAL_Linux: use Util_RPI for Navio2 2016-02-27 03:06:50 -03:00
Util_RPI.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
VideoIn.cpp AP_HAL_Linux: Enable optical flow onboard for BBBMINI 2016-02-08 08:52:10 -02:00
VideoIn.h AP_HAL_Linux: add shrink_8bpp() to VideoIn 2016-01-15 16:05:47 -02:00
px4io_protocol.h AP_HAL_Linux: new files for raspilot 2015-09-14 14:22:16 +10:00
sbus.cpp HAL_Linux: fixed build warnings 2014-10-09 16:49:23 +11:00
sbus.h HAL_Linux: added SBUS decoder from PX4 project 2014-10-07 14:57:34 +11:00
system.cpp AP_HAL_Linux: implement new AP_HAL functions 2015-11-20 12:25:39 +09:00