Grafico dei commit

18 Commit

Autore SHA1 Messaggio Data
Vivek
2f4b444fb7 qcacmn: Disable panic for scheduler timeouts
When a scheduler message starts porcessing,we start
the scheduler watchdog timer, and in few cases when the
system get under heavy load processing tasklets
and bottom halves, and the scheduler message is preempted,
its not getting a chance to run and the scheduler watchdog
timer is triggered and it causes a panic.

Since the scheduler watchdog timmer is less than
the kernel RCU timer, were are having scenarios, where
because of the scheduler watchdog panic, the RCU stall is masked.

So in case of scheduler watchdog we wanted to just print
the information about the message being processed by the scheduler
and not panic.

Change-Id: I509abcd8cd8d2e863dc3f2370ceaa70e0d4f244f
CRs-Fixed: 3004176
2021-09-26 13:56:52 -07:00
Vivek
97f44cd39e qcacmn: Add API to configure scheduler watchdog timeout
The scheduler watchdog timeout is currently fixed at 10secs.
There are few customer use cases, where the CPU is busy for
sometime and the scheduler message processing is taking longer than
the coinfigured watchdog timeout value.

Add a new API to be able to configure this value different than the
default as per the requirement.

CRs-Fixed: 2834194
Change-Id: I976f1f0ad17f09cf3960f99ad80226d775b8b2f2
2020-12-09 23:54:46 -08:00
Neha Bisht
503663c6da qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in obj_mgr and scheduler
modules.
Structure           Bytes saved (64bit)   Bytes saved (32bit)
scheduler_ctx       8 bytes               4 bytes
wlan_channel        8 bytes               8 bytes

Change-Id: I298946b55328d8d9b564c140e0a59e0b8702fab0
CRs-Fixed: 2587842
2020-01-11 16:18:50 -08:00
sheenam monga
dd4dc88b83 qcacmn: CONFIG_MCL cleanup for msg queue depth and reduction limit
Remove CONFIG_MCL for Serialization msg queue depth and reduction limit to
make code generic. In case SCHEDULER_CORE_MAX_MESSAGES not defined, then
define SCHEDULER_CORE_MAX_MESSAGES to 4000 for WIN . If
WLAN_SCHED_REDUCTION_LIMIT not defined for MCL then define
WLAN_SCHED_REDUCTION_LIMIT to 32 for WIN .

Change-Id: If64f117f6f0af56f6a9e1041e583b022c6c419fb
CRs-Fixed: 2457723
2019-05-27 06:07:20 -07:00
Vivek
fa47688f04 qcacmn: Change max scheduler buffers for WIN
Since the usage of the scheduler for WIN,
is now not limited only to scan component alone and
would be used by the new converged MLME also for few specific cases,
we need to increase the size of max scheduler buffers to 4K.

Change-Id: I11818c311b39c42ffda5a79eb7b7137dcb491649
CRs-Fixed: 2387644
2019-01-30 02:32:18 -08:00
Nirav Shah
1b9674e21e qcacmn: umac: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
2018-08-14 21:44:21 -07:00
Nirav Shah
a175314c51 qcacmn: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
2018-07-13 10:36:22 -07:00
Dustin Brown
c7ee85c4a8 qcacmn: Use qdf_flex_mem for scheduler messages
Currently, the scheduler thread keeps a large, pre-allocated array of
messages for use in message posting. The vast majority of the time,
however, the scheduler thread has zero or one messages pending in the
queue. This leads to a huge memory overhead for nominal driver
operation.

Replace the current pre-allocated scheduler message pool with a
hybrid static/dynamic approach.

Change-Id: Ie942bacfef43edf142a9f35ad0309069096cda90
CRs-Fixed: 2204172
2018-05-21 21:48:10 -07:00
Vivek
d78dedc9dd qcacmn: Configure qdf_flex_mem segments for scheduler pool
Configure the qdf_flex_mem segments for scheduler pool
to 32, which creates 1024 scheduler message buffers
during init.

