summaryrefslogtreecommitdiff
path: root/scheduler
AgeCommit message (Collapse)Author
2018-01-09qcacmn: Reduce the number of scheduler message buffers for WINVivek
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
2017-12-15qcacmn: split scheduler init/deinitDustin Brown
A commonly used and robust life-cycle pattern consists of the following 4 steps: 1) create (allocate resources) 2) start (mark resources as safe for use) 3) stop (mark resources as unsafe for use) 4) destroy (deallocate resources) This pattern effectively prevents access to uninitialized and freed resources. While the dispatcher psoc life-cycle follows this pattern, the global life-cycle is condensed into steps 1 and 4. Unsurprisingly, this led to uninitialized and freed resource access problems, especially in regards to the scheduler thread. Split the scheduler init and deinit life-cycle functions into init, enable, disable, and deinit. Create new global enable and disable dispatcher functions, and call the new scheduler APIs as appropriate. This brings the global dispatcher life-cycle in line with the existing psoc life-cycle, and prevents many scheduler related resource access issues. Change-Id: I58b65be0611f48e48354f28c221185f6f490f30c CRs-Fixed: 2153283
2017-12-15qcacmn: Add SYS_MSG_ID_UMAC_STOP system messageNaveen Rawat
Add SYS_MSG_ID_UMAC_STOP to allow umac close to be done in mc thread context. Change-Id: I11946ce7aa21ce96f71d604244b9981dcae9704a CRs-Fixed: 2156189
2017-12-11qcacmn: Refactor Scheduler init/deinit pathsDustin Brown
There are many minor discrepancies in the scheduler module's init and deinit paths. Refactor the scheduler init/deinit code paths to address any discrepancies between the two. Also ensure error path cleanup cleans up all the resources that were previously created. Change-Id: Ib392f41a887031cd710aebaca32eb653952550a4 CRs-Fixed: 2153210
2017-12-11qcacmn: Use sched logging helpers in scheduler_api.cDustin Brown
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-10-17qcacmn: Use atomic set bit ops for mc threadHouston Hoffman
The basic qdf bit ops are not atomic. Race conditions can lead to messages stuck in queues without mc thread being woken up. Change-Id: I42093b863c7ed93c5c2baf0bd14106eb4fe082fc CRs-Fixed: 2118014
2017-10-06qcacmn: Add register/deregister data stall detect cb apiPoddar, Siddarth
Add register and deregister data stall detect callback apis. Change-Id: I59d5871b7ec03da4b4f69d87b14f7eb5e8606c4a CRs-Fixed: 2090654
2017-09-28qcacmn: scheduler: Replace instances of unadorned %pJeff Johnson
Replace instances of unadorned %p in scheduler. Change-Id: Ia2571f2296ca657485568dcbf949316ffe8fa0df CRs-Fixed: 2111274
2017-09-13qcacmn: Dump scheduler thread stack for watchdog biteDustin Brown
In the event of a scheduler thread watchdog bite, dump the scheduler thread stack trace to aid in debugging. Change-Id: I222556c7cb01985abe20b04a9383fc6c6d0724fc CRs-Fixed: 2091875
2017-09-12qcacmn: Remove obsolete START and STOP SYS_MSG_IDsJeff Johnson
The SYS_MSG_ID_MC_START and SYS_MSG_ID_MC_STOP message IDs are no longer being used. so remove them. Change-Id: I8d35a537ac2c2f7436b23033561e5d0ef09895df CRs-Fixed: 2107075
2017-08-01qcacmn: Avoid WD panic during scheduler shutdownDustin Brown
Avoid scheduler watchdog panic during scheduler shutdown to avoid interfering with recovery mechanisms. Change-Id: If32cc77a9725fdb61fc09c4065fc2603f2e8e00b CRs-Fixed: 2069429
2017-05-30qcacmn: Properly format new line spacing in scheduler_api.hRajeev Kumar
In scheudler_api.h properly format new line spacing between functions and include files. Change-Id: I7960ea7aeec3aef9c50a4a39efcd9db4d6f3951f CRs-Fixed: 2051329
2017-05-26qcacmn: Remove assert in Scheduler thread post message pathDustin Brown
In situations where the scheduler thread has been stopped, but some threads are still trying to post massages to it, a particular assert can be triggered excessively. Remove the post message assert when the scheduler thread is stopped, and instead simply log an error. Change-Id: I5b898dc3ea22bbedcdf2287ef6f3bcee1560bb6b CRs-Fixed: 2046232
2017-05-19qcacmn: Add scheduler logging macrosDustin Brown
To reduce boilerplate code, add standard logging macros to the scheduler module. Change-Id: I478ec2d16d340f419135101704f0ab3a5bf0b4d8 CRs-Fixed: 2042761
2017-05-16qcacmn: Change log levels in scheduler API'sVivek
Changed the log levels from ERROR to DEBUG for few prints in the scheduler API's since the prints were not for errors but for debugging purposes. Change-Id: I2a351de5933cfe6ec7e52d48fbc6e32880854276 CRs-Fixed: 2034873
2017-05-03qcacmn: Change init-deinit sequence of scheduler & call flush callbackKrunal Soni
Provide fix such a way that scheduler's initialization happens at the end after all components' initialization gets done. Same-way scheduler's deinitiazation happens very first before other component's deinit gets started. scheduler also need to call component's provided callback to notify that component while flushing component's message queue. CRs-Fixed: 2034772 Change-Id: I2c46bf9e68b93ecbc2ce9659d56de2887573411e
2017-05-02qcacmn: Rename vStatus to linux style variable nameRajeev Kumar
In scheduler core message processor rename camel case variable name vStatus to qdf_status. Change-Id: I2b22915269aad9583ab4a360b92938df3d976c66 CRs-Fixed: 2037960
2017-05-02qcacmn: Rename pMsgWrapper to linux style variable nameRajeev Kumar
In scheduler core message processor rename camel case variable name pMsgWrapper to msg_wrapper. Change-Id: Ica6715d9b14a807fdabc2da302de6ead4509aef8 CRs-Fixed: 2037958
2017-04-26qcacmn: Add Scheduler Watchdog TimerDustin Brown
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-18qcacmn: Add provision for flush callback in scheduler messageRajeev Kumar
Add provision for flush callback in scheduler message such that during driver unload scheduler can invoke the flush callback and components can release the common object ref count which is taken before posting the message. Change-Id: I28490e18247239af27feef3a4b53e5080ab012fc CRs-Fixed: 2034772
2017-04-17qcacmn: Initialize scheduler_msg on stack before posting messageRajeev Kumar
Initialize scheduler_msg on stack before posting using scheduler API such that un-used fields in message structure are initialized to 0. Change-Id: Ib3183b2c65eb9affd6610f4572c751c39a25fff7 CRs-Fixed: 2034772
2017-04-17qcacmn: Validate existence of sch thread before posting a messageKrunal Soni
If scheduler thread thread doesn't exist or has been shutdown then don't post a message otherwise it will cause a memory leak. validate the existence of scheduler thread before posting a message. Change-Id: Id0e75bdebc7db8c00d9efb8a6e8678491b21a20f CRs-Fixed: 2031651
2017-03-16qcacmn: Do not allocate scheduler context dynamicallyRajeev Kumar
Scheduler context size is more than 400KB so run time memory allocation may fail when system memory is fragmented. Do not allocate scheduler context memory dynamcially instead allocate it from .bss section. Change-Id: I19ebd0689f81b971bde271e1a540952cf41a6cba CRs-Fixed: 2020711
2017-02-07qcacmn: Deregister legacy & target queue callbacks upon scheduler downKrunal Soni
Driver is missing couple of deregister handler while bringing down the scheduler. Change-Id: I99fe6e9a5d3cac800154945e41e707ebb7ee6396 CRs-Fixed: 2001133
2017-02-07qcacmn: Initialize qid to qidx mapping to max valueKrunal Soni
By default qid to qidx mapping gets value zero as default initialization which creates issue to identify whether zero is valid or invalid index. Initializing to maximum value will eliminate above mentioned issue. Change-Id: I4c0e2ba45e67fe6e167bd965bdb7ab901c3828a8 CRs-Fixed: 2001133
2017-02-05qcacmn: Enable the scheduler based timerVivek
Exporting the QDF timer API's required for enabling scheduler based timers. Fixed the compilation issues when scheduler code is enabled. Change-Id: I148bb17c361fdff101fab3711af3c0a6c4158963 CRs-Fixed: 1117366
2017-01-16qcacmn: decrement scheduler qidx count during deregisterYuanyuan Liu
Decrement scheduler qidx count during deregister. Change-Id: Idabb59628aa9f493f17cfdc72aca1699e1b71e4d CRs-Fixed: 1111374
2017-01-10qcacmn: Add changes to detect if scheduler thread is stuckRajeev Kumar
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
2016-12-27qcacmn: Rename control path scheduler from sch to schedulerRajeev Kumar
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