Change-Id: Iefa9427b55b427f79aa21a90cbf6e8a05be35e59
CRs-Fixed:
2018-05-21 21:48:06 -07:00
Vignesh Viswanathan
6ecd284e5a qcacmn: Add handlers for scan queue in scheduler core
Add scheduler message handler function for QDF_MODULE_ID_SCAN queue.

Also post scan beacon/probe frames and scan events to SCAN queue instead
of TARGET_IF queue.

Change-Id: I94e3ea2f0eb5c9592f5cfcd91738778fa65ba815
CRs-Fixed: 2214554
2018-04-23 00:30:55 -07:00
Dustin Brown
c8e2987f93 qcacmn: Reduce SCHEDULER_CORE_MAX_MESSAGES to 1000
After profiling many iterations of several driver operations, the
observed absolute maximum number of queue scheduler messages was 452
during soft AP startup. Typical maximums for this test case are less
than 100, occasionally getting as high as 250. The median for all of
the driver operations in general were in the range of 1-2. Given this
information, a round number around twice the worst case rate was
picked.

Reduce SCHEDULER_CORE_MAX_MESSAGES to 1000, down from 8000 for MCL.
This saves a significant amount of unused statically allocated memory.

Change-Id: I6ef65db84ca524cea68afbc3bb49347c6d996992
CRs-Fixed: 2202692
2018-03-12 22:00:46 -07:00
Dustin Brown
3149adf58a qcacmn: Migrate scheduler logging functions
Part of the scheduler component has been migrated to the new sched_*
logging wrappers, but part of it still remains to be ported. Finish
migrating all of the scheduler logging APIs.

Change-Id: I5065d849a1523d6c27d6c6a27b1ad4605036c3e6
CRs-Fixed: 2201038
2018-03-09 13:39:51 -08:00
Vivek
f227fb7417 qcacmn: Reduce the number of scheduler message buffers for WIN
Reduced the number of scheduler message buffers for WIN to
2k from 4k since WIN is only using 2 scheduler queues.

Changed the order of two members of scheduler messgae structure
to avoid additional padding on 64bit platform.

Change-Id: Ic74d60878867c45413bc4fbd5c56feb4dd421699
CRs-Fixed: 2157621
2018-01-09 06:12:44 -08:00
Dustin Brown
91abaccb45 qcacmn: Use sched logging helpers in scheduler_api.c
A set of logging helpers for the scheduler component were previously
added to reduce boilerplate logging code. Update scheduler_api.c to use
the new logging helpers.

Change-Id: I45715e40dbdd5a94d064ca4c64290a443cacea34
CRs-Fixed: 2152575
2017-12-11 22:08:30 -08:00
Dustin Brown
e1d3d092f6 qcacmn: Add scheduler logging macros
To reduce boilerplate code, add standard logging macros to the scheduler
module.

Change-Id: I478ec2d16d340f419135101704f0ab3a5bf0b4d8
CRs-Fixed: 2042761
2017-05-19 23:58:21 -07:00
Dustin Brown
e226cebdd2 qcacmn: Add Scheduler Watchdog Timer
In order to catch long running scheduler messages, start a watchdog
timer before processing each message, and stop the timer after each
message is processed. When the watchdog timer expires, immediately
crash the device in debug builds for easier debugging.

Change-Id: I4b43a9e12fc1f5b8a795fec790fe7548a100d9db
CRs-Fixed: 2037094
2017-04-26 17:01:52 -07:00
Rajeev Kumar
73c05a8087 qcacmn: Add changes to detect if scheduler thread is stuck
Scheduler thread can get stuck because of many reasons like
mutex deadlock, resource starvation etc. Add changes to detect
if scheduler thread is stuck.

Change-Id: Ib9d4e3b240077464b3a51ab6be6af728cb845bfe
CRs-Fixed: 1107636
2017-01-10 18:20:24 -08:00
Rajeev Kumar
cd39549564 qcacmn: Rename control path scheduler from sch to scheduler
Legacy protocol engine already has a module name 'sch' rename
control path scheduler from sch to scheduler to avoid naming
conflict with protocol sch.

Change-Id: I94ce9aa5037aa75319aaad2287116462444c03f4
CRs-Fixed: 1105115
2016-12-27 16:37:34 -08:00